How to install certificates for REST services
SummaryThe requirement is to consume REST services in the project, and there is SSL for those services.
User need to have to install Certificates(Keystores and Truststores), but unable to find the exact location to install.
Steps to Reproduce
Consume REST service which has SSL configured.
ry to get the response.
You will see UnAuthenticated Error.
Provided the below suggestions:1.To make a certificate trusted by a JDK, it has to added to JRE's trust keystore.
2.To view the trusted certificate list, go to JRE's security folder (jre1.6.0_06\lib\security) and issue following command: keytool -list -keystore cacerts
3.To add a certificate in this list: keytool -import -alias mycert -keystore cacerts -file d:\mycert.cer.
4.The default password for cacerts is changeit.
One can setup both keystore and truststore via JVM arguments. This should help to accomplish two-way SSL.
Published January 31, 2016 - Updated October 8, 2020