Class ExplicitX509CertificateTrustEvaluator


  • public class ExplicitX509CertificateTrustEvaluator
    extends Object
    Auxillary trust evaluator for evaluating an untrusted X509 certificate or credential against a trusted certificate or credential. Trust is established if the untrusted certificate supplied (or the certificate obtained from the untrusted credential's X509Credential.getEntityCertificate()) matches one of the trusted certificates supplied.
    • Field Detail

      • log

        private final org.slf4j.Logger log
        Class logger.
    • Constructor Detail

      • ExplicitX509CertificateTrustEvaluator

        public ExplicitX509CertificateTrustEvaluator()
    • Method Detail

      • validate

        public boolean validate​(@Nonnull
                                X509Certificate untrustedCertificate,
                                @Nonnull
                                X509Certificate trustedCertificate)
        Evaluate trust.
        Parameters:
        untrustedCertificate - the untrusted certificate to evaluate
        trustedCertificate - basis for trust
        Returns:
        true if trust can be established, false otherwise
      • validate

        public boolean validate​(@Nonnull
                                X509Certificate untrustedCertificate,
                                @Nonnull
                                Iterable<X509Certificate> trustedCertificates)
        Evaluate trust.
        Parameters:
        untrustedCertificate - the untrusted certificate to evaluate
        trustedCertificates - basis for trust
        Returns:
        true if trust can be established, false otherwise
      • validate

        public boolean validate​(@Nonnull
                                X509Credential untrustedCredential,
                                @Nonnull
                                X509Credential trustedCredential)
        Evaluate trust.
        Parameters:
        untrustedCredential - the untrusted X509Credential to evaluate
        trustedCredential - basis for trust
        Returns:
        true if trust can be established, false otherwise
      • validate

        public boolean validate​(@Nonnull
                                X509Credential untrustedCredential,
                                @Nonnull
                                Iterable<Credential> trustedCredentials)
        Evaluate trust.
        Parameters:
        untrustedCredential - the untrusted X509Credential to evaluate
        trustedCredentials - basis for trust
        Returns:
        true if trust can be established, false otherwise