Interface PemSslStore
public interface PemSslStore
An individual trust or key store that has been loaded from PEM content.
- Since:
- 3.2.0
- Author:
- Phillip Webb
- See Also:
-
Method Summary
Modifier and TypeMethodDescription@Nullable Stringalias()The alias used when setting entries in theKeyStore.@Nullable List<X509Certificate> The certificates for this store.static @Nullable PemSslStoreload(@Nullable PemSslStoreDetails details) Return aPemSslStoreinstance loaded using the givenPemSslStoreDetails.static @Nullable PemSslStoreload(@Nullable PemSslStoreDetails details, ResourceLoader resourceLoader) Return aPemSslStoreinstance loaded using the givenPemSslStoreDetails.static PemSslStoreof(@Nullable String type, @Nullable String alias, @Nullable String password, List<X509Certificate> certificates, @Nullable PrivateKey privateKey) Factory method that can be used to create a newPemSslStorewith the given values.static PemSslStoreof(@Nullable String type, List<X509Certificate> certificates, @Nullable PrivateKey privateKey) Factory method that can be used to create a newPemSslStorewith the given values.static PemSslStoreof(List<X509Certificate> certificates, @Nullable PrivateKey privateKey) Factory method that can be used to create a newPemSslStorewith the given values.@Nullable Stringpassword()The password used whensetting key entriesin theKeyStore.@Nullable PrivateKeyThe private key for this store ornull.@Nullable Stringtype()The key store type, for exampleJKSorPKCS11.default PemSslStoreReturn a newPemSslStoreinstance with a new alias.default PemSslStorewithPassword(@Nullable String password) Return a newPemSslStoreinstance with a new password.
-
Method Details
-
type
@Nullable String type()- Returns:
- the key store type
-
alias
-
password
@Nullable String password()The password used whensetting key entriesin theKeyStore.- Returns:
- the password
-
certificates
@Nullable List<X509Certificate> certificates()The certificates for this store. When aprivate keyis 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
-
withAlias
Return a newPemSslStoreinstance with a new alias.- Parameters:
alias- the new alias- Returns:
- a new
PemSslStoreinstance
-
withPassword
Return a newPemSslStoreinstance with a new password.- Parameters:
password- the new password- Returns:
- a new
PemSslStoreinstance
-
load
Return aPemSslStoreinstance loaded using the givenPemSslStoreDetails.- Parameters:
details- the PEM store details- Returns:
- a loaded
PemSslStoreornull.
-
load
static @Nullable PemSslStore load(@Nullable PemSslStoreDetails details, ResourceLoader resourceLoader) Return aPemSslStoreinstance loaded using the givenPemSslStoreDetails.- Parameters:
details- the PEM store detailsresourceLoader- the resource loader used to load content- Returns:
- a loaded
PemSslStoreornull. - 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 newPemSslStorewith the given values.- Parameters:
type- the key store typecertificates- the certificates for this storeprivateKey- the private key- Returns:
- a new
PemSslStoreinstance
-
of
Factory method that can be used to create a newPemSslStorewith the given values.- Parameters:
certificates- the certificates for this storeprivateKey- the private key- Returns:
- a new
PemSslStoreinstance
-
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 newPemSslStorewith the given values.- Parameters:
type- the key store typealias- the alias used when setting entries in theKeyStorepassword- the password usedsetting key entriesin theKeyStorecertificates- the certificates for this storeprivateKey- the private key- Returns:
- a new
PemSslStoreinstance
-