Class TrustAndKeyProvider

java.lang.Object
com.codingchili.core.security.TrustAndKeyProvider

public class TrustAndKeyProvider extends Object
Common wrapper class for #SelfSignedCertificate and #JksOptions as they both contain trustOptions and keyCertOptions but these methods are not contained in a common interface.
  • Method Details

    • getPrivateKey

      public PrivateKey getPrivateKey()
      Returns:
      the private key of this keystore.
    • getPublicKey

      public PublicKey getPublicKey()
      Returns:
      the public key of this keystore.
    • of

      public static TrustAndKeyProvider of(TestCertificate self)
      Parameters:
      self - a self signed certificate to get trust and keycert options from.
      Returns:
      a new TrustAndKeyProvider instance.
    • of

      public static TrustAndKeyProvider of(KeyStoreReference jks)
      Parameters:
      jks - a java keystore to get trust and keycert options from.
      Returns:
      a new TrustAndKeyProvider instance.
    • trustOptions

      public io.vertx.core.net.TrustOptions trustOptions()
      Returns:
      trust options for the wrapped provider implementation.
    • keyCertOptions

      public io.vertx.core.net.KeyCertOptions keyCertOptions()
      Returns:
      key and cert options for the wrapped provider implementation.