As a client I want to create a TLS1.2 connection to a URL (SOAP Endpoint) in Java.
I have been provided with a PFX file and a password for that file.
I am not sure whether I need to import the PFX file into the truststore or a keystore and how to do this?
What does the code look like to create the connection?
This question is similar but doesn't address how to get the pfx file into the java key system:
Java HttpsURLConnection and TLS 1.2
I did successfully manage to run:
keytool -importkeystore -srckeystore client.pfx -srcstorestype pkcs12
-destkeystore clientcert.jks -deststoretype jks
Which has made a clientcert.jks
Ultimately I will be doing mutual TLS with the server, but as a starting point answers to these question will be helpful.
I have the server certificate too.