Monday, December 24, 2018

No trusted certificate found


What we are trying here ?
We are trying to do SSL handshake with Server using TLSv1.2 as minimum protocol version.

What happened ?
The below SSL handshake flow confirms that the certs produced by the Server are not found in our trusted repository.

Client hello ->
<-server font="" hello="">
<- certificate="" chain="" font="" server="">
Exception : No trusted cert found

What Needs to be done ?
Do enable SSL logging by following the Steps to enable SSL logging in JAVA.
On Start up logs you can find the trusted certs loaded from the trust store provided in you program, which will list down all the certs present in your truststore.

Trust Store Entries - Program Startup
adding as trusted cert:
  Subject: EMAILADDRESS=XXXX@XX.com, CN=QA Root CA, OU=Crypto Mgt, O="Test, Inc.", L=San Jose, ST=California, C=US
  Issuer:  EMAILADDRESS=XXXX@XX.com, CN=QA Root CA, OU=Crypto Mgt, O="Test, Inc.", L=San Jose, ST=California, C=US
  Algorithm: RSA; Serial number: 0xb53c709b41567e9d
  Valid from Tue Mar 26 23:08:23 IST 2013 until Sat Mar 20 23:08:23 IST 2038
Do check for your server certs submitted to you program like below sample SSL lines (*** - lines abstracted) and try to identify the cert submitted by server are exists in your trust store.

Server Cert Chain - SSL Handshake
*** ClientHello, TLSv1.2
***
*** ServerHello, TLSv1.2
***
*** Certificate chain
chain [0] = [
[
  Version: V3
  Subject: EMAILADDRESS=XXXX@XX.com, CN=QA Root CA, OU=Crypto Mgt, O="Test, Inc.", L=San Jose, ST=California, C=US