My servlet is deployed in jboss and my client is a simple java program, that communicates with the client. I have a few demo certificates. How should I add the certificates to the client and server. Remember My client is not a browser it is a java program.

link|improve this question
feedback

1 Answer

This is certainly non-trivial.

Since your client is a normal java program you have to look into JSSE http://docs.oracle.com/javase/7/docs/technotes/guides/security/jsse/JSSERefGuide.html to fully understand how to read a client certificate and make a connection with it. On the jboss side there should be documentation on how to install the server certificate, enable SSL and peer verification. If you are using tomcat as web container in jboss, check out http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html

I recommend the book "Cryptography in Java" which has a lot of examples, it helped me a lot.

If you don't need the certificate information in your programs, you could use a tunnel like stunnel to encrypt and authenticate the connection.

link|improve this answer
M:Can you please tell who is the author of the book 'Cryptography in java'. – Ashwin Feb 13 at 5:27
Can you please tell who is the author of the book 'Cryptography in java'? – Ashwin Feb 13 at 5:43
Author's name is David Hook, the book is published by Wrox in 2005 (a bit of time but still accurate) – AndreasM Feb 13 at 7:01
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.