I'm not sure why this error is being generated, since I am typing in a password, any idea what is wrong?
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Jon>keytool -genkeypair -v -protected -alias jon -file
What is your first and last name?
[Unknown]: Jon C.
What is the name of your organizational unit?
What is the name of your organization?
What is the name of your City or Locality?
What is the name of your State or Province?
What is the two-letter country code for this unit?
Is CN=Jon C., OU=@Jon's, O=@Jon's, L=Birkirkara, ST=Malta(EU), C=MT correct?
Generating 1,024 bit DSA key pair and self-signed certificate (SHA1withDSA) with
a validity of 90 days
for: CN=Jon C., OU=@Jon's, O=@Jon's, L=Birkirkara, ST=Malta(EU), C=MT
Enter key password for <jon>
(RETURN if same as keystore password):
Re-enter new password:
[Storing C:\Documents and Settings\Jon\.keystore]
keytool error: java.lang.IllegalArgumentException: password can't be null
java.lang.IllegalArgumentException: password can't be null at sun.security.provider.JavaKeyStore.engineStore(JavaKeyStore.java:508)
Campbell Ritchie wrote:Who wrote the key generating software? How does it receive its password?
I typed the password..
Joined: Oct 13, 2005
That doesn't answer my question. How does the password get from your terminal/command line to the program? Can you get it to echo the password, or print it to an option pane or something? Then you can verify that the password actually reaches your application.
C:\Documents and Settings\Jon>keytool -genkeypair -alias jon -file key.file -sto
repasswd -new j1misdead
keytool error: java.lang.Exception: Keystore file does not exist: C:\Documents a
C:\Documents and Settings\Jon>java -version
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) Client VM (build 20.0-b11, mixed mode, sharing)
C:\Documents and Settings\Jon>
Joined: Aug 05, 2005
Jon Camilleri wrote:I see more options:
keytool has a number of sub-options and each of these suboptions has a number of options.
Each blank line separated block in your output is a suboption followed by its options.
You are trying to generate a key pair using the genkeypair suboption and only the options shown within that block (i.e. what Andrew posted) are allowed.
Two of those options are -keypass and -storepass which allow you to specify passwords. You'll need to check the keytool documentation to find which you need to use.
Note that it is -storepass, not storepasswd (that is a separate suboption).
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: [error] keytool error: java.lang.IllegalArgumentException: password can't be null