public abstract class KeyStoreOptionsBase extends Object implements KeyCertOptions, TrustOptions
KeyStore based options.| Modifier | Constructor and Description |
|---|---|
protected |
KeyStoreOptionsBase()
Default constructor
|
protected |
KeyStoreOptionsBase(KeyStoreOptionsBase other)
Copy constructor
|
| Modifier and Type | Method and Description |
|---|---|
abstract KeyStoreOptionsBase |
copy() |
KeyManagerFactory |
getKeyManagerFactory(Vertx vertx)
Create and return the key manager factory for these options.
|
String |
getPassword() |
String |
getPath()
Get the path to the ksy store
|
protected String |
getProvider() |
TrustManagerFactory |
getTrustManagerFactory(Vertx vertx)
Create and return the trust manager factory for these options.
|
protected String |
getType() |
Buffer |
getValue()
Get the key store as a buffer
|
java.util.function.Function<String,X509KeyManager> |
keyManagerMapper(Vertx vertx)
Returns a function that maps SNI server names to
X509KeyManager instance. |
KeyStore |
loadKeyStore(Vertx vertx)
Load and return a Java keystore.
|
KeyStoreOptionsBase |
setPassword(String password)
Set the password for the key store
|
KeyStoreOptionsBase |
setPath(String path)
Set the path to the key store
|
protected KeyStoreOptionsBase |
setProvider(String provider) |
protected KeyStoreOptionsBase |
setType(String type) |
KeyStoreOptionsBase |
setValue(Buffer value)
Set the key store as a buffer
|
java.util.function.Function<String,TrustManager[]> |
trustManagerMapper(Vertx vertx)
Returns a function that maps SNI server names to a
TrustManagerFactory instance. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwrapwrapprotected KeyStoreOptionsBase()
protected KeyStoreOptionsBase(KeyStoreOptionsBase other)
other - the options to copyprotected String getType()
protected KeyStoreOptionsBase setType(String type)
protected String getProvider()
protected KeyStoreOptionsBase setProvider(String provider)
public String getPassword()
public KeyStoreOptionsBase setPassword(String password)
password - the passwordpublic String getPath()
public KeyStoreOptionsBase setPath(String path)
path - the pathpublic Buffer getValue()
public KeyStoreOptionsBase setValue(Buffer value)
value - the key store as a bufferpublic KeyStore loadKeyStore(Vertx vertx) throws Exception
vertx - the vertx instanceKeyStoreExceptionpublic KeyManagerFactory getKeyManagerFactory(Vertx vertx) throws Exception
KeyCertOptionsThe returned key manager factory should be already initialized and ready to use.
getKeyManagerFactory in interface KeyCertOptionsvertx - the vertx instanceExceptionpublic java.util.function.Function<String,X509KeyManager> keyManagerMapper(Vertx vertx) throws Exception
KeyCertOptionsX509KeyManager 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 returned function may return null in which case the default key manager provided by KeyCertOptions.getKeyManagerFactory(Vertx)
will be used.
keyManagerMapper in interface KeyCertOptionsExceptionpublic TrustManagerFactory getTrustManagerFactory(Vertx vertx) throws Exception
TrustOptionsThe returned trust manager factory should be already initialized and ready to use.
getTrustManagerFactory in interface TrustOptionsvertx - the vertx instanceExceptionpublic java.util.function.Function<String,TrustManager[]> trustManagerMapper(Vertx vertx) throws Exception
TrustOptionsTrustManagerFactory 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 TrustOptions.getTrustManagerFactory(Vertx) is used as fallback.trustManagerMapper in interface TrustOptionsvertx - the vertx instanceExceptionpublic abstract KeyStoreOptionsBase copy()
copy in interface KeyCertOptionscopy in interface TrustOptionsCopyright © 2021 Eclipse. All rights reserved.