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

A 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-----
 

Or contain a non encrypted private key in PKCS1 format wrapped in a PEM block, for example:

 -----BEGIN RSA PRIVATE KEY-----
 MIIEowIBAAKCAQEAlO4gbHeFb/fmbUF/tOJfNPJumJUEqgzAzx8MBXv9Acyw9IRa
 ...
 zJ14Yd+t2fsLYVs2H0gxaA4DW6neCzgY3eKpSU0EBHUCFSXp/1+/
 -----END RSA PRIVATE KEY-----
 

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

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

Keys and certificates 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));
 

Several key/certificate pairs can be used:

 HttpServerOptions options = new HttpServerOptions();
 options.setPemKeyCertOptions(new PemKeyCertOptions()
    .addKeyPath("/mykey1.pem").addCertPath("/mycert1.pem")
    .addKeyPath("/mykey2.pem").addCertPath("/mycert2.pem"));
 

no subtypes hierarchy

Initializer
PemKeyCertOptions(String? certPath = null, {String*}? certPaths = null, String? keyPath = null, {String*}? keyPaths = null)
Parameters:
  • certPath = null

    Set the path of the first certificate, replacing the previous certificates paths

  • certPaths = null

    Set all the paths to the certificates files

  • keyPath = null

    Set the path of the first key file, replacing the keys paths

  • keyPaths = null

    Set all the paths to the keys files

Attributes
certPathshared String? certPath

Set the path of the first certificate, replacing the previous certificates paths

certPathsshared {String*}? certPaths

Set all the paths to the certificates files

keyPathshared String? keyPath

Set the path of the first key file, replacing the keys paths

keyPathsshared {String*}? keyPaths

Set all the paths to the keys files

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