configuring ssl in jboss
-
25-10-2019 - |
سؤال
My client is a standalone java program that wants to communicates with a servlet deployed on jboss in localhost. I want a https connection between them. Right now I am connecting using url connection on http. Till now I have created self signed certificate. I have used the following keytool commands.
keytool.exe -genkey -alias serverkey -keyalg RSA -storepass bigsecret -keypass bigsecret -dname "cn=localhost"
keytool.exe -export -rfc -alias serverkey -file server.cer -storepass bigsecret -keypass bigsecret
I am not able to proceed after this. I only want the server to send the certificate to the client(one way authentication). What changes should I make in the java code and where should I place these certificates in the jboss server and the client jre. Should I write a explicit code in the servlet to send the certificate during communication.
المحلول
You will find all the different use cases for using and setting up SSL here https://community.jboss.org/wiki/SSLSetup
In your case, you'll need to follow the instructions for use case 1 - SSL enabled on the server
Good luck!