需要哪些中级证书(Apache)?

需要哪些中级证书(Apache)?

我在 HPUX/Apache 服务器上收到以下错误:

证书验证:错误(20):无法获取本地颁发者证书

当我查看我的根证书时,我发现服务器上包含了 DoD Root CA-2 根证书。

我的站点证书具有 DoD Root CA-2 -> DoD CA-28 -> 证书链。

当我执行以下操作时,确实收到错误:

-bash-4.3$ openssl s_client -connect mysite:443 -showcerts
CONNECTED(00000003)
depth=0 /C=US/O=U.S. 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=U.S. Government/OU=DoD/OU=PKI/OU=USN/CN=mysite
verify error:num=27:certificate not trusted
verify return:1
depth=0 /C=US/O=U.S. 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 证书?

答案1

对于 Apache HTTPD,您仅“需要” RSA 密钥和 X509 签名证书或自签名证书。无需 CA。

但是,如果客户没有看到您拥有完整的 CA 链,或者至少没有除根 CA 之外的 CA 链(如果有的话),他们可能会抱怨。

我们假设有一个名为 EXAMPLE 的签名机构,它由 3 个 ca 组成,并且已经签署了您的证书。

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

简而言之,为了能够加密-解密 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.

相关内容