io.vertx.core.spi.tls

## Interface SslContextFactory

- All Known Implementing Classes:
    DefaultSslContextFactory

      public interface SslContextFactory

  A factory for a Netty `SslContext`, the factory is configured with the fluent setters until `create()` to obtain a properly configured `SslContext`.
  Author:
    Julien Viet

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default SslContextFactory` | `applicationProtocols(List<String> applicationProtocols)` Set the application protocols to use when using ALPN.
    `default SslContextFactory` | `clientAuth(ClientAuth clientAuth)` Configures the client auth
    `SslContext` | `create()`
    `default SslContextFactory` | `enabledCipherSuites(Set<String> enabledCipherSuites)` Set the enabled cipher suites.
    `default SslContextFactory` | `forClient(boolean forClient)` Set whether to build a context for clients or for servers
    `default SslContextFactory` | `keyMananagerFactory(KeyManagerFactory kmf)` Set the key manager factory to use.
    `default SslContextFactory` | `serverName(String serverName)` Set the SNI server name.
    `default SslContextFactory` | `trustManagerFactory(TrustManagerFactory tmf)` Set the trust manager factory to use.
    `default SslContextFactory` | `useAlpn(boolean useAlpn)` Set whether to use ALPN.

- - ### Method Detail

    - #### useAlpn

          default SslContextFactory useAlpn(boolean useAlpn)

      Set whether to use ALPN.
      Parameters:
        `useAlpn` - `true` to use ALPN
      Returns:
        a reference to this, so the API can be used fluently

    - #### clientAuth

          default SslContextFactory clientAuth(ClientAuth clientAuth)

      Configures the client auth
      Parameters:
        `clientAuth` - the client auth to use
      Returns:
        a reference to this, so the API can be used fluently

    - #### forClient

          default SslContextFactory forClient(boolean forClient)

      Set whether to build a context for clients or for servers
      Parameters:
        `forClient` - `true` for client otherwise for servers
      Returns:
        a reference to this, so the API can be used fluently

    - #### keyMananagerFactory

          default SslContextFactory keyMananagerFactory(KeyManagerFactory kmf)

      Set the key manager factory to use.
      Parameters:
        `kmf` - the key manager factory instance
      Returns:
        a reference to this, so the API can be used fluently

    - #### trustManagerFactory

          default SslContextFactory trustManagerFactory(TrustManagerFactory tmf)

      Set the trust manager factory to use.
      Parameters:
        `tmf` - the trust manager factory instance
      Returns:
        a reference to this, so the API can be used fluently

    - #### enabledCipherSuites

          default SslContextFactory enabledCipherSuites(Set<String> enabledCipherSuites)

      Set the enabled cipher suites.
      Parameters:
        `enabledCipherSuites` - the set of cipher suites
      Returns:
        a reference to this, so the API can be used fluently

    - #### applicationProtocols

          default SslContextFactory applicationProtocols(List<String> applicationProtocols)

      Set the application protocols to use when using ALPN.
      Parameters:
        `applicationProtocols` - this list of application protocols
      Returns:
        a reference to this, so the API can be used fluently

    - #### serverName

          default SslContextFactory serverName(String serverName)

      Set the SNI server name.
      Parameters:
        `serverName` - the server name
      Returns:
        a reference to this, so the API can be used fluently

    - #### create

          SslContext create()
                     throws SSLException

      Returns:
        a configured `SslContext`
      Throws:
        `SSLException`

Copyright © 2024 Eclipse. All rights reserved.