经过几个小时的尝试,我必须寻求帮助来解决我的问题。我试图让 OCSP 装订与我的设置配合使用,但没有成功。
这是我的 nginx 配置,没有任何不相关的位。
user www www;
worker_processes 5;
error_log /var/log/nginx/error.log;
events {
worker_connections 1024;
}
http {
include mime.types;
index index.html index.htm;
log_format main '$remote_addr - $remote_user [$time_local] $status '
'"$request" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
aio on;
sendfile on;
autoindex on;
autoindex_exact_size off;
tcp_nopush on;
tcp_nodelay on;
ignore_invalid_headers on;
keepalive_timeout 70;
gzip on;
gzip_comp_level 5;
gzip_min_length 256;
gzip_proxied any;
gzip_types text/plain text/css application/xml application/javascript application/json font/opentype text/cache-manifest text/x-cross-domain-policy text/xml application/x-javascript;
gzip_vary on;
ssl_certificate fullchain.pem;
ssl_certificate_key server.key;
ssl_trusted_certificate trusted.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
ssl_ecdh_curve secp384r1;
ssl_prefer_server_ciphers on;
ssl_dhparam dh4096.pem;
ssl_session_timeout 10m;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
ssl_stapling on;
ssl_stapling_verify on;
resolver 1.1.1.1 1.0.0.1 valid=300s;
resolver_timeout 5s;
add_header Strict-Transport-Security "max-age=63072000";
add_header X-Frame-Options "DENY";
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1, mode=block";
add_header Content-Security-Policy "upgrade-insecure-requests";
map "$scheme:$http_upgrade_insecure_requests" $shouldUpgrade {
default 0;
"http:1" 1;
}
map $http_accept $webp_suffix {
default "";
"~*webp" ".webp";
}
expires -1;
add_header Cache-Control "public";
server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
server_name localhost ;
access_log /var/log/nginx/access.log main;
root /www/;
error_page 404 /404.html;
if ($shouldUpgrade) {
return 307 https://$host$request_uri;
}
}
}
我在日志文件中收到一个错误:
2019/04/30 21:28:07 [error] 28718#100839: OCSP_basic_verify() failed (SSL: error:27FFF076:OCSP routines:CRYPTO_internal:signer certificate not found) while requesting certificate status, responder: ocsp.int-x3.letsencrypt.org, peer: 2.16.100.83:80, certificate: "/usr/local/etc/nginx/fullchain.pem"
无论我尝试在提供给 的文件中包括什么ssl_trusted_certificate
,我都无法解决这个问题。我尝试包括完整的链,将根 CA 添加到其中,仅 CA,仅中介。将根 CA 添加到提供给 ssl_certificate 的 fullchain.pem 文件中会导致 SSL 验证网站上出现错误。
尽管如此,我仍然OCSP Stapling not enabled.
受到https://ssldecoder.orgOCSP response: no response sent
使用 openssl s_client时
任何帮助都将不胜感激。我正在使用 let's encrypt。
答案1
FreeBSD security/libressl 最近升级到了 2.9.1。自从 LibreSSL 版本更改以来,OCSP 装订功能也停止在 nginx 中工作,因此我假设库或 nginx 与它的交互中存在潜在问题。
编辑: 同时,Elias Ohm 在 FreeBSD 错误跟踪器上对此进行了更详细的分析。TL;DR:这是一个 nginx 错误,在使用较新的 OpenSSL API 时,它使用了错误的函数来访问证书链。