io.vertx.core.net

## Interface TrustOptions

- All Known Implementing Classes:
    JksOptions, KeyStoreOptions, KeyStoreOptionsBase, PemTrustOptions, PfxOptions

      public interface TrustOptions

  Certification authority configuration options.
  Author:
    Julien Viet

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `TrustOptions` | `copy()`
    `TrustManagerFactory` | `getTrustManagerFactory(Vertx vertx)` Create and return the trust manager factory for these options.
    `java.util.function.Function<String,TrustManager[]>` | `trustManagerMapper(Vertx vertx)` Returns a function that maps SNI server names to a `TrustManagerFactory` instance.
    `static TrustOptions` | `wrap(TrustManager trustManager)` Returns a `TrustOptions` from the provided `TrustManager`
    `static TrustOptions` | `wrap(TrustManagerFactory trustManagerFactory)` Returns a `TrustOptions` from the provided `TrustManagerFactory`

- - ### Method Detail

    - #### copy

          TrustOptions copy()

      Returns:
        a copy of these options

    - #### getTrustManagerFactory

          TrustManagerFactory getTrustManagerFactory(Vertx vertx)
                                              throws Exception

      Create and return the trust manager factory for these options.

      The returned trust manager factory should be already initialized and ready to use.

      Parameters:
        `vertx` - the vertx instance
      Returns:
        the trust manager factory
      Throws:
        `Exception`

    - #### trustManagerMapper

          java.util.function.Function<String,TrustManager[]> trustManagerMapper(Vertx vertx)
                                                                         throws Exception

      Returns a function that maps SNI server names to a `TrustManagerFactory` instance. The returned `TrustManagerFactory` must already be initialized and ready to use. The mapper is only used when the server has SNI enabled and the client indicated a server name.

      The returned function may return `null` in which case `getTrustManagerFactory(Vertx)` is used as fallback.
      Parameters:
        `vertx` - the vertx instance
      Returns:
        the trustManager
      Throws:
        `Exception`

    - #### wrap

          static TrustOptions wrap(TrustManager trustManager)

      Returns a `TrustOptions` from the provided `TrustManager`
      Parameters:
        `trustManager` - the trustManager instance
      Returns:
        the `TrustOptions`

    - #### wrap

          static TrustOptions wrap(TrustManagerFactory trustManagerFactory)

      Returns a `TrustOptions` from the provided `TrustManagerFactory`
      Parameters:
        `trustManagerFactory` - the trustManagerFactory instance
      Returns:
        the `TrustOptions`

Copyright © 2023 Eclipse. All rights reserved.