OpenResty 在自动生成的证书中禁用 TLS 1.0 和 TLS 1.1

OpenResty disable TLS 1.0 and TLS 1.1 in auto genereated certs

最近我在玩 openrestylua-resty-auto-ssl 但找不到如何禁用 TLS 1.0 和 TLS 1.1(并添加密码)。我只是阅读了整个互联网两次,但一无所获。在 nginx 中是简单的一行 ssl_protocols TLSv1.3 TLSv1.2; 但它不影响 lua-resty-auto-ssl 我不知道该怎么做,如果有人能阐明这个话题会很好。

我刚找到答案 here:

lua_ssl_protocols TLSv1.2 TLSv1.3;

OpenResty on bionic using the docker container with the auto-ssl lua component 在我们的生产系统上要求我们在 http 部分中简单地使用标准指令 ssl_protocols TLSv1.2 TLSv1.3;。这目前正在为我们工作,如下所示:

➜  http --ssl=tls1.1 https://my-custom-domain.foo.com/my-special-page --output tmp.html

http: error: SSLError: HTTPSConnectionPool(host='my-custom-domain.foo.com', port=443): Max retries exceeded with url: /my-special-page  (Caused by SSLError(SSLError(1, '[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:1122)'))) ...

我希望这可以为某些人澄清,因为使用 lua_ssl_protocols 指令对我不起作用。