SunMSCAPI more certificates with the same alias problem
Hi all,
I get the JDK 1.6.0 Beta and try to use new SunMSCAPI to work with certificates and keys from MS Crypto API. I have three private certificates from three different certificate authorities in my "MY" store. I read the certificates with this code:
KeyStore store = KeyStore.getInstance("Windows-MY");
Vector certificateVector =new java.util.Vector();
for (java.util.Enumeration e = store.aliases(); e.hasMoreElements();){
String alias = (String) e.nextElement();
X509Certificate cert = (X509Certificate) store.getCertificate(alias);
if (!store.isKeyEntry(alias))
continue;
certificateVector.add(certAlias);
}
My three certificates has the same alias and getting the certificate with getCertificate method returns the first certificate only.
So my question is - how is it possible to enumerate and read those certificates with the same alias from KeyStore?
Thanks.

