I am trying to contact a service over https using RestTemplate. I have got their crt and I added it to java cacerts truststore and everything worked.
But now If I wanted to remove it from cacerts and add it to my a trust store that exist in resource folder
so I have the following in the properties file
server.ssl.trust-store=classpath:service1.truststore
server.ssl.trust-store-password={pass}
I added the crt to service1.truststore
This does not work..... I get
SunCertPathBuilderException: unable to find valid certification path to requested target
Can someone explain the difference here between adding the cert to my truststore vs cacerts?
I have the same CAs in both truststores.