Package io.vertx.core.net
Interface KeyCertOptions
-
- All Known Implementing Classes:
JksOptions
,KeyStoreOptions
,KeyStoreOptionsBase
,PemKeyCertOptions
,PfxOptions
public interface KeyCertOptions
Key/cert configuration options.- Author:
- Julien Viet
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description KeyCertOptions
copy()
KeyManagerFactory
getKeyManagerFactory(Vertx vertx)
Create and return the key manager factory for these options.java.util.function.Function<String,KeyManagerFactory>
keyManagerFactoryMapper(Vertx vertx)
Returns a function that maps SNI server names toKeyManagerFactory
instance.static KeyCertOptions
wrap(KeyManagerFactory keyManagerFactory)
Returns aKeyCertOptions
from the providedKeyManagerFactory
static KeyCertOptions
wrap(X509KeyManager keyManager)
Returns aKeyCertOptions
from the providedX509KeyManager
-
-
-
Method Detail
-
copy
KeyCertOptions copy()
- Returns:
- a copy of these options
-
getKeyManagerFactory
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
-
keyManagerFactoryMapper
java.util.function.Function<String,KeyManagerFactory> keyManagerFactoryMapper(Vertx vertx) throws Exception
Returns a function that maps SNI server names toKeyManagerFactory
instance. The returnedKeyManagerFactory
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 returned function may return
null
in which case the default key manager provided bygetKeyManagerFactory(Vertx)
will be used.- Throws:
Exception
-
wrap
static KeyCertOptions wrap(X509KeyManager keyManager)
Returns aKeyCertOptions
from the providedX509KeyManager
- Parameters:
keyManager
- the keyManager instance- Returns:
- the
KeyCertOptions
-
wrap
static KeyCertOptions wrap(KeyManagerFactory keyManagerFactory)
Returns aKeyCertOptions
from the providedKeyManagerFactory
- Parameters:
keyManagerFactory
- the keyManagerFactory instance- Returns:
- the
KeyCertOptions
-
-