Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4261254

keytool fails with irrelevant message when receivein an illformated -dname param

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 1.2.2
    • 1.2.1
    • security-libs
    • None
    • 1.2.2
    • generic
    • generic

    Description

      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)

      Attachments

        Activity

          People

            jlueheorcl Jan Luehe (Inactive)
            dhendlersunw Danny Hendler (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: