Interface CertificateChainValidator

All Known Implementing Classes:
DefaultCertificateChainValidator

public interface CertificateChainValidator
Checks the trust in the first element of a certificate chain.
Since:
1.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    validateCertificate(Certificate previousCert, Certificate cert, boolean isLast, boolean isAlreadyAuthorized)
    Asks this validator to check the given certificate, in the context of a certificate chain.
  • Method Details

    • validateCertificate

      boolean validateCertificate(Certificate previousCert, Certificate cert, boolean isLast, boolean isAlreadyAuthorized) throws CertificateException
      Asks this validator to check the given certificate, in the context of a certificate chain.

      For the first certificate in the chain (i.e. when previousCert is null), the validator will typically lookup for a Trust Anchor (known certificate that can be trusted) matching the issuer X500 DN embedded in the certificate to validate.

      Parameters:
      previousCert - the previous certificate in the chain, if any, or null.
      cert - the certificate to validate.
      isLast - true if this is the last certificate to validate in the chain.
      isAlreadyAuthorized - true if a previous certificate in the chain was already authorized.
      Returns:
      a boolean indicating if the subject of this certificate is trusted enough to authorize the Application. Returning true means that this subject is authorized and that the rest of the chain will be checked for validity only, not for authorization.
      Throws:
      CertificateException - if there was a technical problem validating this certificate. Check the cause to know more about the actual issue.