Sunday, August 25, 2013

keytool error AVA format

I run this command:

keytool -genkeypair -alias alias -keyalg RSA -keysize 1024 -dname dn -keystore keystore

and this fails with "keytool error AVA format"

Just remove -dname:
keytool -genkeypair -alias alias -keyalg RSA -keysize 1024 -keystore keystore

and answer all questions directly, and you will be fine. Otherwise, provide a proper dname, like "CN=Mark Smith, OU=JavaSoft, O=Sun, L=Cupertino, S=California, C=US". For details, see the EXCELLENT (when everything else fails, read the manual). Especially, avoid funny characters in the dname, including . or $ or #

No comments: