[openssl-dev] [openssl.org #4166] Bug: OpenSSL 1.0.1l fails to verify SOME root CAs: error:num=20:unable to get local issuer certificate

Oliver Schonrock via RT rt at openssl.org
Fri Dec 4 15:25:35 UTC 2015


The openssl in FreeBSD 10.1-RELEASE (amd64) (OpenSSL 1.0.1l) fails to
verify some server certificates using
/usr/local/share/certs/ca-root-nss.crt. FreeBSD 10.2 works fine. I
suspect this is an issue with openssl rather than FreeBSD.

To Reproduce:
$ openssl s_client -connect api.textmarketer.co.uk:443
depth=2 C = US, O = "thawte, Inc.", OU = Certification Services
Division, OU = "(c) 2006 thawte, Inc. - For authorized use only", CN =
thawte Primary Root CA
verify error:num=20:unable to get local issuer certificate
...

The same command on FreeBSD 10.2 (OpenSSL 1.0.1p) results in:
$ openssl s_client -connect api.textmarketer.co.uk:443
depth=2 C = US, O = "thawte, Inc.", OU = Certification Services
Division, OU = "(c) 2006 thawte, Inc. - For authorized use only", CN =
thawte Primary Root CA
verify return:1
...

This error message is widely reported as being due to path issues to the
CA bundle. In fact on FreeBSD 10.1 a similar command even fails to
verify other server certs with a different root CA:

$ openssl s_client -connect google.com:443
depth=3 C = US, O = Equifax, OU = Equifax Secure Certificate Authority
verify error:num=20:unable to get local issuer certificate

However the google.com Equifax secure root CA can be made to work with
10.1 if you specify the -CAfile

$ openssl s_client -CAfile /usr/local/share/certs/ca-root-nss.crt -connect
google.com:443
depth=3 C = US, O = Equifax, OU = Equifax Secure Certificate Authority
verify return:1

This is NOT the case for the original Thawte example:

$ openssl s_client -CAfile /usr/local/share/certs/ca-root-nss.crt
-connect api.textmarketer.co.uk:443
depth=2 C = US, O = "thawte, Inc.", OU = Certification Services
Division, OU = "(c) 2006 thawte, Inc. - For authorized use only", CN =
thawte Primary Root CA
verify error:num=20:unable to get local issuer certificate

On FreeBSD 10.2 all CA root certs tested verify fine, with the default
install without the need for CAfile.

Having to pass -CAfile might be acceptable, as this is just a "packaging
and OS integration issue on paths", however the fact that even with the
correct -CAfile SOME root certs do NOT verify, leads me to believe that
something more fundamental is broken with the openssl version in FreeBSD
10.1, which is:
OpenSSL 1.0.1l-freebsd 15 Jan 2015

This was tested and verified on a clean install of 10.1-RELEASE.

-- 
Oliver Schönrock



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://mta.openssl.org/pipermail/openssl-dev/attachments/20151204/c32a4a33/attachment.sig>
-------------- next part --------------
_______________________________________________
openssl-bugs-mod mailing list
openssl-bugs-mod at openssl.org
https://mta.openssl.org/mailman/listinfo/openssl-bugs-mod


More information about the openssl-dev mailing list