Top Description Methods
io.vertx.core.net

public Interface KeyCertOptions

Known Direct Implementers
io.vertx.core.net.KeyManagerFactoryOptions, io.vertx.core.net.KeyStoreOptionsBase, io.vertx.core.net.PemKeyCertOptions
Imports
io.vertx.core.Vertx, io.vertx.core.net.impl.KeyStoreHelper, javax.net.ssl.KeyManagerFactory, .X509KeyManager, java.util.function.Function

Key/cert configuration options.
Author
Julien Viet

Method Summary

Modifier and TypeMethod and Description
public KeyCertOptions

Returns:

a copy of these options
copy
()

public KeyManagerFactory

Returns:

the key manager factory
getKeyManagerFactory
(Vertx
the vertx instance
vertx
)

Create and return the key manager factory for these options.

public default Function<String, KeyManagerFactory>
keyManagerFactoryMapper(Vertx vertx)

Returns a function that maps SNI server names to KeyManagerFactory instance.

public default Function<String, X509KeyManager>
keyManagerMapper(Vertx vertx)
Deprecated instead use keyManagerFactoryMapper(Vertx)

Returns a function that maps SNI server names to X509KeyManager instance.

public static KeyCertOptions

Returns:

the KeyCertOptions
wrap
(X509KeyManager
the keyManager instance
keyManager
)

Returns a KeyCertOptions from the provided X509KeyManager

public static KeyCertOptions

Returns:

the KeyCertOptions
wrap
(KeyManagerFactory
the keyManagerFactory instance
keyManagerFactory
)

Returns a KeyCertOptions from the provided KeyManagerFactory

Method Detail

copyback to summary
public KeyCertOptions copy()
Returns:KeyCertOptions

a copy of these options

getKeyManagerFactoryback to summary
public 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:Vertx

the vertx instance

Returns:KeyManagerFactory

the key manager factory

keyManagerFactoryMapperback to summary
public default Function<String, KeyManagerFactory> keyManagerFactoryMapper(Vertx vertx) throws Exception

Returns a function that maps SNI server names to KeyManagerFactory instance. The returned KeyManagerFactory must satisfies these rules:

  • The store private key must match the indicated server name for a null alias.
  • The store certificate chain must match the indicated server name for a null alias.
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.

Implementation Specification

the default implementation converts they keyManagerMapper(Vertx) to a KeyManagerFactory

Implementation Note

the default implementation does not any caching, creating a KeyManagerFactory can be expense, implementations are encouraged to reimplement this method and cache the result

keyManagerMapperback to summary
public default Function<String, X509KeyManager> keyManagerMapper(Vertx vertx) throws Exception

Deprecated

instead use keyManagerFactoryMapper(Vertx)

Returns a function that maps SNI server names to X509KeyManager instance. The returned X509KeyManager must satisfies these rules:

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.

Annotations
@Deprecated
wrapback to summary
public static KeyCertOptions wrap(X509KeyManager keyManager)

Returns a KeyCertOptions from the provided X509KeyManager

Parameters
keyManager:X509KeyManager

the keyManager instance

Returns:KeyCertOptions

the KeyCertOptions

wrapback to summary
public static KeyCertOptions wrap(KeyManagerFactory keyManagerFactory)

Returns a KeyCertOptions from the provided KeyManagerFactory

Parameters
keyManagerFactory:KeyManagerFactory

the keyManagerFactory instance

Returns:KeyCertOptions

the KeyCertOptions