io.vertx.core.net

## Class PfxOptions

- java.lang.Object
- - io.vertx.core.net.PfxOptions

- All Implemented Interfaces:
    KeyCertOptions, TrustOptions, Cloneable

      public class PfxOptions
      extends Object
      implements KeyCertOptions, TrustOptions, Cloneable

  Key or trust store options configuring private key and/or certificates based on PKCS#12 files.

  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 accepted certificates.

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

       HttpServerOptions options = new HttpServerOptions();
       options.setPfxKeyCertOptions(new PfxOptions().setPath("/mykeystore.p12").setPassword("foo"));

  Or directly provided as a buffer:

       Buffer store = vertx.fileSystem().readFileSync("/mykeystore.p12");
       options.setPfxKeyCertOptions(new PfxOptions().setValue(store).setPassword("foo"));

  Author:
    Julien Viet, Tim Fox

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PfxOptions()` Default constructor
    `PfxOptions(JsonObject json)` Create options from JSON
    `PfxOptions(PfxOptions other)` Copy constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `PfxOptions` | `clone()`
    `boolean` | `equals(Object o)`
    `String` | `getPassword()` Get the password
    `String` | `getPath()` Get the path
    `Buffer` | `getValue()` Get the store as a buffer
    `int` | `hashCode()`
    `PfxOptions` | `setPassword(String password)` Set the password
    `PfxOptions` | `setPath(String path)` Set the path
    `PfxOptions` | `setValue(Buffer value)` Set the store as a buffer

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PfxOptions

          public PfxOptions()

      Default constructor

    - #### PfxOptions

          public PfxOptions(PfxOptions other)

      Copy constructor
      Parameters:
        `other` - the options to copy

    - #### PfxOptions

          public PfxOptions(JsonObject json)

      Create options from JSON
      Parameters:
        `json` - the JSON

  - ### Method Detail

    - #### getPassword

          public String getPassword()

      Get the password
      Returns:
        the password

    - #### setPassword

          public PfxOptions setPassword(String password)

      Set the password
      Parameters:
        `password` - the password
      Returns:
        a reference to this, so the API can be used fluently

    - #### getPath

          public String getPath()

      Get the path
      Returns:
        the path

    - #### setPath

          public PfxOptions setPath(String path)

      Set the path
      Parameters:
        `path` - the path
      Returns:
        a reference to this, so the API can be used fluently

    - #### getValue

          public Buffer getValue()

      Get the store as a buffer
      Returns:
        store as buffer

    - #### setValue

          public PfxOptions setValue(Buffer value)

      Set the store as a buffer
      Parameters:
        `value` - the store as a buffer
      Returns:
        a reference to this, so the API can be used fluently

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### clone

          public PfxOptions clone()

      Specified by:
        `clone` in interface `KeyCertOptions`
      Specified by:
        `clone` in interface `TrustOptions`
      Overrides:
        `clone` in class `Object`
      Returns:
        a copy of these options

Copyright © 2015. All Rights Reserved.