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

SunMSCAPI provider KeyStore.aliases() returns non unique aliases

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 7
    • Fix Version/s: None
    • Component/s: security-libs
    • Labels:

      Description

      FULL PRODUCT VERSION :


      ADDITIONAL OS VERSION INFORMATION :
      All Windows versions

      A DESCRIPTION OF THE PROBLEM :
      SunMSCAPI provider KeyStore.aliases() returns not unique aliases if we have two different certificates but this certificates have the same CN but different serial numbers

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Import to Windows-MY store two different certificates with the same CN but different serial number.
      Get aliases enumeration from store.
      Aliases are not unique.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      This code should return CN, issuer and serial number to uniquely identify certificates.
      ACTUAL -
      This code returns two times the same CN value which is not unique in this situation.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      KeyStore capi = KeyStore.getInstance("Windows-MY");
       capi.load(null, null);
              
       Enumeration<String> aliases = capi.aliases();
       while (aliases.hasMoreElements()) {
             String alias = (String) aliases.nextElement();
              System.out.println(alias);
      }
      ---------- END SOURCE ----------

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                coffeys Sean Coffey
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: