Code example for X509Certificate

Methods: getNotAftergetSubjectDN

0
    public PublicKey getPublicKey() { return x509Certificate.getPublicKey(); }
 
    Certificate(X509Certificate certificate) throws IOException {
        if (certificate != null) {
            this.x509Certificate = certificate;
            this.commonName = new X500Name(certificate.getSubjectDN().getName()).getCommonName();
            this.expirationDate = certificate.getNotAfter();
        } 
        else { 
            throw new IOException("Can not instantiate certificate object");
        } 
    } 
} 
Connect your IDE to all the code out there  Get Codota for Java