I have two files:
mycer.cermykey.key
I need to create a SslContext to connect to another server via SSL using Java.
I'm trying to find out how I can create the SslContext object directly from those files.
This post may be duplicated, but I tried to find a clear explanation with an example to create the SslContext, but didn't find something clear.
Get a certificate in p12 format, as far I know you can not use cert file, there are utilities to do that (like openssl) or the source (from where you generated downloaded the certificate) can give you a p12 format.
And then check the below url, it should contain the information you want.
Java HTTPS client certificate authentication
Hopefully it helps!