Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PemTrustOptions

Certificate Authority options configuring certificates based on Privacy-enhanced Electronic Email (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().readFileBlocking("/cert.pem");
HttpServerOptions options = new HttpServerOptions();
options.setPemTrustOptions(new PemTrustOptions().addCertValue(cert));

Hierarchy

  • PemTrustOptions

Index

Constructors

constructor

  • Returns PemTrustOptions

  • Parameters

    Returns PemTrustOptions

Methods

addCertPath

  • Add a certificate path

    Parameters

    • certPaths: string

    Returns PemTrustOptions

addCertValue

  • Add a certificate value

    Parameters

    Returns PemTrustOptions

getCertPaths

  • getCertPaths(): string[]
  • Add a certificate path

    Returns string[]

getCertValues

  • Add a certificate value

    Returns Buffer[]

toJson

  • toJson(): {}
  • Returns {}

    • [key: string]: any

Generated using TypeDoc