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

Aliases from Microsoft CryptoAPI has bad character encoding

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 20
    • 6
    • security-libs
    • b06
    • x86
    • windows_xp
    • Verified

    Description

      FULL PRODUCT VERSION :
      java version "1.6.0"
      Java(TM) SE Runtime Environment (build 1.6.0-b105)
      Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Windows XP

      A DESCRIPTION OF THE PROBLEM :
      When you store a certificate with name containing interpunction (e.g. in Windows-1250) Java prints bad characters when printing aliases from the Windows-MY or Windows-ROOT keystores.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Store a certificate with name containing non-ASCII characters. You can use codepage win-1250 for that for example.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      All certificates with non-ASCII characters are displayed OK in the Windows CryptoAPI management programs. Java should convert them to UTF internal string representation.
      ACTUAL -
      There are bad characters in the Java Strings types (nonprintable characters that are generated by bad conversion e.g. Windows-1250 -> UTF-16).

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      KeyStore ks = KeyStore.getInstance("Windows-MY");
      ks.load(null, null);

      // now print all aliases - bad characters for non-ASCII entries
      Enumeration e = ks.aliases();
      while (e.hasNextEntry()) {
        System.out.println("" + e.nextEntry());
      }
      ---------- END SOURCE ----------

      Attachments

        Issue Links

          Activity

            People

              weijun Weijun Wang
              ryeung Roger Yeung (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: