public class KeyStoreOptions extends KeyStoreOptionsBase
KeyStore
.
The store can either be loaded by Vert.x from the filesystem:
HttpServerOptions options = HttpServerOptions.httpServerOptions(); options.setKeyCertOptions(new KeyStoreOptions().setType("JKS").setPath("/mykeystore.jks").setPassword("foo"));Or directly provided as a buffer:
Buffer store = vertx.fileSystem().readFileBlocking("/mykeystore.jks"); options.setKeyCertOptions(new KeyStoreOptions().setType("JKS").setValue(store).setPassword("foo"));
You can also use specific subclasses JksOptions
or PfxOptions
that will set
the setType(java.lang.String)
for you:
HttpServerOptions options = HttpServerOptions.httpServerOptions(); options.setKeyCertOptions(new JksOptions().setPath("/mykeystore.jks").setPassword("foo"));
Constructor and Description |
---|
KeyStoreOptions()
Default constructor
|
KeyStoreOptions(JsonObject json)
Create options from JSON
|
KeyStoreOptions(KeyStoreOptions other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
KeyStoreOptions |
clone() |
KeyStoreOptions |
copy() |
String |
getProvider() |
String |
getType() |
KeyStoreOptions |
setPassword(String password)
Set the password for the key store
|
KeyStoreOptions |
setPath(String path)
Set the path to the key store
|
KeyStoreOptions |
setProvider(String provider)
Set the store provider.
|
KeyStoreOptions |
setType(String type)
Set the store type.
|
KeyStoreOptions |
setValue(Buffer value)
Set the key store as a buffer
|
JsonObject |
toJson()
Convert to JSON
|
equals, getKeyManagerFactory, getPassword, getPath, getTrustManagerFactory, getValue, hashCode, keyManagerMapper, loadKeyStore, trustManagerMapper
public KeyStoreOptions()
public KeyStoreOptions(KeyStoreOptions other)
other
- the options to copypublic KeyStoreOptions(JsonObject json)
json
- the JSONpublic String getProvider()
getProvider
in class KeyStoreOptionsBase
public KeyStoreOptions setProvider(String provider)
setProvider
in class KeyStoreOptionsBase
provider
- the typepublic String getType()
getType
in class KeyStoreOptionsBase
public KeyStoreOptions setType(String type)
setType
in class KeyStoreOptionsBase
type
- the typepublic KeyStoreOptions setPassword(String password)
KeyStoreOptionsBase
setPassword
in class KeyStoreOptionsBase
password
- the passwordpublic KeyStoreOptions setPath(String path)
KeyStoreOptionsBase
setPath
in class KeyStoreOptionsBase
path
- the pathpublic KeyStoreOptions setValue(Buffer value)
KeyStoreOptionsBase
setValue
in class KeyStoreOptionsBase
value
- the key store as a bufferpublic KeyStoreOptions copy()
copy
in interface KeyCertOptions
copy
in interface TrustOptions
copy
in class KeyStoreOptionsBase
public KeyStoreOptions clone()
clone
in interface KeyCertOptions
clone
in interface TrustOptions
clone
in class KeyStoreOptionsBase
public JsonObject toJson()
Copyright © 2023 Eclipse. All rights reserved.