我在HPUX / Apache服务器上收到以下错误消息:
证书validation:错误(20):无法获取本地发行者证书
当我查看我的根证书时,我在服务器上包含了DoD根CA-2根证书。
我的站点证书具有DoD根CA-2 – > DoD CA-28 – >证书链。
当我做到以下,我收到一个错误:
-bash-4.3$ openssl s_client -connect mysite:443 -showcerts CONNECTED(00000003) depth=0 /C=US/O=US Government/OU=DoD/OU=PKI/OU=USN/CN=mysite verify error:num=20:unable to get local issuer certificate verify return:1 depth=0 /C=US/O=US Government/OU=DoD/OU=PKI/OU=USN/CN=mysite verify error:num=27:certificate not trusted verify return:1 depth=0 /C=US/O=US Government/OU=DoD/OU=PKI/OU=USN/CN=mysite verify error:num=21:unable to verify the first certificate verify return:1 20509:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1102:SSL alert number 40 20509:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:182:
除了上面的openssl命令的错误和确认之外,我的网站大部分时间都在工作(我的内存不足导致了我的问题)。
我的服务器上的根存储中是否需要DoD CA-28证书?
对于Apache HTTPD,您只需“请求”RSA密钥和X509签名证书或自签名。 没有CA是必要的。
虽然有些客户会抱怨,如果他们没有看到你有完整的连锁店,或者至less是连锁店的连锁店,除非他们有连锁店。
我们假设有一个名为“3”的签名机构,名为“示例”,并签名了证书。
ROOT-EXAMPLE <-- browsers may have this if it is a known authority SUB-EXAMPLE <--- you haven't included this one SIGNER-EXAMPLE <--- you haven't included this one YOURCERT <-- you are offering this one YOURKEY <-- you are offering this one
简而言之,要能够encryption解密Apache HTTPd只需要从底部开始的前两个,并且应该添加所有其余的(除了根目录,如果它包含在浏览器中则不需要)。
如何用Apache HTTPD(包括全部)做到这一点? 简单
SSLCertificateKeyFile /path/to/rsa.key SSLCertificateFile /path/to/chain.crt <-- here you can include the signed and the ca's from root to leaf.