Interface CertificateValidator

All Known Implementing Classes:
CertificateValidator.InsecureCertificateValidator, DefaultClientCertificateValidator, DefaultServerCertificateValidator

public interface CertificateValidator
  • Method Details

    • validateCertificateChain

      void validateCertificateChain(List<X509Certificate> certificateChain, @Nullable String applicationUri, @Nullable String[] validHostnames) throws UaException
      Check that trust can be established using the provided certificate chain and then validate every certificate in the chain.

      The chain must begin with the end-entity certificate at index 0 followed by the remaining certificates in the chain, if any, in the correct order.

      Parameters:
      certificateChain - the certificate chain to validate.
      applicationUri - the applicationUri of the remote endpoint. Ignored if null.
      validHostnames - the valid hostnames for the remote endpoint. Ignored if null.
      Throws:
      UaException - if certificateChain is not trusted or validation fails.