Top Description Fields Constructors Methods
io.vertx.core.net

public abstract Class KeyStoreOptionsBase

extends Object
implements KeyCertOptions, TrustOptions
Class Inheritance
All Implemented Interfaces
io.vertx.core.net.TrustOptions, io.vertx.core.net.KeyCertOptions
Known Direct Subclasses
io.vertx.core.net.PfxOptions, io.vertx.core.net.JksOptions, io.vertx.core.net.KeyStoreOptions
Imports
io.vertx.core.Vertx, io.vertx.core.buffer.Buffer, io.vertx.core.impl.VertxInternal, io.vertx.core.net.impl.KeyStoreHelper, javax.net.ssl.KeyManagerFactory, .TrustManager, .TrustManagerFactory, .X509KeyManager, java.security.KeyStore, java.util.Objects, java.util.function.Function, .Supplier

Base class of KeyStore based options.
Authors
Julien Viet, Tim Fox

Field Summary

Modifier and TypeField and Description
private String
private String
private KeyStoreHelper
private String
private String
private String
private String
private Buffer
value

References Deprecated Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

Constructor Summary

AccessConstructor and Description
protected
KeyStoreOptionsBase()

Default constructor

protected
KeyStoreOptionsBase(KeyStoreOptionsBase
the options to copy
other
)

Copy constructor

Method Summary

Modifier and TypeMethod and Description
public abstract KeyStoreOptionsBase
public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public String

Returns:

the alias for a server certificate when the keystore has more than one, or null
getAlias
()

public String

Returns:

the password for the server certificate designated by getAlias(), or null
getAliasPassword
()

pack-priv KeyStoreHelper
public KeyManagerFactory
getKeyManagerFactory(Vertx
the vertx instance
vertx
)

Implements io.vertx.core.net.KeyCertOptions.getKeyManagerFactory.

Create and return the key manager factory for these options.

public String

Returns:

the password for the key store
getPassword
()

public String

Returns:

the path
getPath
()

Get the path to the ksy store

protected String
public TrustManagerFactory
getTrustManagerFactory(Vertx
the vertx instance
vertx
)

Implements io.vertx.core.net.TrustOptions.getTrustManagerFactory.

Create and return the trust manager factory for these options.

protected String
public Buffer

Returns:

the key store as a buffer
getValue
()
References Deprecated Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

Get the key store as a buffer

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

Overrides default io.vertx.core.net.KeyCertOptions.keyManagerFactoryMapper.

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

public Function<String, X509KeyManager>
keyManagerMapper(Vertx vertx)

Overrides default io.vertx.core.net.KeyCertOptions.keyManagerMapper.

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

public KeyStore

Returns:

the KeyStore
loadKeyStore
(Vertx
the vertx instance
vertx
)

Load and return a Java keystore.

public KeyStoreOptionsBase

Returns:

a reference to this, so the API can be used fluently
setAlias
(String alias)

Set the alias for a server certificate when the keystore has more than one.

public KeyStoreOptionsBase

Returns:

a reference to this, so the API can be used fluently
setAliasPassword
(String aliasPassword)

Set the password for the server certificate designated by getAlias().

public KeyStoreOptionsBase

Returns:

a reference to this, so the API can be used fluently
setPassword
(String
the password
password
)

Set the password for the key store

public KeyStoreOptionsBase

Returns:

a reference to this, so the API can be used fluently
setPath
(String
the path
path
)

Set the path to the key store

protected KeyStoreOptionsBase
setProvider(String provider)

protected KeyStoreOptionsBase
public KeyStoreOptionsBase

Returns:

a reference to this, so the API can be used fluently
setValue
(Buffer
the key store as a buffer
value
)
References Deprecated Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

Set the key store as a buffer

public Function<String, TrustManager[]>
trustManagerMapper(Vertx
the vertx instance
vertx
)

Implements io.vertx.core.net.TrustOptions.trustManagerMapper.

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

Inherited from java.lang.Object:
clonefinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aliasback to summary
private String alias
aliasPasswordback to summary
private String aliasPassword
helperback to summary
private KeyStoreHelper helper
passwordback to summary
private String password
pathback to summary
private String path
providerback to summary
private String provider
typeback to summary
private String type
valueback to summary
private Buffer value

References Deprecated

Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Constructor Detail

KeyStoreOptionsBaseback to summary
protected KeyStoreOptionsBase()

Default constructor

KeyStoreOptionsBaseback to summary
protected KeyStoreOptionsBase(KeyStoreOptionsBase other)

