0

I am passing certificates in RestTemplate request header. I get 403 forbidden error. How can I display the certificate information at my end before I make a call to the web service? I am using below code to pass certificate in request header.

What is the right way to send a client certificate with every request made by the resttemplate in spring?

1 Answers1

0

Not sure about 403 as I'm newbie on certs & stuff, but for your other questions(I know this is late but might help someone who come across to this page) :

Java Keytool Commands for Checking :

keytool comes with JDK

If you need to check the information within a certificate, or Java keystore, use these commands.

Check a stand-alone certificate :

keytool -printcert -v -file mydomain.crt

Check which certificates are in a Java keystore :

keytool -list -v -keystore keystore.jks

Check a particular keystore entry using an alias :

keytool -list -v -keystore keystore.jks -alias mydomain

First, I would suggest to verify in your rest client whether you're able to access the rest endpoint or not by importing cert & key files:

https://www.getpostman.com/docs/v6/postman/sending_api_requests/certificates

Helpful links:

https://www.sslshopper.com/article-most-common-java-keytool-keystore-commands.html

whoami - fakeFaceTrueSoul
  • 17,086
  • 6
  • 32
  • 46