Interface SslBundleKey


public interface SslBundleKey
A reference to a single key obtained via SslBundle.
Since:
3.1.0
Author:
Phillip Webb
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final SslBundleKey
    SslBundleKey that returns no values.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    assertContainsAlias(@Nullable KeyStore keyStore)
    Assert that the alias is contained in the given keystore.
    @Nullable String
    Return the alias of the key or null if the key has no alias.
    @Nullable String
    Return the password that should be used to access the key or null if no password is required.
    of(@Nullable String password, @Nullable String alias)
    Factory method to create a new SslBundleKey instance.
    of(String password)
    Factory method to create a new SslBundleKey instance.
  • Field Details

  • Method Details

    • getPassword

      @Nullable String getPassword()
      Return the password that should be used to access the key or null if no password is required.
      Returns:
      the key password
    • getAlias

      @Nullable String getAlias()
      Return the alias of the key or null if the key has no alias.
      Returns:
      the key alias
    • assertContainsAlias

      default void assertContainsAlias(@Nullable KeyStore keyStore)
      Assert that the alias is contained in the given keystore.
      Parameters:
      keyStore - the keystore to check
    • of

      static SslBundleKey of(String password)
      Factory method to create a new SslBundleKey instance.
      Parameters:
      password - the password used to access the key
      Returns:
      a new SslBundleKey instance
    • of

      static SslBundleKey of(@Nullable String password, @Nullable String alias)
      Factory method to create a new SslBundleKey instance.
      Parameters:
      password - the password used to access the key
      alias - the alias of the key
      Returns:
      a new SslBundleKey instance