Interface TrustProvider

All Known Implementing Classes:
InsecureTls, PlatformTrustProvider, TrustStore

public interface TrustProvider
A TrustProvider is a source of trust anchors used to determine whether a certificate present by a peer is trusted.
  • In the TLS client role, it is used to validate that the server's certificate is trusted. If the trust provider is omitted platform trust is used instead.
  • In the TLS server role, when the TLS client authentication is in use, it is used by the server to ensure that the client's certificate is known.
  • Method Details

    • accept

      <T> T accept(TrustProviderVisitor<T> visitor)
      Visits the trust provider TrustProviderVisitor. Implementor should call one `visit` method on visitor.
      Parameters:
      visitor - visitor.
    • trustOptions

      @Nullable default TrustOptions trustOptions()
      Trust options that apply to this TLS peer..
      Returns:
      trust options