Class KeyStoreOptionsBase
java.lang.Object
io.vertx.core.net.KeyStoreOptionsBase
- All Implemented Interfaces:
KeyCertOptions, TrustOptions
- Direct Known Subclasses:
JksOptions, KeyStoreOptions, PfxOptions
Base class of
KeyStore based options.- Author:
- Julien Viet, Tim Fox
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructorprotectedCopy constructor -
Method Summary
Modifier and TypeMethodDescriptionabstract KeyStoreOptionsBasecopy()booleangetAlias()io.vertx.core.net.impl.KeyStoreHelpergetKeyManagerFactory(Vertx vertx) Create and return the key manager factory for these options.getPath()Get the path to the ksy storeprotected StringgetTrustManagerFactory(Vertx vertx) Create and return the trust manager factory for these options.protected StringgetType()getValue()Get the key store as a bufferinthashCode()keyManagerFactoryMapper(Vertx vertx) Returns a function that maps SNI server names toKeyManagerFactoryinstance.loadKeyStore(Vertx vertx) Load and return a Java keystore.Set the alias for a server certificate when the keystore has more than one.setAliasPassword(String aliasPassword) Set the password for the server certificate designated bygetAlias().setPassword(String password) Set the password for the key storeSet the path to the key storeprotected KeyStoreOptionsBasesetProvider(String provider) protected KeyStoreOptionsBaseSet the key store as a buffertrustManagerMapper(Vertx vertx) Returns a function that maps SNI server names to aTrustManagerFactoryinstance.
-
Constructor Details
-
KeyStoreOptionsBase
protected KeyStoreOptionsBase()Default constructor -
KeyStoreOptionsBase
Copy constructor- Parameters:
other- the options to copy
-
-
Method Details
-
getType
-
setType
-
getProvider
-
setProvider
-
getPassword
- Returns:
- the password for the key store
-
setPassword
Set the password for the key store- Parameters:
password- the password- Returns:
- a reference to this, so the API can be used fluently
-
getPath
-
setPath
Set the path to the key store- Parameters:
path- the path- Returns:
- a reference to this, so the API can be used fluently
-
getValue
-
setValue
Set the key store as a buffer- Parameters:
value- the key store as a buffer- Returns:
- a reference to this, so the API can be used fluently
-
getAlias
- Returns:
- the alias for a server certificate when the keystore has more than one, or
null
-
setAlias
Set the alias for a server certificate when the keystore has more than one.- Returns:
- a reference to this, so the API can be used fluently
-
getAliasPassword
- Returns:
- the password for the server certificate designated by
getAlias(), ornull
-
setAliasPassword
Set the password for the server certificate designated bygetAlias().- Returns:
- a reference to this, so the API can be used fluently
-
getHelper
-
loadKeyStore
-
getKeyManagerFactory
Description copied from interface:KeyCertOptionsCreate and return the key manager factory for these options.The returned key manager factory should be already initialized and ready to use.
- Specified by:
getKeyManagerFactoryin interfaceKeyCertOptions- Parameters:
vertx- the vertx instance- Returns:
- the key manager factory
- Throws:
Exception
-
keyManagerFactoryMapper
Description copied from interface:KeyCertOptionsReturns a function that maps SNI server names toKeyManagerFactoryinstance. The returnedKeyManagerFactorymust 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
nullin which case the default key manager provided byKeyCertOptions.getKeyManagerFactory(Vertx)will be used.- Specified by:
keyManagerFactoryMapperin interfaceKeyCertOptions- Throws:
Exception
-
getTrustManagerFactory
Description copied from interface:TrustOptionsCreate and return the trust manager factory for these options.The returned trust manager factory should be already initialized and ready to use.
- Specified by:
getTrustManagerFactoryin interfaceTrustOptions- Parameters:
vertx- the vertx instance- Returns:
- the trust manager factory
- Throws:
Exception
-
trustManagerMapper
Description copied from interface:TrustOptionsReturns a function that maps SNI server names to aTrustManagerFactoryinstance. The returnedTrustManagerFactorymust 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 returnnullin which caseTrustOptions.getTrustManagerFactory(Vertx)is used as fallback.- Specified by:
trustManagerMapperin interfaceTrustOptions- Parameters:
vertx- the vertx instance- Returns:
- the trustManager
- Throws:
Exception
-
copy
- Specified by:
copyin interfaceKeyCertOptions- Specified by:
copyin interfaceTrustOptions- Returns:
- a copy of these options
-
equals
-
hashCode
-