Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

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.

share|improve this answer
    
M:Can you please tell who is the author of the book 'Cryptography in java'. –  Ashwin Feb 13 '12 at 5:27
    
Can you please tell who is the author of the book 'Cryptography in java'? –  Ashwin Feb 13 '12 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 '12 at 7:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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