How to export and import private key for signing.. urgent

Hey guys,

i have a web start application.

The jar file distrbibutes is signed

The following are the steps i have used for gen the cert

Following are the steps I have used for generating the certificate

keytool -genkey -alias abcd

Enter keystore password: passwd

What is your first and last name?

[Unknown]: abc

What is the name of your organizational unit?

[Unknown]: abc

What is the name of your organization?

[Unknown]: mycomp

What is the name of your City or Locality?

[Unknown]: madurai

What is the name of your State or Province?

[Unknown]: TN

What is the two-letter country code for this unit?

[Unknown]: IN

Is CN=abc, OU=abc, O=mycomp, L=madurai, ST=TN, C=IN c

orrect?

[no]: y

Enter key password for <abcd>

(RETURN if same as keystore password): passwd

keytool -export -alias abcd -rfc -file mycertifi.x509

Enter keystore password: passwd

Certificate stored in file <mycertifi.x509>

jarsigner -verbose myjar.jar abcd

Now i am able to sign with my system.

The problem is now i want to move this key and certificate to a different system so that i can sign the jar files from that system

Any ideas on how this can be done?

whether it is possible?

Please help require urgently...

Thanks in advance,

Balaji

[1439 byte] By [balajigovindana] at [2007-10-2 9:31:40]
# 1

It cannot be done with keytool. You have to write your own Java program that use the KeyStore class, or find some third-party software that does this for you. I do not know of any.

You can also try to hack the keys out of the keystore file. Google around for the format of this file, and also look at the source code for KeyStore and related classes.

ghstarka at 2007-7-16 23:38:04 > top of Java-index,Security,Other Security APIs, Tools, and Issues...
# 2
Can you copy the keystore to that system? If so, just use it on the target system with the keytool -keystore option.
ejpa at 2007-7-16 23:38:04 > top of Java-index,Security,Other Security APIs, Tools, and Issues...