Options
All
  • Public
  • Public/Protected
  • All
Menu

Class KeyStoreOptions

Key or trust store options configuring private key and/or certificates based on KeyStore.

  • when used as a key store, it should point to a store containing a private key and its certificate.
  • when used as a trust store, it should point to a store containing a list of trusted certificates.

The store can either be loaded by Vert.x from the filesystem:

HttpServerOptions options = HttpServerOptions.httpServerOptions();
options.setKeyCertOptions(new KeyStoreOptions().setType("JKS").setPath("/mykeystore.jks").setPassword("foo"));

Or directly provided as a buffer:

Buffer store = vertx.fileSystem().readFileBlocking("/mykeystore.jks");
options.setKeyCertOptions(new KeyStoreOptions().setType("JKS").setValue(store).setPassword("foo"));

You can also use specific subclasses JksOptions or PfxOptions that will set the KeyStoreOptions for you:

HttpServerOptions options = HttpServerOptions.httpServerOptions();
options.setKeyCertOptions(new JksOptions().setPath("/mykeystore.jks").setPassword("foo"));

Hierarchy

  • KeyStoreOptions

Index

Constructors

constructor

  • Returns KeyStoreOptions

  • Parameters

    Returns KeyStoreOptions

Methods

getAlias

  • getAlias(): string
  • Set the alias for a server certificate when the keystore has more than one.

    Returns string

getAliasPassword

  • getAliasPassword(): string
  • Set the password for the server certificate designated by {@link KeyStoreOptionsBase#getAlias}.

    Returns string

getPassword

  • getPassword(): string
  • Set the password for the key store

    Returns string

getPath

  • getPath(): string
  • Set the path to the key store

    Returns string

getProvider

  • getProvider(): string
  • Set the store provider.

    Returns string

getType

  • getType(): string
  • Set the store type.

    Returns string

getValue

  • Set the key store as a buffer

    Returns Buffer

setAlias

  • Set the alias for a server certificate when the keystore has more than one.

    Parameters

    • alias: string

    Returns KeyStoreOptions

setAliasPassword

  • Set the password for the server certificate designated by {@link KeyStoreOptionsBase#getAlias}.

    Parameters

    • aliasPassword: string

    Returns KeyStoreOptions

setPassword

  • Set the password for the key store

    Parameters

    • password: string

    Returns KeyStoreOptions

setPath

  • Set the path to the key store

    Parameters

    • path: string

    Returns KeyStoreOptions

setProvider

  • Set the store provider.

    Parameters

    • provider: string

    Returns KeyStoreOptions

setType

  • Set the store type.

    Parameters

    • type: string

    Returns KeyStoreOptions

setValue

  • Set the key store as a buffer

    Parameters

    Returns KeyStoreOptions

toJson

  • toJson(): {}
  • Returns {}

    • [key: string]: any

Generated using TypeDoc