Background:
- Ubuntu Server 14.10 64-bit on aws.amazon.com/ec2
- Cheap PositiveSSL server certificate from COMODO
- 1 server certificate, 2 intermediate CA certificates and 1 Root CA certificate as ZIP archive from COMODO
- Citadel's WebCit httpsd
Problem:
The concatenated certificate chain seems to be correct but verification fails.
openssl s_client myhost:port
shows the certificate chain and the issuer-subject pairs line up correctly through the chain, but:
verify error:num=19:self signed certificate in certificate chain
The root CA certificate is not accepted by openssl, although it is found per default in the Ubuntu server trust store.
Specifically:
AddTrustExternalCARoot.crt
received per email from COMODO and
/etc/ssl/certs/AddTrust_External_Root.pem
which links to
/usr/share/ca-certificates/mozilla/AddTrust_External_Root.crt
are indentical.
What is wrong here?
openssl s_client
the html of the page shows up and w3m also displays the page after complaining about the untrusted certificate. But Firefox simply does not show the page, without any warning about the certificate.openssl verify -CAfile chained.crt chained.crt
passes "OK" (chained.crt is the chained certificate with server cert, intermediate certs and root CA cert)! To me this is inconsistent and strange behavior of openssl. The cert chain is correct, the last cert is in the trust store and openssl recognizes it both as a single cert and as a CAfile, but not when last in a chain. Is this a bug?