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

REGRESSION: keytool corrupts password entered on prompt

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 5.0, 5.0u2
    • Fix Version/s: 6
    • Component/s: security-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      beta
    • CPU:
      generic, sparc
    • OS:
      solaris_9

      Backports

        Description

        Found with J2SE 1.5.0 FCS (b64).

        Steps to reproduce:
        - generate key using
          keytool -genkey -alias MyAlias -keystore ./keystore
          type in infos for dname and choose some passwords
        - list the keys (optional)
          keytool -list -keystore ./keystore
        - try to clone key
          keytool -keyclone -alias MyAlias -keystore ./keystore
          you will be prompted for keystore password which passes OK, then for key
          password which fails. See "conversation" bellow.

        jt146064@sr-eprg05-01:~/tmp/keytooltest>java -version
        java version "1.5.0"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
        Java HotSpot(TM) Server VM (build 1.5.0-b64, mixed mode)
        jt146064@sr-eprg05-01:~/tmp/keytooltest>which java
        /home/jt146064/java/bin/java
        jt146064@sr-eprg05-01:~/tmp/keytooltest>which keytool
        /home/jt146064/java/bin/keytool
        jt146064@sr-eprg05-01:~/tmp/keytooltest>keytool -genkey -alias MyAlias -keystore ./keystore
        Enter keystore password: jt146064
        What is your first and last name?
          [Unknown]: Jiri Tusla
        What is the name of your organizational unit?
          [Unknown]: G11n
        What is the name of your organization?
          [Unknown]: SMI
        What is the name of your City or Locality?
          [Unknown]: Prague
        What is the name of your State or Province?
          [Unknown]: Czech Rep.
        What is the two-letter country code for this unit?
          [Unknown]: CZ
        Is CN=Jiri Tusla, OU=G11n, O=SMI, L=Prague, ST=Czech Rep., C=CZ correct?
          [no]: yes

        Enter key password for <MyAlias>
                (RETURN if same as keystore password): prague_g11n
        jt146064@sr-eprg05-01:~/tmp/keytooltest>keytool -list -keystore ./keystore
        Enter keystore password: jt146064

        Keystore type: jks
        Keystore provider: SUN

        Your keystore contains 1 entry

        myalias, Oct 13, 2004, keyEntry,
        Certificate fingerprint (MD5): 49:DB:62:B6:79:D6:97:61:C9:11:23:B0:0B:1D:B5:2F
        jt146064@sr-eprg05-01:~/tmp/keytooltest>keytool -keyclone -alias MyAlias -dest SCTAlias -keystore ./keystore
        Enter keystore password: jt146064
        Enter key password for <MyAlias>prague_g11n
        keytool error: java.security.UnrecoverableKeyException: Cannot recover key
        jt146064@sr-eprg05-01:~/tmp/keytooltest>
        ###@###.### 10/13/04 10:50 GMT

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                vinnie Vincent Ryan
                Reporter:
                jtusla Jiri Tusla (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: