self signed certificate in certificate chain

Hi,

I am using python to open an HTTPS connection to a server that is using a USERTrust certificate. My application is running on an Ubuntu server.

I am having a problem validating the HTTPS server’s certificate. Boiled it down to:


openssl s_client -connect <server_name>:443

The result contains this:


CONNECTED(00000003)
depth=2 C = US, ST = New Jersey, L = Jersey City, O = The USERTRUST Network, CN = USERTrust RSA Certification Authority
verify error:num=19:self signed certificate in certificate chain
verify return:0
---
Certificate chain
 0 s:<server details>
   i:/C=US/ST=MI/L=Ann Arbor/O=Internet2/OU=InCommon/CN=InCommon RSA Server CA
 1 s:/C=US/ST=MI/L=Ann Arbor/O=Internet2/OU=InCommon/CN=InCommon RSA Server CA
   i:/C=US/ST=New Jersey/L=Jersey City/O=The USERTRUST Network/CN=USERTrust RSA Certification Authority
 2 s:/C=US/ST=New Jersey/L=Jersey City/O=The USERTRUST Network/CN=USERTrust RSA Certification Authority
   i:/C=US/ST=New Jersey/L=Jersey City/O=The USERTRUST Network/CN=USERTrust RSA Certification Authority
...
...

My conclusion is that I need to add a USERTrust certificate on my server. If so, which one? If not, what can be the issue?

Thanks.

Hi adrukh,

Welcome to the forums!
Can you please have a look here? it seems it’s missing and/or failing to access an intermediate cert or missing Root CA on the system.