Code example for X509Certificate

Methods: getExtensionValue

0
        String          oid,
        boolean         critical,
        X509Certificate cert) 
        throws CertificateParsingException 
    { 
        byte[] extValue = cert.getExtensionValue(oid);
         
        if (extValue == null)
        { 
            throw new CertificateParsingException("extension " + oid + " not present");
        } 
         
        try 
        { 
            ASN1Encodable value = X509ExtensionUtil.fromExtensionValue(extValue);
     
            this.addExtension(oid, critical, value);
        } 
        catch (IOException e)
        { 
Contextual code suggestions in your IDE  Get Codota for Java