我在 nginx 中遇到 OCSP 装订问题。所以我启动了 openssl ocsp 守护进程,然后我访问了我的站点。然后它说无效的请求。我正在使用私有 PKI 和 CA。SSL 密钥:8192bit DH 密钥 2048bit
root@wilhelm:/etc/ocsp# openssl ocsp -index index.txt -port 9999 -rsigner oscp.crt -rkey oscp.key -CA cacert.pem -text -out log.txt
Waiting for OCSP client connections...
Invalid request
root@wilhelm:/etc/ocsp# ls
cacert.pem index.txt index.txt.attr index.txt.attr.old index.txt.old log.txt ocsp.crt ocsp.key oscp.crt oscp.key
root@wilhelm:/etc/ocsp#
Run Code Online (Sandbox Code Playgroud)
服务器正在工作,我使用 openssl ocsp -CAfile ../cacert.pem -issuer ../cacert.pem -url http://* url *:9999 -resp_text -cert mycert.crt 对其进行了测试,它工作正常.
Nginx 配置:
set_real_ip_from 199.27.128.0/21;
set_real_ip_from 173.245.48.0/20;
set_real_ip_from 103.21.244.0/22;
set_real_ip_from 103.22.200.0/22;
set_real_ip_from 103.31.4.0/22;
set_real_ip_from 141.101.64.0/18; …Run Code Online (Sandbox Code Playgroud) nginx.conf 文件中的以下行是什么意思?
ssl_ciphers HIGH:!aNULL:!MD5;
Run Code Online (Sandbox Code Playgroud)
我知道 ssl 密码指定使用哪种算法来保护服务器通信,我假设 !aNULL 和 !MD5 指定不允许使用这些密码进行通信,但我不知道 HIGH: 指定什么。
我正在尝试按照此处的说明来缓解 logjam 漏洞,但是我不断从 appache 收到以下错误:
Syntax error on line 18 of /etc/apache2/sites-enabled/000-default:
Invalid command 'SSLOpenSSLConfCmd', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
Run Code Online (Sandbox Code Playgroud)
当我将以下行添加到配置中时:
SSLOpenSSLConfCmd DHParameters /etc/ssl/certs/dhparams.pem
Run Code Online (Sandbox Code Playgroud)
我的应用程序详细信息是:
Server version: Apache/2.2.16 (Debian)
Server built: Oct 16 2014 10:27:58
Server's Module Magic Number: 20051115:24
Server loaded: APR 1.4.2, APR-Util 1.3.9
Compiled using: APR 1.4.2, APR-Util 1.3.9
Architecture: 32-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with.... …Run Code Online (Sandbox Code Playgroud) 几天前,谷歌浏览器更新到版本 58 开始使我的自签名证书无效。它在抱怨失踪subjectAltNames。我做了一些研究并尝试了一些建议(不起作用),但后来找到了这篇文章,这是我唯一可以工作的文章。
还是我?
Yay chrome 现在正在接受我新生成和导入的证书,我正在路上,
直到,我点击了我的PHP网络应用程序中的一个页面,该页面需要从同一台开发机器上的另一个微网络服务加载数据。
stream_socket_client():SSL 操作失败,代码为 1。 OpenSSL 错误消息:错误:14090086:SSL 例程:ssl3_get_server_certificate:
我已经在谷歌上搜索和修改了大约 4 个小时,但我无法理解它。
题
为什么 chrome 接受我的证书。无论其工具一样curl,openssl s_client全部给我unable to verify the first certificate或invalid certificate?我曾尝试将证书作为参数传递,但显然仍然无效。
使用 curl 和 openssl 将证书文件作为参数进行调试继续给我这个错误
SSL 证书验证结果:无法获取本地颁发者证书 (20),
我想我到一天结束时会完全秃顶。
笔记
虚拟机是我的本地开发环境,所以我有多个域,它们有自己的证书和密钥
VM 位于 IP 192.168.33.10 上。这意味着 chrome 没有访问本地主机。但是 curl 和 openssl s_clinet 正在尝试访问 locahost
服务器是运行 ubuntu 14.04 的虚拟机
在带有 MMC(微软管理控制台)的主机上安装自签名证书
错误肯定来自试图访问 Web 服务的客户端类。
我曾尝试将证书作为参数传递,但显然仍然无效。
我完全知道我可以将 verify peer …
在我的一个系统中,我不时会看到如下错误消息:
TLS: SSL_read() failed: error:140E0197:SSL routines:SSL_shutdown:shutdown while in init
Run Code Online (Sandbox Code Playgroud)
什么可能导致这些错误?
当我使用 openSSL 和配置文件签署中间证书时,我经常遇到同样的错误。错误是:
140736005481480:error:02001002:system library:fopen:No such file or directory:bss_file.c:175:fopen('/Volumes/Project - Encrypted/Security/root/ca/index.txt.attr','rb')
140736005481480:error:2006D080:BIO routines:BIO_new_file:no such file:bss_file.c:182:
140736005481480:error:0E078072:configuration file routines:DEF_LOAD:no such file:conf_def.c:195:
140736005481480:error:0E06D06C:configuration file routines:NCONF_get_string:no value:conf_lib.c:324:group=CA_default name=email_in_dn
我了解有关找不到文件的第一个错误,但我不明白的是为什么它要查找的文件不是我在配置中定义的文件。这是我在配置中放置的内容:
database = $dir/index.txt # database index file.
我使用的命令是 sudo openssl ca -config openssl.cnf -extensions v3_intermediate_ca -days 3650 -notext -md sha256 -keyfile private/ca.key.pem -cert certs/ca.cert.pem -in intermediate/csr/intermediate.csr.pem -out intermediate/certs/intermediate.cert.pem
有没有人了解导致这些错误的原因以及如何修复它们?
我正在寻找一种从 X509 证书(或 csr)恢复 openssl 配置的方法。我知道可以查看证书并手动重建配置文件,但它不可靠并且需要太多的劳动力:P。
有什么建议么?
Openssl 告诉我它无法验证我的串联证书。我从颁发者(AlphaSSL)下载了中间证书,并将其与我购买的域证书(首先是域证书,然后是 AlphaSSL 中间证书)按照 Google 应用引擎的指示连接起来。然后我按照他们的指示进行验证:
openssl verify -verbose -CAfile mycert_cat.crt mycert_cat.crt
Run Code Online (Sandbox Code Playgroud)
我尝试使用上述内容进行验证并收到此错误消息:
mycert_cat.crt: /C=BE/O=GlobalSign nv-sa/CN=AlphaSSL CA - SHA256 - G2
error 2 at 1 depth lookup:unable to get issuer certificate
Run Code Online (Sandbox Code Playgroud)
我用谷歌搜索了它,但结果说我忘记将证书附加到文件中。我没有。
还有什么可能导致此问题?
我正在使用以下配置文件使用 OpenSSL 生成 CSR:
[ req ]
default_bits = 2048
default_keyfile = usercert.key
distinguished_name = req_distinguished_name
attributes = req_attributes
prompt = no
[ req_distinguished_name ]
C = FR
L = Paris
OU = IT
CN = FirstName LastName
[ req_attributes ]
1.3.6.1.4.1.311.13.2.1 = CertificateTemplate=CustomUserOffline
Run Code Online (Sandbox Code Playgroud)
我的目标是在 CSR 中包含模板名称,以便 Windows CA 能够处理它。
我使用以下命令行来生成 CSR:
openssl req -new -key usercert.key -out usercert.csr -config usercert.cnf
Run Code Online (Sandbox Code Playgroud)
运行它时没有错误,我可以使用以下命令验证 CSR:
openssl req -text -noout -verify -in usercert.csr
Run Code Online (Sandbox Code Playgroud)
verify OK
Certificate Request:
Data:
Version: 1 (0x0)
Subject: C …Run Code Online (Sandbox Code Playgroud) 我混合使用了 Windows、Linux 和 Mac,并注意到每个操作系统使用默认工具显示证书详细信息的方式存在很大差异。
Windows 显示证书详细信息的方式非常简洁。具体来说,证书链。以截图为例。
它再次出现在 Windows 中,但使用的是该certutil工具。(好吧,它正在检查一个 pfx,但你明白了)。
但是在 Mac 上,这就是它在Keychain Access.
正如您所看到的,它没有一个很好的分层视图,可以轻松识别 Windows 或certutil显示的证书链- 至少对于我(可能)未经训练的眼睛来说不是这样。我也没有想出一种方法来显示证书链openssl,例如,以下命令openssl x509 -in certificate.crt -text不显示分层链 - 仅显示颁发者。那么有没有办法使用openssl或原生 Mac 工具查看证书链,无论是文本还是图像?
[编辑]:我经常使用整个证书链(禁止根)创建 PFX 文件,以便在我工作的公司内分发。作为该过程的一部分,我会在将其传递给opensslPFX之前仔细检查我从颁发 CA 下载的证书是否正确以及它们的顺序是否正确。所以要清楚,我在质疑如何在我的计算机上查看我正在本地处理的证书链。
openssl ×10
certificate ×4
ssl ×3
nginx ×2
apache-2.2 ×1
csr ×1
curl ×1
dovecot ×1
ubuntu-14.04 ×1
x509 ×1