io.vertx.core.net

## Interface KeyCertOptions

- All Known Implementing Classes:
    JksOptions, PemKeyCertOptions, PfxOptions

      public interface KeyCertOptions

  Key/cert configuration options.
  Author:
    Julien Viet

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `KeyCertOptions` | `clone()` Deprecated. use `copy()` instead
    `default KeyCertOptions` | `copy()`
    `default KeyManagerFactory` | `getKeyManagerFactory(Vertx vertx)` Create and return the key manager factory for these options.
    `default java.util.function.Function<String,X509KeyManager>` | `keyManagerMapper(Vertx vertx)` Returns a function that maps SNI server names to `X509KeyManager` instance.

- - ### Method Detail

    - #### clone

          @Deprecated
          KeyCertOptions clone()

      Deprecated. use `copy()` instead
      Returns:
        a copy of these options

    - #### copy

          default KeyCertOptions copy()

      Returns:
        a copy of these options

    - #### getKeyManagerFactory

          default KeyManagerFactory getKeyManagerFactory(Vertx vertx)
                                                  throws Exception

      Create and return the key manager factory for these options.

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

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

    - #### keyManagerMapper

          default java.util.function.Function<String,X509KeyManager> keyManagerMapper(Vertx vertx)
                                                                               throws Exception

      Returns a function that maps SNI server names to `X509KeyManager` instance. The returned `X509KeyManager` must satisfies these rules:
      - `X509KeyManager.getPrivateKey(String)` returns the private key for the indicated server name, the `alias` parameter will be `null`.
      - `X509KeyManager.getCertificateChain(String)` returns the certificate chain for the indicated server name, the `alias` parameter will be `null`.
      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 the default key manager provided by `getKeyManagerFactory(Vertx)` will be used.

      Throws:
        `Exception`

Copyright © 2020 Eclipse. All rights reserved.