Anthony Lucia
asked on
How to extract a private key cert from a nks (command line, instead of GUI)
I perform the following command from an exercise:
keytool -genkey -alias First_Java_Cert -keyalg RSA -keystore /home/first/keystore/keyst ore.jks -storepass passw0rd -dname "CN=first, O=IBM, C=GB" -keypass passw0rd
So I just created a certificate with both a private and public key using the keytool.
Now I perform the following:
keytool -export -keystore /home/first/keystore/keyst ore.jks -storepass passw0rd -alias First_Java_Cert -file /home/import/First_Java_Ce rt.cer
This extracts a certificate with a public key.
(Am I correct in my assumptions so far?)
So using a command line program (non-GUI) that would come with either Windows or Java, could someone please post how to extract a private key from the .jks
Thanks
keytool -genkey -alias First_Java_Cert -keyalg RSA -keystore /home/first/keystore/keyst
So I just created a certificate with both a private and public key using the keytool.
Now I perform the following:
keytool -export -keystore /home/first/keystore/keyst
This extracts a certificate with a public key.
(Am I correct in my assumptions so far?)
So using a command line program (non-GUI) that would come with either Windows or Java, could someone please post how to extract a private key from the .jks
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
So if I use nocerts, it will output ONLY the private key, without an encompassing certificate ?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Open in new window
Regarding the option -nocerts, Does this mean that a private key does not have a certificate (Does the above command not extract a cert)
Also stated:
Open in new window
Regarding the option -nokeys, why does it say -nokeys, when you are clearly exporting a public key ?