leslie-tsang commented on code in PR #9903:
URL: https://github.com/apache/apisix/pull/9903#discussion_r1281466682
##########
apisix/ssl/router/radixtree_sni.lua:
##########
@@ -206,13 +206,35 @@ function _M.match_and_set(api_ctx, match_only, alt_sni)
end
end
- local matched_ssl = api_ctx.matched_ssl
- core.log.info("debug - matched: ", core.json.delay_encode(matched_ssl,
true))
+ core.log.info("debug - matched: ",
core.json.delay_encode(api_ctx.matched_ssl, true))
if match_only then
return true
end
+ ok, err = _M.set(api_ctx.matched_ssl, sni)
+ if not ok then
+ return false, err
+ end
+
+ return true
+end
+
+
+function _M.set(matched_ssl, sni)
+ if not matched_ssl then
+ return false, "failed to match ssl certificate"
+ end
+ local ok, err
Review Comment:
unused var `ok` here.
##########
apisix/schema_def.lua:
##########
@@ -790,6 +790,15 @@ _M.ssl = {
enum = {1, 0},
default = 1
},
+ ssl_protocols = {
+ description = "set ssl protocols",
+ type = "array",
+ maxItems = 3,
+ uniqueItems = true,
+ items = {
+ enum = {"TLSv1.1","TLSv1.2", "TLSv1.3"}
Review Comment:
```suggestion
enum = {"TLSv1.1", "TLSv1.2", "TLSv1.3"}
```
--
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]