Friday, September 28, 2007

Importing RSA certificate into tomcat/jboss keystore

First export the CA provided certificate individually into 3 different files (DOUBLE CLICK TO OPEN IT AND EXPORT ONE BY ONE - RIGHT CLICK -> All Tasks -> Export -> Next -> Base 64 -> File Name -> Finish)
  1. DOMAIN CERT
  2. CA INTERMEDIATE
  3. CA ROOT
  1. server-cert.crt (This file is the one that you got from CA after you had send your certificate request).
  2. verisign-intermediate-cert.crt (This you should get it from this location http://www.verisign.com/support/install2/intermediate.html assuming your CA is verisign).
  3. verisign-ca-cert.crt (This you should get it from this location (http://www.verisign.com/support/roots.html assuming your CA is verisign). Make sure you get the right CA. This depends upon the certificate you got so check with verisign for this.
  4. server-key.pem (This is the key file generated while creating the certificate request)
Step 1) Convert this to a pkc12 format
  • cat server-cert.crt verisign-intermediate-cert.crt verisign-ca-cert.crt > server-cert.txt This will concat all the files to one file.
  • now use openssl to change the format openssl pkcs12 -export -inkey server-key.pem -in server-cert.txt -out server-cert.pkcs12
This will create a pkcs12 format file with the cert and the key. Make sure you remember the password. I am using “changeit” for the password.

Step 2) Download IBM keyman utility and install the software (This is really cool tool that is very handy in managing the keystore)
Location : http://www.alphaworks.ibm.com/tech/keyman/download

Step 3) Creating the keystore using keyman.
  1. Start keyman tool and click “create new” and select “Keystore token” option.
  2. Click ‘File->Import’ and choose local resource and then select the “server-cert.pkcs12” file that we just created through openssl. You should see three certificates listed.
  3. Now its time to create the keystore. Click “File->Save” option and enter the keystore pass (“changeit”) and then the keystore name (“myfirstkeystore”) and you got the keystore. That’s it.

Note: The keystore is in JKS format not PKCS12 format.

Good Luck!!

Friday, April 06, 2007

Java + Spring + Ajax + DisplayTag + Hibernate

Found a post that helps in AJAX-ifying Displaytag.

http://javaboutique.internet.com/tutorials/ajaxlist/

It talks about usage of:
1. DisplayTag
2. dt-Source
3. AjaxTags
4. Spring Framework and
5. Hibernate Do check it out.