Reputation: 87
I've just downloaded Java and have created a keystore file (.ks) and certificate (.cer), and now want to create a .PFX using the .ks file. However, when I type the below at a command prompt, i get the error message shown.
c:\Program Files\Java\jre7\bin>keytool.exe -importkeystore -srckeystore C:\clien
ts\Client.ks -srcstorepass Password1 -destkeystore c:\private key file\Testfile.pf
x -deststorepass Password1 -deststoretype PKCS12 -srcalias Testfile
Illegal option: key
keytool -importkeystore [OPTION]...
Imports one or all entries from another keystore
Options:
-srckeystore <srckeystore> source keystore name
-destkeystore <destkeystore> destination keystore name
-srcstoretype <srcstoretype> source keystore type
-deststoretype <deststoretype> destination keystore type
-srcstorepass <arg> source keystore password
-deststorepass <arg> destination keystore password
-srcprotected source keystore password protected
-srcprovidername <srcprovidername> source keystore provider name
-destprovidername <destprovidername> destination keystore provider name
-srcalias <srcalias> source alias
-destalias <destalias> destination alias
-srckeypass <arg> source key password
-destkeypass <arg> destination key password
-noprompt do not prompt
-providerclass <providerclass> provider class name
-providerarg <arg> provider argument
-providerpath <pathlist> provider classpath
-v verbose output
Use "keytool -help" for all available commands
Can anyone see what I'm doing wrong?
I'm using 64bit Windows Server 2008 R2.
Many thanks
Paul
Upvotes: 1
Views: 1424
Reputation: 1246
your option -destkeystore c:\private key file\Testfile.pfx
contains a path with whitespaces which isn't valid in this context
this is why the word key is interpreted as an option, which obviously isn't a valid option
fix your path and the problem should be fixed
Upvotes: 1