use of org.gudy.bouncycastle.asn1.x509.X509Extensions in project BiglyBT by BiglySoftware.
the class X509CertificateObject method getCriticalExtensionOIDs.
@Override
public Set getCriticalExtensionOIDs() {
if (this.getVersion() == 3) {
HashSet set = new HashSet();
X509Extensions extensions = c.getTBSCertificate().getExtensions();
if (extensions != null) {
Enumeration e = extensions.oids();
while (e.hasMoreElements()) {
DERObjectIdentifier oid = (DERObjectIdentifier) e.nextElement();
X509Extension ext = extensions.getExtension(oid);
if (ext.isCritical()) {
set.add(oid.getId());
}
}
return set;
}
}
return null;
}
use of org.gudy.bouncycastle.asn1.x509.X509Extensions in project BiglyBT by BiglySoftware.
the class X509V2AttributeCertificate method getExtensionOIDs.
private Set getExtensionOIDs(boolean critical) {
X509Extensions extensions = cert.getAcinfo().getExtensions();
if (extensions != null) {
Set set = new HashSet();
Enumeration e = extensions.oids();
while (e.hasMoreElements()) {
DERObjectIdentifier oid = (DERObjectIdentifier) e.nextElement();
X509Extension ext = extensions.getExtension(oid);
if (ext.isCritical() == critical) {
set.add(oid.getId());
}
}
return set;
}
return null;
}
Aggregations