-
Bug
-
Resolution: Fixed
-
P4
-
1.2.1
-
None
-
1.2.2
-
generic
-
generic
When an ill-formated -dname parameter is given to keytool when generating
a keypair, it fails with an OutOfMemoryError. An example dump
is given bellow.
anaf:/home/dh88095 8 % keytool -keystore mystore -genkey -alias dannyh -dname "a"
Enter keystore password: xxxxxx
Exception in thread "main" java.lang.OutOfMemoryError
at java.lang.StringBuffer.expandCapacity(Compiled Code)
at java.lang.StringBuffer.append(Compiled Code)
at sun.security.x509.AVA.<init>(Compiled Code)
at sun.security.x509.X500Name.parseRDN(Compiled Code)
at sun.security.x509.X500Name.parseDN(Compiled Code)
at sun.security.x509.X500Name.<init>(Compiled Code)
at sun.security.tools.KeyTool.doGenKeyPair(Compiled Code)
at sun.security.tools.KeyTool.doCommands(Compiled Code)
at sun.security.tools.KeyTool.run(Compiled Code)
at sun.security.tools.KeyTool.main(Compiled Code)
anaf:/home/dh88095 9 %
True, you have to be an idiot to give such a dn, but even idiots
deserve meaningfull error messages (and can use them more than
anyone else)
a keypair, it fails with an OutOfMemoryError. An example dump
is given bellow.
anaf:/home/dh88095 8 % keytool -keystore mystore -genkey -alias dannyh -dname "a"
Enter keystore password: xxxxxx
Exception in thread "main" java.lang.OutOfMemoryError
at java.lang.StringBuffer.expandCapacity(Compiled Code)
at java.lang.StringBuffer.append(Compiled Code)
at sun.security.x509.AVA.<init>(Compiled Code)
at sun.security.x509.X500Name.parseRDN(Compiled Code)
at sun.security.x509.X500Name.parseDN(Compiled Code)
at sun.security.x509.X500Name.<init>(Compiled Code)
at sun.security.tools.KeyTool.doGenKeyPair(Compiled Code)
at sun.security.tools.KeyTool.doCommands(Compiled Code)
at sun.security.tools.KeyTool.run(Compiled Code)
at sun.security.tools.KeyTool.main(Compiled Code)
anaf:/home/dh88095 9 %
True, you have to be an idiot to give such a dn, but even idiots
deserve meaningfull error messages (and can use them more than
anyone else)