Interface PemSslStore


public interface PemSslStore
An individual trust or key store that has been loaded from PEM content.
Since:
3.2.0
See Also:
  • Method Details

    • type

      @Nullable String type()
      The key store type, for example JKS or PKCS11. A null value will use KeyStore.getDefaultType()).
      Returns:
      the key store type
    • alias

      @Nullable String alias()
      The alias used when setting entries in the KeyStore.
      Returns:
      the alias
    • password

      @Nullable String password()
      The password used when setting key entries in the KeyStore.
      Returns:
      the password
    • certificates

      @Nullable List<X509Certificate> certificates()
      The certificates for this store. When a private key is present the returned value is treated as a certificate chain, otherwise it is treated a list of certificates that should all be registered.
      Returns:
      the X509 certificates
    • privateKey

      @Nullable PrivateKey privateKey()
      The private key for this store or null.
      Returns:
      the private key
    • withAlias

      default PemSslStore withAlias(@Nullable String alias)
      Return a new PemSslStore instance with a new alias.
      Parameters:
      alias - the new alias
      Returns:
      a new PemSslStore instance
    • withPassword

      default PemSslStore withPassword(@Nullable String password)
      Return a new PemSslStore instance with a new password.
      Parameters:
      password - the new password
      Returns:
      a new PemSslStore instance
    • load

      static @Nullable PemSslStore load(@Nullable PemSslStoreDetails details)
      Return a PemSslStore instance loaded using the given PemSslStoreDetails.
      Parameters:
      details - the PEM store details
      Returns:
      a loaded PemSslStore or null.
    • load

      static @Nullable PemSslStore load(@Nullable PemSslStoreDetails details, org.springframework.core.io.ResourceLoader resourceLoader)
      Return a PemSslStore instance loaded using the given PemSslStoreDetails.
      Parameters:
      details - the PEM store details
      resourceLoader - the resource loader used to load content
      Returns:
      a loaded PemSslStore or null.
      Since:
      3.3.5
    • of

      static PemSslStore of(@Nullable String type, List<X509Certificate> certificates, @Nullable PrivateKey privateKey)
      Factory method that can be used to create a new PemSslStore with the given values.
      Parameters:
      type - the key store type
      certificates - the certificates for this store
      privateKey - the private key
      Returns:
      a new PemSslStore instance
    • of

      static PemSslStore of(List<X509Certificate> certificates, @Nullable PrivateKey privateKey)
      Factory method that can be used to create a new PemSslStore with the given values.
      Parameters:
      certificates - the certificates for this store
      privateKey - the private key
      Returns:
      a new PemSslStore instance
    • of

      static PemSslStore of(@Nullable String type, @Nullable String alias, @Nullable String password, List<X509Certificate> certificates, @Nullable PrivateKey privateKey)
      Factory method that can be used to create a new PemSslStore with the given values.
      Parameters:
      type - the key store type
      alias - the alias used when setting entries in the KeyStore
      password - the password used setting key entries in the KeyStore
      certificates - the certificates for this store
      privateKey - the private key
      Returns:
      a new PemSslStore instance