public class JksOptions extends Object implements KeyCertOptions, TrustOptions, Cloneable
When used as a key store, it should point to a store containing a private key and its certificate. When used as a trust store, it should point to a store containing a list of trusted certificates.
The store can either be loaded by Vert.x from the filesystem:
HttpServerOptions options = HttpServerOptions.httpServerOptions();
options.setKeyStore(JKSOptions.options().setPath("/mykeystore.jks").setPassword("foo"));
Or directly provided as a buffer:
Buffer store = vertx.fileSystem().readFileSync("/mykeystore.jks");
options.setKeyStore(JKSOptions.options().setValue(store).setPassword("foo"));
| Constructor and Description |
|---|
JksOptions()
Default constructor
|
JksOptions(JksOptions other)
Copy constructor
|
JksOptions(JsonObject json)
Create options from JSON
|
| Modifier and Type | Method and Description |
|---|---|
JksOptions |
clone() |
boolean |
equals(Object o) |
String |
getPassword() |
String |
getPath()
Get the path to the ksy store
|
Buffer |
getValue()
Get the key store as a buffer
|
int |
hashCode() |
JksOptions |
setPassword(String password)
Set the password for the key store
|
JksOptions |
setPath(String path)
Set the path to the key store
|
JksOptions |
setValue(Buffer value)
Set the key store as a buffer
|
public JksOptions()
public JksOptions(JksOptions other)
other - the options to copypublic JksOptions(JsonObject json)
json - the JSONpublic String getPassword()
public JksOptions setPassword(String password)
password - the passwordpublic String getPath()
public JksOptions setPath(String path)
path - the pathpublic Buffer getValue()
public JksOptions setValue(Buffer value)
value - the key store as a bufferpublic JksOptions clone()
clone in interface KeyCertOptionsclone in interface TrustOptionsclone in class ObjectCopyright © 2015. All rights reserved.