Copy constructor

Parameters
other:KeyStoreOptionsBase

the options to copy

Method Detail

copyback to summary
public abstract KeyStoreOptionsBase copy()

Redeclares io.vertx.core.net.KeyCertOptions.copy, io.vertx.core.net.TrustOptions.copy.

Returns:KeyStoreOptionsBase

Doc from io.vertx.core.net.KeyCertOptions.copy.

a copy of these options

Annotations
@Override
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getAliasback to summary
public String getAlias()
Returns:String

the alias for a server certificate when the keystore has more than one, or null

getAliasPasswordback to summary
public String getAliasPassword()
Returns:String

the password for the server certificate designated by getAlias(), or null

getHelperback to summary
pack-priv KeyStoreHelper getHelper(Vertx vertx) throws Exception
getKeyManagerFactoryback to summary
public KeyManagerFactory getKeyManagerFactory(Vertx vertx) throws Exception

Implements io.vertx.core.net.KeyCertOptions.getKeyManagerFactory.

Doc from io.vertx.core.net.KeyCertOptions.getKeyManagerFactory.

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

Annotations
@Override
getPasswordback to summary
public String getPassword()
Returns:String

the password for the key store

getPathback to summary
public String getPath()

Get the path to the ksy store

Returns:String

the path

getProviderback to summary
protected String getProvider()
getTrustManagerFactoryback to summary
public TrustManagerFactory getTrustManagerFactory(Vertx vertx) throws Exception

Implements io.vertx.core.net.TrustOptions.getTrustManagerFactory.

Doc from io.vertx.core.net.TrustOptions.getTrustManagerFactory.

Create and return the trust manager factory for these options.

The returned trust manager factory should be already initialized and ready to use.

Parameters
vertx:Vertx

the vertx instance

Returns:TrustManagerFactory

the trust manager factory

Annotations
@Override
getTypeback to summary
protected String getType()
getValueback to summary
public Buffer getValue()

References Deprecated

Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Get the key store as a buffer

Returns:Buffer

the key store as a buffer

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

Overrides default io.vertx.core.net.KeyCertOptions.keyManagerFactoryMapper.

Doc from io.vertx.core.net.KeyCertOptions.keyManagerFactoryMapper.

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.

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

Overrides default io.vertx.core.net.KeyCertOptions.keyManagerMapper.

Doc from io.vertx.core.net.KeyCertOptions.keyManagerMapper.

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
@Override
loadKeyStoreback to summary
public KeyStore loadKeyStore(Vertx vertx) throws Exception

Load and return a Java keystore.

Parameters
vertx:Vertx

the vertx instance

Returns:KeyStore

the KeyStore

setAliasback to summary
public KeyStoreOptionsBase setAlias(String alias)

Set the alias for a server certificate when the keystore has more than one.

Returns:KeyStoreOptionsBase

a reference to this, so the API can be used fluently

setAliasPasswordback to summary
public KeyStoreOptionsBase setAliasPassword(String aliasPassword)

Set the password for the server certificate designated by getAlias().

Returns:KeyStoreOptionsBase

a reference to this, so the API can be used fluently

setPasswordback to summary
public KeyStoreOptionsBase setPassword(String password)

Set the password for the key store

Parameters
password:String

the password

Returns:KeyStoreOptionsBase

a reference to this, so the API can be used fluently

setPathback to summary
public KeyStoreOptionsBase setPath(String path)

Set the path to the key store

Parameters
path:String

the path

Returns:KeyStoreOptionsBase

a reference to this, so the API can be used fluently

setProviderback to summary
protected KeyStoreOptionsBase setProvider(String provider)
setTypeback to summary
protected KeyStoreOptionsBase setType(String type)
setValueback to summary
public KeyStoreOptionsBase setValue(Buffer value)

References Deprecated

Buffer is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Set the key store as a buffer

Parameters
value:Buffer

the key store as a buffer

Returns:KeyStoreOptionsBase

a reference to this, so the API can be used fluently

trustManagerMapperback to summary
public Function<String, TrustManager[]> trustManagerMapper(Vertx vertx) throws Exception

Implements io.vertx.core.net.TrustOptions.trustManagerMapper.

Doc from io.vertx.core.net.TrustOptions.trustManagerMapper.

Returns a function that maps SNI server names to a TrustManagerFactory 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 getTrustManagerFactory(Vertx) is used as fallback.

Parameters
vertx:Vertx

the vertx instance

Returns:Function<String, TrustManager[]>

the trustManager

Annotations
@Override