use of com.github.zhenwei.provider.jce.provider.X509AttrCertParser in project LinLong-Java by zhenwei1108.
the class LDAPStoreHelper method createAttributeCertificates.
private Set createAttributeCertificates(List list, X509AttributeCertStoreSelector xselector) throws StoreException {
Set certSet = new HashSet();
Iterator it = list.iterator();
X509AttrCertParser parser = new X509AttrCertParser();
while (it.hasNext()) {
try {
parser.engineInit(new ByteArrayInputStream((byte[]) it.next()));
X509AttributeCertificate cert = (X509AttributeCertificate) parser.engineRead();
if (xselector.match((Object) cert)) {
certSet.add(cert);
}
} catch (StreamParsingException e) {
}
}
return certSet;
}
Aggregations