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(new JKSOptions().setPath("/mykeystore.jks").setPassword("foo"));Or directly provided as a buffer:
Buffer store = vertx.fileSystem().readFileSync("/mykeystore.jks"); options.setKeyStore(new JKSOptions().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() |
JksOptions |
copy() |
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
|
JsonObject |
toJson()
Convert to JSON
|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getKeyManagerFactory, keyManagerMapper
getTrustManagerFactory, trustManagerMapper
public JksOptions()
public JksOptions(JksOptions other)
other
- the options to copypublic JksOptions(JsonObject json)
json
- the JSONpublic JsonObject toJson()
public 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 copy()
copy
in interface KeyCertOptions
copy
in interface TrustOptions
public JksOptions clone()
clone
in interface KeyCertOptions
clone
in interface TrustOptions
clone
in class Object
Copyright © 2020 Eclipse. All rights reserved.