OCSPStapling,是指服务端主动获取OCSP查询结果并随着证书一起发送给客户端,从而让客户端跳过自己去验证的过程,提高TLS握手效率。
1.更改 .conf 增加
ssl_early_data on;
proxy_set_header Early-Data $ssl_early_data;
# OCSP stapling
ssl_stapling on;
ssl_stapling_verify on;
ssl_trusted_certificate /usr/local/nginx/conf/ssl/hl05.com/ca.cer;
resolver 223.5.5.5 223.6.6.6 valid=300s;
resolver_timeout 10s;
add_header Strict-Transport-Security "max-age=31536000";
其中ca.cer就是所需的 OCSP Stapling 验证文件2.重启nginx后运行
openssl s_client -connect www.hl05.com:443 -servername hl05.com -status -tlsextdebug < /dev/null 2>&1 | grep -i "OCSP response"
显示OCSP response:
OCSP Response Data:
OCSP Response Status: successful (0x0)
Response Type: Basic OCSP Response
表示启用成功
如果显示
OCSP response: no response sent
则表示失败了检测网站:https://myssl.com/
或者:https://www.ssllabs.com/ssltest/index.html
扫描二维码,手机查看
声明:部分数据/图片来源互联网,不代表Hluse Inc.,真实性请妥善甄别。