FULL PRODUCT VERSION :
java version "1.6.0-rc"
Java(TM) SE Runtime Environment (build 1.6.0-rc-b101)
Java HotSpot(TM) Client VM (build 1.6.0-rc-b101, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Windows 2000 english fully patched
A DESCRIPTION OF THE PROBLEM :
The new keystore provider "MSCAPI" does not create uniqe aliase names if several keystore entries with the same subject are located in the windows certificate store.
In such a case only the first keystore entry can be accessed. The other keystore entries are inaccessible because the selection is performed by their alias - which is identical.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create/import two or more certificates with the same subject (or "Issued to" as it is called in windows) and import them into the windows personal certificate store.
Now load the MSCAPI provider and open the keystore "Windows-MY". Then enumerate through all aliases via java.security.KeyStore.aliases().
EXPECTED VERSUS ACTUAL BEHAVIOR :
The alias has to be unique within a keystore for allowing to accessing the correspondant keystore entry
The alias-enumeration contains two or more equal aliases
This bug can be reproduced always.