Sunday, October 14, 2012

Mutual authentication in JBOSS


Run the commands below in the command prompt within default\conf directory. Copy keytool.exe, all the files in openssl/bin folder. 

Create a self signed client certificate
1).Create private key:

 openssl genrsa -des3 -out client.key 1024

2).Create a csr:

openssl req -new -key client.key -out client.csr –config openssl.cnf

3).Create the client certificate:

openssl x509 -req -days 365 -in client.csr -signkey client.key -out client.crt

            4). Convert client.key to client.pem 

openssl rsa -in client.key -out client.pem 

          5). Convert the certificate to .pfx

openssl pkcs12 -inkey client.pem -in client.crt -export -out    client.pfx

Go to internet explorer and import client.pfx. You will have to provide the password which you introduced when creating the pfx.  You can see it under personal certificates. Then you can save the client.crt inside server.keystore in default/conf. 


No comments:

Post a Comment