在nginx中禁用客户端发起的安全重新协商

z4bn682m  于 2023-11-17  发布在  Nginx
关注(0)|答案(2)|浏览(322)

我使用Nginx 1.19.6和OpenSSL 1.1.1i。但我检查了我的服务器支持客户端发起的安全重新协商...(https://www.immuniweb.com/ssl/?id=Ek4FSF6C
我不知道为什么我的服务器支持客户端发起的安全重新协商。
验证码:

  1. openssl s_client -connect gjan.info:443 -msg -tls1_2

字符串
测试结果:

  1. ---
  2. R
  3. RENEGOTIATING
  4. >>> ??? [length 0005]
  5. 16 03 03 00 f6
  6. >>> TLS 1.2, Handshake [length 00de], ClientHello
  7. 01 00 00 da 03 03 cb bf ab b8 6f a1 31 14 2d fb
  8. ad 63 aa d2 15 c6 5d fc 8c 19 fc db 4c 7f 5b d8
  9. f1 f1 fd f3 29 fa 00 00 36 c0 2c c0 30 00 9f cc
  10. a9 cc a8 cc aa c0 2b c0 2f 00 9e c0 24 c0 28 00
  11. 6b c0 23 c0 27 00 67 c0 0a c0 14 00 39 c0 09 c0
  12. 13 00 33 00 9d 00 9c 00 3d 00 3c 00 35 00 2f 01
  13. 00 00 7b ff 01 00 0d 0c 1b a5 84 2c 92 28 da 6e
  14. 0c 84 5f c4 00 00 00 0e 00 0c 00 00 09 67 6a 61
  15. 6e 2e 69 6e 66 6f 00 0b 00 04 03 00 01 02 00 0a
  16. 00 0c 00 0a 00 1d 00 17 00 1e 00 19 00 18 00 23
  17. 00 00 00 16 00 00 00 17 00 00 00 0d 00 30 00 2e
  18. 04 03 05 03 06 03 08 07 08 08 08 09 08 0a 08 0b
  19. 08 04 08 05 08 06 04 01 05 01 06 01 03 03 02 03
  20. 03 01 02 01 03 02 02 02 04 02 05 02 06 02
  21. <<< ??? [length 0005]
  22. 15 03 03 00 1a
  23. <<< TLS 1.2, Alert [length 0002], warning no_renegotiation
  24. 01 64
  25. >>> ??? [length 0005]
  26. 15 03 03 00 1a
  27. >>> TLS 1.2, Alert [length 0002], fatal handshake_failure
  28. 02 28
  29. 547636304368:error:14094153:SSL routines:ssl3_read_bytes:no renegotiation:../ssl/record/rec_layer_s3.c:1560:


只是Important Web错误还是我的Web服务器真的支持?如果支持,我如何禁用?

zvokhttg

zvokhttg1#

可能无法使用nginx中的设置来解决此安全问题。但是,您可以将nginx开发人员推荐给此答案,以便他们可以在代码库中进行适当的更改。正如其他答案所表明的那样,这不仅仅是immuneweb**。
SSL_OP_NO_RENEGOTIATION选项是在OpenSSL 1.1.1中添加的。要使immuneweb给予您与我们相同的分数(A+),您需要设置SSL_OP_NO_RENEGOTIATION以禁用TLSv1.2和更早版本中的所有重新协商。这需要在创建SSL_CTX的位置设置。您可能还需要进行其他更改以获得所需的评分。

  1. SSL_CTX *ssl_ctx = SSL_CTX_new(TLS_method());
  2. ...
  3. SSL_CTX_set_options(ssl_ctx, SSL_OP_NO_RENEGOTIATION);

字符串
来源:SSL_CTX_set_options man 1.1.1

ua4mk5z4

ua4mk5z42#

这只是一个immersed web.Qualys/ssllabs correctly shows

  1. Secure Renegotiation Supported
  2. Secure Client-Initiated Renegotiation No
  3. Insecure Client-Initiated Renegotiation No

字符串
第一个表示握手期间的RFC 5746协商工作;第二个和第三个表示客户端发起的实际重新协商失败。

相关问题