赞
踩
一 nginx与tls/ssl续
- 说明: 本文是基于'tls/ssl'学习之后,对'之前所写tls/ssl博客'的补充,'重复的'不再啰嗦
-
- curve: '[椭圆] 曲线'
-
- 补充: 会'不定期'的补充
-
- 教育: 解决问题为出发点,不要停留在理论上
-
- 遗留: wiresahrk分析TLS '1.2' '1.3' 握手各个'过程'
① 背景铺垫
② nginx作为服务端与client之间的tls变量
core模块: $https 、$proxy_protocol_tlv_name '1.23.2 [了解]'、'$scheme'
③ ssl_conf_command和ssl_reject_handshake补充
- ssl_conf_command Options PrioritizeChaCha;
-
- 等效于'SSL_OP_PRIORITIZE_CHACHA'
1.19.4+ ssl_conf_command和ssl_reject_handshake 特性
- 背景: 为了当'机器人或者奇怪的人类'通过HTTPS访问你的ip时'不暴露'证书,也就不会暴露'域名'
-
- server {
- listen 443 ssl;
- ssl_reject_handshake on;
- }
-
- server {
- listen 443 ssl;
- server_name example.com;
- ssl_certificate example.com.crt;
- ssl_certificate_key example.com.key;
- }
-
- 含义: 除'example.com'以外,其他'域名'的SSL握手将'被拒绝'
-
- 特点: '返回UNRECOGNIZED NAME',Chrome提示'ERR_SSL_UNRECOGNIZED_NAME_ALERT'

使用Kernel TLS 和 SSL_sendfile( ) 提高 NGINX 性能
- 推荐: 'http作用域'使用
-
- ssl_conf_command Options KTLS;
-
- ssl_protocols TLSv1.3;
ssl_conf_command ciphersuites指令来配置加密套件
- 1、'默认'加密套件
-
- ssl_conf_command ciphersuites DEFAULT;
-
- 2、'启用TLSv1.2'协议,并使用'AES128-SHA256'和'AES128-SHA'算法进行加密
-
- ssl_conf_command ciphersuites TLSv1.2+AES128-SHA256:TLSv1.2+AES128-SHA;
-
- 备注: Ciphersuites指定了'SSL/TLS'使用的'加密'协议,'密钥交换'算法,加密算法和MAC算法组合
④ ssl_ciphers再探
需求: ssl_ciphers 禁止'不安全'的加密套件,只允许'有限 [白名单]'安全的加密套件?
⑤ 新特性补充
- 目的: 通过这些'状态码'几个'error+page'指令尽早的'发现'问题
-
- eg: 当'客户端'证书过期了,给'客户端'一个'明显'的'错误'信息
-
- ++++++++++++ '简述' ++++++++++++
-
- 495: 客户端提供了一个'无效'的证书 --> "证书过期"
-
- 496: 需要客户端提供 'SSL 证书',客户端却没有提供 --> "双向认证"
-
- 497: HTTP 请求发送到了'HTTPS' --> 常见'http'请求到'https端口'
⑦ 熵
- cat /proc/sys/kernel/random/entropy_avail
-
- 诶精: 一般是云上'虚拟机'的场景,随机数产生的'太慢',需要 '> 1000'
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。