Validating certificates must contain X.509 certificates wrapped in a PEM block:
-----BEGIN CERTIFICATE----- MIIDezCCAmOgAwIBAgIEVmLkwTANBgkqhkiG9w0BAQsFADBuMRAwDgYDVQQGEwdV ... z5+DuODBJUQst141Jmgq8bS543IU/5apcKQeGNxEyQ== -----END CERTIFICATE-----The certificates can either be loaded by Vert.x from the filesystem:
HttpServerOptions options = new HttpServerOptions();
options.setPemTrustOptions(new PemTrustOptions().addCertPath("/cert.pem"));
Or directly provided as a buffer:
Buffer cert = vertx.fileSystem().readFileBlocking("/cert.pem");
HttpServerOptions options = new HttpServerOptions();
options.setPemTrustOptions(new PemTrustOptions().addCertValue(cert));
| Modifier and Type | Field and Description |
|---|---|
| private ArrayList | |
| private ArrayList | |
| private KeyStoreHelper |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | PemTrustOptions(JsonObject
the JSON json)
References Deprecated
JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.
Create options from JSON |
| Modifier and Type | Method and Description |
|---|---|
| public PemTrustOptions | Returns: a reference to this, so the API can be used fluentlythe path to add certPath)Add a certificate path |
| public PemTrustOptions | Returns: a reference to this, so the API can be used fluentlythe value to add certValue)
References Deprecated
Buffer is deprecated or references (maybe indirectly) at least one deprecated element.
Add a certificate value |
| public PemTrustOptions | |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. Indicates whether some other object is "equal to" this one. |
| public List | |
| public List | |
| pack-priv KeyStoreHelper | |
| public TrustManagerFactory | getTrustManagerFactory(Vertx
the vertx instance vertx)Implements io. Create and return the trust manager factory for these options. |
| public KeyStore | |
| public JsonObject | Returns: the JSON
References Deprecated
JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.
Convert to JSON |
| public Function | trustManagerMapper(Vertx
the vertx instance vertx)Implements io. Returns a function that maps SNI server names to a |
| certPaths | back to summary |
|---|---|
| private ArrayList<String> certPaths | |
| certValues | back to summary |
|---|---|
| private ArrayList<Buffer> certValues | |
| helper | back to summary |
|---|---|
| private KeyStoreHelper helper | |
| PemTrustOptions | back to summary |
|---|---|
| public PemTrustOptions() Default constructor | |
| PemTrustOptions | back to summary |
|---|---|
| public PemTrustOptions(PemTrustOptions other) Copy constructor
| |
| PemTrustOptions | back to summary |
|---|---|
| public PemTrustOptions(JsonObject json)
References Deprecated
See corresponding docs for further information. Create options from JSON
| |
| addCertPath | back to summary |
|---|---|
| public PemTrustOptions addCertPath(String certPath) throws NullPointerException Add a certificate path
| |
| addCertValue | back to summary |
|---|---|
| public PemTrustOptions addCertValue(Buffer certValue) throws NullPointerException
References Deprecated
See corresponding docs for further information. Add a certificate value
| |
| copy | back to summary |
|---|---|
| public PemTrustOptions copy() Implements io.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getCertPaths | back to summary |
|---|---|
| public List | |
| getCertValues | back to summary |
|---|---|
| public List | |
| getHelper | back to summary |
|---|---|
| pack-priv KeyStoreHelper getHelper(Vertx vertx) throws Exception | |
| getTrustManagerFactory | back to summary |
|---|---|
| public TrustManagerFactory getTrustManagerFactory(Vertx vertx) throws Exception Implements io. Doc from io. Create and return the trust manager factory for these options. The returned trust manager factory should be already initialized and ready to use.
| |
| loadKeyStore | back to summary |
|---|---|
| public KeyStore loadKeyStore(Vertx vertx) throws Exception Load and return a Java keystore. | |
| toJson | back to summary |
|---|---|
| public JsonObject toJson()
References Deprecated
See corresponding docs for further information. Convert to JSON
| |
| trustManagerMapper | back to summary |
|---|---|
| public Function Implements io. Doc from io. Returns a function that maps SNI server names to a
The returned function may return
| |