Categories:
DH Keys (39)
DSA Keys (72)
EC Keys (333)
Firefox (32)
General (13)
Google Chrome (25)
Intermediate CA (152)
Java VM (20)
JDK Keytool (25)
Microsoft CertUtil (26)
Mozilla CertUtil (18)
OpenSSL (237)
Other (17)
Portecle (38)
Publishers (1862)
Revoked Certificates (30)
Root CA (87)
RSA Keys (2173)
Tools (47)
Tutorial (7)
What Is (21)
Windows (129)
Collections:
Other Resources:
"keytool -genkeypair" Command Examples - Generate Key Pair
How to use the "keytool -genkeypair" command? I want to generate a pair of public key and private key for myself.
✍: FYIcenter.com
Here is an example of using "keytool -genkeypair" command to generate a pair of public key and private key for yourself:
C:\Users\fyicenter>"\Program Files\java\jre7\bin\keytool" -genkeypair -dname CN=www.fyicenter.com -storepass FYIcenter -keypass FYIcenter
What this command did for you:
If you run the command again, you should get an error, because Keytool can not add another entry with the same alias name "mykey" in the same keystore file.
C:\Users\fyicenter>"\Program Files\java\jre7\bin\keytool" -genkeypair -dname CN=www.fyicenter.com -storepass FYIcenter -keypass FYIcenter keytool error: java.lang.Exception: Key pair not generated, alias <mykey> already exists
To create another key pair in the same keystore file, use the "-alias" to provide a new name:
C:\Users\fyicenter>"\Program Files\java\jre7\bin\keytool" -genkeypair -dname CN=jar.fyicenter.com -storepass FYIcenter -keypass FYIcenter -alias 2ndkey
2012-07-19, 18682👍, 0💬
Popular Posts:
How to parse a DER file using the OpenSSL "ans1parse" command? You can parse a DER file with OpenSSL...
Certificate Summary: Subject: Certum Trusted Network CA Issuer: Certum Trusted Network CA Expiration...
How to calculate the subject key identifier of a certificate uisng OpenSSL commands? I want to see i...
How to add a root CA certificate into "cert8.db" file using Mozilla "certutil" tool? I have exported...
Certificate Summary: Subject: www.amazon.cn Issuer: VeriSign Class 3 Secure Server CA - G3 Expiratio...