大网数据广告活动
服务器运维问答

HTTPS not working with two intermediate certificates

· 52CE 我爱测

Iʼm trying to create my own certificate authority using the XCA software. I have successfully created the root CA ( Fisir Technologies CA ) and intermediate CA ( Fisir Technologies Intermediate CA X1 ). However, I want to have on…

问题原文

原帖链接 · Jakub · CC BY-SA 3.0

Iʼm trying to create my own certificate authority using the XCA software. I have successfully created the root CA (Fisir Technologies CA) and intermediate CA (Fisir Technologies Intermediate CA X1). However, I want to have one more intermediate CA (Fisir Technologies Endpoint CA WWW) under the first intermediate CA (Fisir Technologies Intermediate CA X1). The second intermediate CA is supposed to issue the end entity certificates.

Iʼve done all this and imported my root CA as a trusted root certificate authority (on Windows). Then, I created a new HTTPS certificate signed by the second intermediate CA. I tried to open it with the default certificate viewer on Windows, but it told me that it doesnʼt have enough information to validate the certificate. That was what I expected, as I had installed only the root CA.

So I created a certificate chain, including the root CA, the two intermediate CAs and the HTTPS certificate. I uploaded it onto my VPS, set up the HTTPS server in nginx and tried accessing it. But Google Chrome welcomed me with a NET::ERR_CERT_INVALID error.

I clicked on the crossed red lock in the address bar and it said that the certificate is not valid. So I chose to view the certificate and it opened it again in the Windows default certificate viewer. But it did not show any error. I looked at the certificate path and it was shown correctly:

Certificate path

It also said that the certificate is valid. Also, every online HTTPS checker that I could found did not show any issue with the setup (except for untrusted root CA, of course).

I tried to modify various properties of the certificate, but it would never work. Then I tried to issue the exact same certificate as the first time, but this time I signed it with the first intermediate CA. I refreshed the page and it worked.

But I want to issue the certificates using the second intermediate CA. Anyone knows what the problem might be?

You can check the problem for yourself live at https://php.technologies.fisir.net.

Thank you.

已采纳解答

原帖链接 · garethTheRed · CC BY-SA 3.0

You have a few issues here:

  1. Your Root CA Certificate has a pathlen in its basicConstraints - not needed and not used, but it shouldn't cause problems.
  2. You have a certificate policy on your Root CA Certificate - this would be better applied by your Root CA to the subordinate CAs. If you wanted to change policy at a latter date, or add another policy, you'd have to resign and re-issue your Root CA Certificate to all relying parties. Again, it shouldn't cause your reported issue though.

However...

  1. Your Root CA CRL in your CRL Distribution Point at http://crl.ca.technologies.fisir.net/root.crl is inaccessible. Your relying parties cannot chain-build as the cannot check for revocation. This assumes that they check.
  2. Your first subordinate CA's CRL is also inaccessible at http://crl.ca.technologies.fisir.net/intermediate-x1.crl - same as above.
  3. Your issuing CA's CRL is also inaccessible at http://crl.ca.technologies.fisir.net/x1-endpoint-www.crl - there's a pattern forming here ;-)
  4. The OCSP server in the Authority Information Access extension is inaccessible (it won't even resolve to an IP address). A relying party that uses OCSP to check for revocation will fail.

I'd guess that your issues are down to the relying parties (Chrome etc) being unable to check revocation, and therefore are unable to successfully build a certificate chain.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-04-07)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。