Class ExplicitKeyTrustEvaluator


  • public class ExplicitKeyTrustEvaluator
    extends Object
    Auxillary trust evaluator for evaluating an untrusted key or credential against a trusted key or credential. Trust is established if the untrusted key (a public key or symmetric key from the untrusted credential) matches one of the trusted keys supplied.
    • Field Detail

      • log

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

      • ExplicitKeyTrustEvaluator

        public ExplicitKeyTrustEvaluator()
    • Method Detail

      • validate

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

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

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

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