Multiple certs with same alias in keystore causes problem
Posted on 2011-03-03
To load a certificate on my computer into java i can use the following code:
ks = KeyStore.getInstance("Windows-My");
X509Certificate cert = (X509Certificate)ks.getCertificate(aliasKey);
The problem is that there are multiple certificates in the store with the alias auth or sign, and by passing in "auth" i simply get the first one. Is there another way of doing this that can handle multiple certificates with same alias?