PemTrustOptions

Certificate Authority options configuring certificates based on <i>Privacy-enhanced Electronic Email</i> (PEM) files. The options is configured with a list of validating certificates.

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().readFileSync("/cert.pem");
HttpServerOptions options = new HttpServerOptions();
options.setPemTrustOptions(new PemTrustOptions().addCertValue(cert));
package

Default

Methods

PemTrustOptions constructor

__construct( $pemTrustOptions = null) 

Arguments

$pemTrustOptions

mixed | null

addCertPath

addCertPath( $certPaths) : $this

Arguments

$certPaths

string

Response

$this

addCertValue

addCertValue( $certValues) : $this

Arguments

$certValues

Buffer

Response

$this

getCertPaths

getCertPaths() : array

Response

array

getCertValues

getCertValues() : array

Response

array