如何强制Apache 2.2发送完整的证书链?

dav*_*vka 8 apache ssl reverse-proxy certificate mod-ssl

我们使用mod_proxy在反向代理模式下使用带有mod_ssl的 Apache 2.2.25 .它有一个我们用于测试目的的服务器证书,由GoDaddy发布.链中有3个证书.中间CA(Go Daddy安全证书颁发机构 - G2)并不总是在客户的可信CA列表中找到.server cert -> GoDaddy intermediate CA -> GoDaddy Root CA

与服务器的SSL连接适用于浏览器(至少对某些浏览器而言),但不适用于其他一些客户端.我们注意到我们的服务器没有使用以下命令发送完整的证书链:openssl s_client -showcerts -connect SERVER_URL:443,实际上该命令报告错误Verify return code: 21 (unable to verify the first certificate)

我们SSLCertificateFile在每个VirtualHost中使用该指令:

SSLCertificateFile certificate.crt
Run Code Online (Sandbox Code Playgroud)

certificate.crt文件包含私钥和链中的所有证书.我们试图将其拆分为以下内容:

SSLCertificateFile server.crt
SSLCertificateKeyFile server.key
SSLCertificateChainFile chain.crt
Run Code Online (Sandbox Code Playgroud)

但这并没有改变任何事情.

谢谢你的帮助!

编辑
情节变粗 - 它似乎是证书和服务器的某种组合.
(使用SSL Shopper工具进行测试)

  1. 在Apache 2.2(RHEL)上使用Daddy证书(如上所述) - 不起作用
  2. 在IIS7上相同的证书 - 工作
  3. Apache 2.2 RHEL上的客户证书(来自Comodo) - 有效

Ana*_*hat 11

你走在正确的轨道上.

SSLCertificateFile server.crt      >> Your public certificate
SSLCertificateKeyFile server.key   >> Your private key
SSLCertificateChainFile chain.crt  >> List of intermediate certificates;
                                 in your case, only one - GoDaddy intermediate CA
Run Code Online (Sandbox Code Playgroud)

使用SSL Labs等工具检查服务器配置,以确定是否要发送正确的中间证书.