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

keytool uses a strange decoding on password entered at prompt

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P5 P5
    • None
    • 6
    • security-libs
    • None

      keytool (or, precisely, sun.security.util.Password.readPassword) decodes a password entered at a prompt in a very strange style, thus results in a char array which is different from what the user intends to enter (in the case of a non-ASCII password). So --

         $keytool -genkey ... -storepass non-ascii-password
         OK
         $keytool -list
         Enter password: non-ascii-password
         Sorry, cannot be loaded, bad password.

      This is quite embarrassing.

            weijun Weijun Wang
            weijun Weijun Wang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: