public class PfxOptions 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 accepted certificates.
The store can either be loaded by Vert.x from the filesystem:
HttpServerOptions options = new HttpServerOptions();
options.setPfxKeyCertOptions(new PfxOptions().setPath("/mykeystore.p12").setPassword("foo"));
Or directly provided as a buffer:
Buffer store = vertx.fileSystem().readFileSync("/mykeystore.p12");
options.setPfxKeyCertOptions(new PfxOptions().setValue(store).setPassword("foo"));
| Constructor and Description |
|---|
PfxOptions()
Default constructor
|
PfxOptions(JsonObject json)
Create options from JSON
|
PfxOptions(PfxOptions other)
Copy constructor
|
| Modifier and Type | Method and Description |
|---|---|
PfxOptions |
clone() |
boolean |
equals(Object o) |
String |
getPassword()
Get the password
|
String |
getPath()
Get the path
|
Buffer |
getValue()
Get the store as a buffer
|
int |
hashCode() |
PfxOptions |
setPassword(String password)
Set the password
|
PfxOptions |
setPath(String path)
Set the path
|
PfxOptions |
setValue(Buffer value)
Set the store as a buffer
|
public PfxOptions()
public PfxOptions(PfxOptions other)
other - the options to copypublic PfxOptions(JsonObject json)
json - the JSONpublic String getPassword()
public PfxOptions setPassword(String password)
password - the passwordpublic String getPath()
public PfxOptions setPath(String path)
path - the pathpublic Buffer getValue()
public PfxOptions setValue(Buffer value)
value - the store as a bufferpublic PfxOptions clone()
clone in interface KeyCertOptionsclone in interface TrustOptionsclone in class ObjectCopyright © 2015. All rights reserved.