Class BinaryCertChainValidator

    • Constructor Detail

      • BinaryCertChainValidator

        public BinaryCertChainValidator​(boolean acceptAll)
        Parameters:
        acceptAll - if true then all validations will succeed. If false all will fail.
    • Method Detail

      • validate

        public ValidationResult validate​(java.security.cert.CertPath certPath)
        Performs validation of a provided certificate path.
        Specified by:
        validate in interface X509CertChainValidator
        Parameters:
        certPath - to be validated
        Returns:
        result of validation
      • validate

        public ValidationResult validate​(java.security.cert.X509Certificate[] certChain)
        Performs validation of a provided certificate chain.
        Specified by:
        validate in interface X509CertChainValidator
        Parameters:
        certChain - to be validated
        Returns:
        result of validation
      • getTrustedIssuers

        public java.security.cert.X509Certificate[] getTrustedIssuers()
        Returns a list of trusted issuers of certificates.
        Specified by:
        getTrustedIssuers in interface X509CertChainValidator
        Returns:
        array containing trusted issuers' certificates
      • addValidationListener

        public void addValidationListener​(ValidationErrorListener listener)
        Registers a listener which can react to errors found during certificate validation. It is useful in two cases: (rarely) if you want to change the default logic of the validator and if you will use the validator indirectly (e.g. to validate SSL socket connections) and want to get the original ValidationError, not the exception.
        Specified by:
        addValidationListener in interface X509CertChainValidator
        Parameters:
        listener - to be registered
      • addUpdateListener

        public void addUpdateListener​(StoreUpdateListener listener)
        Registers a listener which can react to errors found during refreshing of the trust material: trusted CAs or CRLs. This method is useful only if the implementation supports updating of CAs or CRLs, otherwise the listener will not be invoked.
        Specified by:
        addUpdateListener in interface X509CertChainValidator
        Parameters:
        listener - to be registered
      • removeUpdateListener

        public void removeUpdateListener​(StoreUpdateListener listener)
        Unregisters a previously registered CA or CRL update listener. If the listener was not registered then the method does nothing.
        Specified by:
        removeUpdateListener in interface X509CertChainValidator
        Parameters:
        listener - to be unregistered