Thursday, July 10, 2008

Exporting keystore private key with WSAS

Java keytool does not come up with an easy way of exporting keystore private key.

Following is an alternative way you can do it with WSAS.

First download WSAS from here.

Now, we need to create a keystore.

keytool -genkey -alias rpcert -keyalg RSA -keysize 1024 -dname "CN=identity-rp,L=SL,S=WS,C=LK" -keypass wso2key -keystore rpkeystore.jks -storepass wso2key

The above will create a keystore with the name rpkeystore.jks having wso2key as the keystore password and wso2key as the private key password.

Now, lets see how we can export our private key from the keystore just created, with WSAS.

1. Start WSAS and type https://localhost:9443 on your brower and sigin with admin/admin [user/password].


2. View available keystores

3. Upload your keystore [just created] - keystore password : wso2key

4. Private key password: wso2key

5. Click to finish

6. Click on the keystore rpkeystore.jks

7. Copy and paste your private key to a new file called server.key and that is your exported private key from the keystore.


Anonymous said...

HELP! When I try to run: keytool -genkey -alias rpcert -keyalg RSA -keysize 1024 -dname "CN=identity-rp,L=SL,S=WS,C=LK" -keypass wso2key -keystore rpkeystore.jks -storepass wso2key

This is what I get:
keytool is not recognized!!!!!

Prabath said...

keytool comes with JDK - make sure you set the Env variable PATH to C:\Program Files\Java\jdk1.5.0_06\bin.

You should find keytool at C:\Program Files\Java\jdk1.5.0_06\bin

- Prabath

anonymous said...

im using wso2wsas v3.0........i successfully added the key store by following the steps mentioned here ( im not able to click on the rpkeystore.jks after adding it and hence unable to get the server.key.........

any help..


Ritanshu Goel said...

what should i copy?there is no file to to perform step 7.

Subhasis said...

Hel I am constantly getting "Could not find or load main class Files" while attempting to start wso2. All environment variables are properly set.

Subhasis said...
This comment has been removed by the author.
caiyan said...

michael kors bags
red bottoms
cheap jordan shoes
coach factory outlet
polo ralph lauren men
coach outlet
bottega veneta
oakley vault
cheap ugg boots
lacoste shoes

Abel Ahar said...

for beginners like me need a lot of reading and searching for information on various blogs. and articles that you share a very nice and inspires me . cara menggugurkan kandungan

chenmeinv0 said...

ray ban outlet
ralph lauren
michael kors bags
louboutin outlet
stivali ugg
pandora charms
louis vuitton
adidas nmd
polo ralph lauren
christian louboutin sale

chenmeinv0 said...

adidas ultra boost shoes
beats by dre
nike cortez classic
true religion sale
replica rolex
ray ban wayfarer
toms shoes
michael kors purses
fitflops sale clearance
gucci outlet

Hua Cai said...

coach outlet
louis vuitton outlet
longchamp handbags
true religion uk
adidas wings shoes
oakley sunglasses wholesale
mulberry handbags sale
ralph lauren outlet
gucci outlet online

dong dong23 said...

pandora rings
louboutin pas cher
hermes outlet
clarks outlet
adidas trainers uk
asics outlet
christian louboutin
michael kors outlet
michael kors handbags outlet
nike outlet store