Code example for X509Certificate

Methods: getIssuerDN

0
        boolean valid = verifyDocumentSignature(aDocument, publicKey, aSignature);
        return valid;
    } 
 
    public boolean checkRevokedFromCrlFile(X509Certificate cert) throws CertificateException, FileNotFoundException, CRLException {
        String issuerDN = cert.getIssuerDN().getName();
        X509CRL crl = (X509CRL) this.crlMap.get(issuerDN);
        if (null == crl) {
            return false; 
        } 
        return crl.isRevoked(cert);
    } 
 
    public void verifyCertificationChain(Date dValidity, BigInteger[] certSerialNumber, X509Certificate[] certChain) throws Exception {
        Security.addProvider(new BouncyCastleProvider());
 
        X509Certificate cert = null;
        for (int i = 0; i < certSerialNumber.length; i++) {
            if (certSerialNumber[i].equals(certChain[0].getSerialNumber())) {
                cert = certChain[0];
                break;