[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: X.509 with java CertStore
Hi,
Did you ever solve this issue as I am having the exact same problem.
Regards,
Simon
Trebor Iksrazal wrote:
> I am able to search for userCertificate;binary and
>convert to the X509Certificate class. However, I
>cannot use CertStore as I must have a problem with
>X509CertSelector.setSubject because it cannot find the
>entry. Perhaps my schema is not RFC 2587 compliant?
...
> 5) I cannot find the cert via X509CertSelector :
>final static String newContext =
>"cn=Robertc,o=Magna,c=US";
>LDAPCertStoreParameters lcsp = new
>LDAPCertStoreParameters("localhost", 389);
> CertStore cs = CertStore.getInstance("LDAP",
>lcsp);
> X509CertSelector xcs = new X509CertSelector();
> xcs.setSubject(newContext);
> Collection certs = cs.getCertificates(xcs);
> if (certs.isEmpty())
> {
> throw new Exception("can't find cert");
> }