Constructors
constructor
-
-
Parameters
Methods
getCertPaths
-
Returns string[]
getCertValues
-
getKeyPaths
-
Returns string[]
getKeyValues
-
setCertPath
-
Parameters
setCertPaths
-
Parameters
setCertValue
-
Parameters
setCertValues
-
Parameters
setKeyPath
-
Parameters
setKeyPaths
-
Parameters
setKeyValue
-
Parameters
setKeyValues
-
Parameters
toJson
-
Returns {}
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:
Or contain a non encrypted private key in PKCS1 format wrapped in a PEM block, for example:
A certificate file must contain an X.509 certificate wrapped in a PEM block, for example:
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().readFileBlocking("/mykey.pem"); Buffer cert = vertx.fileSystem().readFileBlocking("/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"));