Class CertPathValidator


  • public class CertPathValidator
    extends Object
    This class provides the functionality for validating certification paths (certificate chains) establishing a trust chain from a certificate to a trust anchor.
    • Constructor Detail

      • CertPathValidator

        protected CertPathValidator​(CertPathValidatorSpi validatorSpi,
                                    Provider provider,
                                    String algorithm)
        Creates a new CertPathValidator instance.
        Parameters:
        validatorSpi - the implementation delegate.
        provider - the security provider.
        algorithm - the name of the algorithm.
    • Method Detail

      • getAlgorithm

        public final String getAlgorithm()
        Returns the certification path algorithm name.
        Returns:
        the certification path algorithm name.
      • getProvider

        public final Provider getProvider()
        Returns the security provider.
        Returns:
        the provider.
      • getInstance

        public static CertPathValidator getInstance​(String algorithm,
                                                    Provider provider)
                                             throws NoSuchAlgorithmException
        Returns a new certification path validator for the specified algorithm from the specified provider. The provider supplied does not have to be registered.
        Parameters:
        algorithm - the algorithm name.
        provider - the security provider name.
        Returns:
        a certification path validator for the requested algorithm.
        Throws:
        NoSuchAlgorithmException - if the specified provider cannot provide the requested algorithm.
        IllegalArgumentException - if provider == null
        NullPointerException - if algorithm is null.
      • getDefaultType

        public static final String getDefaultType()
        Returns the default CertPathValidator type from the Security Properties.
        Returns:
        the default CertPathValidator type from the Security Properties, or the string "PKIX" if it cannot be determined.