public class KeyStoreOptions extends Object implements KeyCertOptions, TrustOptions
KeyStore
.
The store can either be loaded by Vert.x from the filesystem:
HttpServerOptions options = HttpServerOptions.httpServerOptions(); options.setKeyStore(new KeyStoreOptions().setType("JKS").setPath("/mykeystore.jks").setPassword("foo"));Or directly provided as a buffer:
Buffer store = vertx.fileSystem().readFileBlocking("/mykeystore.jks"); options.setKeyStore(new JKSOptions().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.setKeyStore(new JksOptions().setPath("/mykeystore.jks").setPassword("foo"));
Constructor and Description |
---|
KeyStoreOptions()
Default constructor
|
KeyStoreOptions(KeyStoreOptions other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
KeyStoreOptions |
copy() |
String |
getPassword() |
String |
getPath()
Get the path to the ksy store
|
String |
getType() |
Buffer |
getValue()
Get the key store as a buffer
|
KeyStoreOptions |
setPassword(String password)
Set the password for the key store
|
KeyStoreOptions |
setPath(String path)
Set the path to the key store
|
KeyStoreOptions |
setType(String type) |
KeyStoreOptions |
setValue(Buffer value)
Set the key store as a buffer
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getKeyManagerFactory, keyManagerMapper
getTrustManagerFactory, trustManagerMapper
public KeyStoreOptions()
public KeyStoreOptions(KeyStoreOptions other)
other
- the options to copypublic String getType()
public KeyStoreOptions setType(String type)
public String getPassword()
public KeyStoreOptions setPassword(String password)
password
- the passwordpublic String getPath()
public KeyStoreOptions setPath(String path)
path
- the pathpublic Buffer getValue()
public KeyStoreOptions setValue(Buffer value)
value
- the key store as a bufferpublic KeyStoreOptions copy()
copy
in interface KeyCertOptions
copy
in interface TrustOptions
Copyright © 2020 Eclipse. All rights reserved.