X509Extension.getNonCriticalExtensionOIDs

Gets a Set of the OID strings for the extension(s) marked NON-CRITICAL in the certificate/CRL managed by the object implementing this interface.

Here is sample code to get a Set of non-critical extensions from an X509CRL revoked certificate entry and print the OIDs: <pre>{@code CertificateFactory cf = null; X509CRL crl = null; try (InputStream inStrm = new FileInputStream("DER-encoded-CRL")) { cf = CertificateFactory.getInstance("X.509"); crl = (X509CRL)cf.generateCRL(inStrm); }

byte[] certData = <DER-encoded certificate data> ByteArrayInputStream bais = new ByteArrayInputStream(certData); X509Certificate cert = (X509Certificate)cf.generateCertificate(bais); X509CRLEntry badCert = crl.getRevokedCertificate(cert.getSerialNumber());

if (badCert !is null) { Set!string nonCritSet = badCert.getNonCriticalExtensionOIDs(); if (nonCritSet !is null) for (string oid : nonCritSet) { System.out.println(oid); } } }</pre>

@return a Set (or an empty Set if none are marked non-critical) of the extension OID strings for extensions that are marked non-critical. If there are no extensions present at all, then this method returns null.

interface X509Extension
Set!string
getNonCriticalExtensionOIDs
()

Meta