monkeyDluffy6017 commented on code in PR #9247:
URL: https://github.com/apache/apisix/pull/9247#discussion_r1162240645


##########
apisix/ssl.lua:
##########
@@ -252,9 +253,14 @@ function _M.check_ssl_conf(in_dp, conf)
         end
     end
 
-    local ok, err = validate(conf.cert, conf.key)
-    if not ok then
-        return nil, err
+    -- if the certificate or key uses a secret reference, we only verify it 
when using it
+    if not secret.check_secret_uri(conf.cert) or
+        not secret.check_secret_uri(conf.key) then
+
+        local ok, err = validate(conf.cert, conf.key)

Review Comment:
   If the cert is using secret_uri and the key doesn't, the validate will 
failed.
   We have two choices:
   1. the key and cert should support secret_uri both
   2. validate cert and key seperately
   
   Could we add test cases about this?
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to