Reputation: 11935
I have a question about keytool..
I would to use this command:
keytool -importkeystore -srckeystore foo.jks -destkeystore foo.p12 -srcstoretype jks -deststoretype pkcs12
Can I don't specify the srckeystore? I need this request because I don't know my keystore that I use.. :) I created the certificate in this way:
keytool -genkey -alias myalias -keyalg RSA -keysize 2048
so, I don't have specified the keystore...In this way, Keytool which keystore will use?
Upvotes: 0
Views: 3193
Reputation: 12958
If you use the keytool
command to generate a keystore and you do not have a -keystore
option, it will create the keystore in the default location, which is the user's home directory. And the filename will be ".keystore".
For the -importkeystore
option, -srckeystore
is required, so you will have to give the path to the ".keystore" file that you created.
To avoid this confusion, when you create a new keystore, give it a known filename by using the -keystore
option.
For example:
keytool -genkey -alias myalias -keyalg RSA -keysize 2048 -keystore foo.jks
Now your command to convert it to a PKCS12 keystore should work.
For more details, see the keytool documentation.
Upvotes: 2
Reputation: 929
Never actually tried it but if my memory serves me right the default keystore is called keystore.jks
You can probably run the following to be sure;
keytool -v -list
and it should tell you the keystore type.
Upvotes: 0