Key store options configuring a private key and its certificate based on Privacy-enhanced Electronic Email (PEM) files.

The key file must contain a non encrypted private key in PKCS8 format wrapped in a PEM block, for example:

 -----BEGIN PRIVATE KEY-----
 MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDV6zPk5WqLwS0a
 ...
 K5xBhtm1AhdnZjx5KfW3BecE
 -----END PRIVATE KEY-----
 

The certificate file must contain an X.509 certificate wrapped in a PEM block, for example:

 -----BEGIN CERTIFICATE-----
 MIIDezCCAmOgAwIBAgIEZOI/3TANBgkqhkiG9w0BAQsFADBuMRAwDgYDVQQGEwdV
 ...
 +tmLSvYS39O2nqIzzAUfztkYnUlZmB0l/mKkVqbGJA==
 -----END CERTIFICATE-----
 

The key and certificate can either be loaded by Vert.x from the filesystem:

 HttpServerOptions options = new HttpServerOptions();
 options.setPemKeyCertOptions(new PemKeyCertOptions().setKeyPath("/mykey.pem").setCertPath("/mycert.pem"));
 

Or directly provided as a buffer:

 Buffer key = vertx.fileSystem().readFileSync("/mykey.pem");
 Buffer cert = vertx.fileSystem().readFileSync("/mycert.pem");
 options.setPemKeyCertOptions(new PemKeyCertOptions().setKeyValue(key).setCertValue(cert));
 

no subtypes hierarchy

Initializer
PemKeyCertOptions(String? certPath = null, String? keyPath = null)
Parameters:
  • certPath = null

    Set the path to the certificate

  • keyPath = null

    Set the path to the key file

Attributes
certPathshared String? certPath

Set the path to the certificate

keyPathshared String? keyPath

Set the path to the key file

Inherited Attributes
Attributes inherited from: Object
hash, string
Methods
toJsonshared actual default JsonObject toJson()
Refines BaseDataObject.toJson
Inherited Methods
Methods inherited from: Object
equals
Methods inherited from: BaseDataObject
toJson