2

I saw that there were already questions about converting files to Java KeyStore,

But I can not find any clear answer on what needs to be run a rest API request from Java code.

I think it will really help everyone if there is a clear answer - step by step because this issue is not really clear. thanks.

Gavriel Cohen
  • 4,355
  • 34
  • 39
  • How about you add the parts which steps you think are already clear and which might need improvement. You could altough link the anwers you find useful on this topic. – Björn Böing Mar 11 '19 at 14:36
  • Possible duplicate of https://stackoverflow.com/questions/21223084/how-do-i-use-an-ssl-client-certificate-with-apache-httpclient – Prasann Mar 11 '19 at 14:55
  • @Prasann, The link you brought has only references for the code but it is very difficult to understand what needs to be done with the files (cer, key) – Gavriel Cohen Mar 11 '19 at 15:13
  • @Prasann, (I will try to build a clear answer based on your link, if I can maybe add it there and delete the question), but I still think it would be helpful if there is a detailed explanation here step by step. In addition, I see that more people have done up vote probably this is important, thx – Gavriel Cohen Mar 11 '19 at 15:21
  • 1
    @GavrielCohen, `.cer` is a certificate and `.jks` is a keystore. Look at https://www.quora.com/Whats-the-difference-between-a-jks-and-a-cer-certificate-file-Is-it-possible-to-convert-from-one-to-the-other to understand the difference between the two. While invoking a service over SSL, you have 2 options. 1) Use a JKS file o explicily specify the certificate to use or 2) Add the certificate in cacerts and invoke the service normally without needing o specify the certificate. `cacerts` is the java truststore – Prasann Mar 11 '19 at 15:22
  • @Prasann, Thank you on your comment – Gavriel Cohen Mar 12 '19 at 16:05

0 Answers0