List of usage examples for org.bouncycastle.asn1.x509 IssuingDistributionPoint equals
public boolean equals(Object o)
From source file:mitm.common.security.crl.CRLStoreMaintainerImpl.java
License:Open Source License
private boolean isSameIDP(IssuingDistributionPoint idp, IssuingDistributionPoint otherIDP) { if (idp == otherIDP) { return true; }// w ww.j a v a 2 s. c o m if (idp != null && idp.equals(otherIDP)) { return true; } if (otherIDP != null && otherIDP.equals(idp)) { return true; } return false; }
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 ww .j a va 2s . com*/ 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; }