I have to create a client in java that makes a https connection to a server. I have my certificate that i use with my browser to log into the web site. How can i use the same certificate on my java client? Should i add it to the Keystore?
Thank you
New information: Server and Client are both in the same host -> localhost The Client has to make a request to https:// localhost:8183 I create the user's certificate typing:
$ ./build-key fg1
$ openssl pkcs12 -export -out fg1.pfx -inkey fg1.key -in fg1.crt -certfile ca.crt -name default
then i did
$ keytool -importkeystore -srckeystore fg1.pfx -srcstoretype pkcs12 -destkeystore VEPClientRestKeyStore.jks -srcalias default -destalias fg1 -destkeypass <mypassword>
Now i'm really lost.HOw can i use this keystore to connect to server and make requests? Thank you again.