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 |
copy() |
String |
getProvider() |
String |
getType() |
KeyStoreOptions |
setAlias(String alias)
Set the alias for a server certificate when the keystore has more than one.
|
KeyStoreOptions |
setAliasPassword(String aliasPassword)
Set the password for the server certificate designated by
KeyStoreOptionsBase.getAlias(). |
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
|
getAlias, getAliasPassword, getKeyManagerFactory, getPassword, getPath, getTrustManagerFactory, getValue, keyManagerMapper, loadKeyStore, trustManagerMapperclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwrap, wrapwrap, wrappublic KeyStoreOptions()
public KeyStoreOptions(KeyStoreOptions other)
other - the options to copypublic KeyStoreOptions(JsonObject json)
json - the JSONpublic String getProvider()
getProvider in class KeyStoreOptionsBasepublic KeyStoreOptions setProvider(String provider)
setProvider in class KeyStoreOptionsBaseprovider - the typepublic String getType()
getType in class KeyStoreOptionsBasepublic KeyStoreOptions setType(String type)
setType in class KeyStoreOptionsBasetype - the typepublic KeyStoreOptions setPassword(String password)
KeyStoreOptionsBasesetPassword in class KeyStoreOptionsBasepassword - the passwordpublic KeyStoreOptions setPath(String path)
KeyStoreOptionsBasesetPath in class KeyStoreOptionsBasepath - the pathpublic KeyStoreOptions setValue(Buffer value)
KeyStoreOptionsBasesetValue in class KeyStoreOptionsBasevalue - the key store as a bufferpublic KeyStoreOptions setAlias(String alias)
KeyStoreOptionsBasesetAlias in class KeyStoreOptionsBasepublic KeyStoreOptions setAliasPassword(String aliasPassword)
KeyStoreOptionsBaseKeyStoreOptionsBase.getAlias().setAliasPassword in class KeyStoreOptionsBasepublic KeyStoreOptions copy()
copy in interface KeyCertOptionscopy in interface TrustOptionscopy in class KeyStoreOptionsBasepublic JsonObject toJson()
Copyright © 2023 Eclipse. All rights reserved.