Interface KeystoreKeys

All Superinterfaces:
Prototype.Api
All Known Implementing Classes:
KeystoreKeys.BuilderBase.KeystoreKeysImpl

public interface KeystoreKeys extends Prototype.Api
Resources from a java keystore (PKCS12, JKS etc.).
See Also:
  • Field Details

  • Method Details

    • builder

      static KeystoreKeys.Builder builder()
      Create a new fluent API builder to customize configuration.
      Returns:
      a new builder
    • builder

      static KeystoreKeys.Builder builder(KeystoreKeys instance)
      Create a new fluent API builder from an existing instance.
      Parameters:
      instance - an existing instance used as a base for the builder
      Returns:
      a builder based on an instance
    • create

      static KeystoreKeys create(Config config)
      Create a new instance from configuration.
      Parameters:
      config - used to configure the new instance
      Returns:
      a new instance configured from configuration
    • keystore

      Resource keystore()
      Keystore resource definition.
      Returns:
      keystore resource, from file path, classpath, URL etc.
    • type

      String type()
      Set type of keystore. Defaults to "PKCS12", expected are other keystore types supported by java then can store keys under aliases.
      Returns:
      keystore type to load the key
    • passphrase

      Optional<char[]> passphrase()
      Pass-phrase of the keystore (supported with JKS and PKCS12 keystores).
      Returns:
      keystore password to use
    • keyAlias

      Optional<String> keyAlias()
      Alias of the private key in the keystore.
      Returns:
      alias of the key in the keystore
    • keyPassphrase

      Optional<char[]> keyPassphrase()
      Pass-phrase of the key in the keystore (used for private keys). This is (by default) the same as keystore passphrase - only configure if it differs from keystore passphrase.
      Returns:
      pass-phrase of the key
    • certAlias

      Optional<String> certAlias()
      Alias of X.509 certificate of public key. Used to load both the certificate and public key.
      Returns:
      alias under which the certificate is stored in the keystore
    • certChainAlias

      Optional<String> certChainAlias()
      Alias of an X.509 chain.
      Returns:
      alias of certificate chain in the keystore
    • certAliases

      List<String> certAliases()
      List of aliases used to generate a trusted set of certificates.
      Returns:
      aliases of certificates
    • trustStore

      boolean trustStore()
      If you want to build a trust store, call this method to add all certificates present in the keystore to certificate list.
      Returns:
      whether this is a trust store