Code example for X509Certificate

Methods: getTBSCertificate

0
        X509Certificate cert)
    { 
        try 
        { 
            return TBSCertificate.getInstance( 
                ASN1Primitive.fromByteArray(cert.getTBSCertificate()));
        } 
        catch (Exception e)
        { 
            throw new IllegalArgumentException(
                "can't extract TBS structure from this cert"); 
        } 
    } 
 
    static IssuerAndSerialNumber getIssuerAndSerialNumber(X509Certificate cert)
    { 
        TBSCertificate tbsCert = getTBSCertificateStructure(cert);
        return new IssuerAndSerialNumber(tbsCert.getIssuer(), tbsCert.getSerialNumber().getValue());
    } 
 
    private static ContentInfo readContentInfo(