【问题标题】:OpenResty disable TLS 1.0 and TLS 1.1 in auto genereated certsOpenResty 在自动生成的证书中禁用 TLS 1.0 和 TLS 1.1
【发布时间】:2020-11-18 13:40:40
【问题描述】:

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

【问题讨论】:

  • '自动生成的证书'与它无关。 TLS 协议版本由应用程序决定,而不是由证书决定。离题。

标签: ssl lua openresty


【解决方案1】:

我刚刚找到答案here

lua_ssl_protocols TLSv1.2 TLSv1.3;

【讨论】:

  • 这对我不起作用。它不限制 SSL 版本。你能提供你的 nginx.conf 的要点吗?
  • github.com/openresty/lua-nginx-module#lua_ssl_protocols 我在这里找到了答案。这些值不适用于限制(黑名单)ssl,但类似于白名单,因此在此答案中仅允许使用 TLSv1.2 和 TLSv1.3。
  • 您可以在这里ssllabs.com/ssltest 测试您的openresty 配置,并确保您使用的是openresty 而不是nginx。
【解决方案2】:

OpenResty on bionic using the docker container 与我们生产系统上的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 指令对我不起作用。

【讨论】:

    猜你喜欢
    • 2021-03-13
    • 1970-01-01
    • 2021-08-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-09
    • 2015-09-20
    • 2021-05-14
    相关资源
    最近更新 更多