List of usage examples for org.bouncycastle.asn1.x509 AuthorityKeyIdentifier equals
public boolean equals(Object o)
From source file:mitm.common.security.crl.PKIXRevocationChecker.java
License:Open Source License
private boolean checkDeltaCRL_6_3_3_b(X509Certificate targetCertificate, X509CRL deltaCRL, X509CRL baseCRL) throws IOException { if (!X509CRLInspector.isDeltaCRL(deltaCRL)) { logger.debug("CRL is not a delta CRL."); return false; }//from w w w.j a v a 2 s . c om if (X509CRLInspector.isDeltaCRL(baseCRL)) { logger.debug("CRL is not a base CRL it's a delta CRL."); return false; } if (!deltaCRL.getIssuerX500Principal().equals(baseCRL.getIssuerX500Principal())) { logger.debug("Delta CRL issuer does not match Base CRL issuer."); return false; } IssuingDistributionPoint deltaIDP = X509CRLInspector.getIssuingDistributionPoint(deltaCRL); IssuingDistributionPoint baseIDP = X509CRLInspector.getIssuingDistributionPoint(baseCRL); if (baseIDP != null) { if (!baseIDP.equals(deltaIDP)) { logger.debug("The Base CRL has a non matching IssuingDistributionPoint."); return false; } } else { if (deltaIDP != null) { logger.debug("The Delta CRL has a non matching IssuingDistributionPoint."); return false; } } AuthorityKeyIdentifier baseAKI = X509CRLInspector.getAuthorityKeyIdentifier(baseCRL); AuthorityKeyIdentifier deltaAKI = X509CRLInspector.getAuthorityKeyIdentifier(deltaCRL); if (baseAKI != null) { if (!baseAKI.equals(deltaAKI)) { logger.debug("Base AuthorityKeyIdentifier does not match Delta AuthorityKeyIdentifier."); return false; } } else { if (deltaAKI != null) { logger.debug("Delta AuthorityKeyIdentifier does not match Base AuthorityKeyIdentifier."); return false; } } return true; }