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 String
alias()
The alias used when setting entries in theKeyStore
.@Nullable List
<X509Certificate> The certificates for this store.static @Nullable PemSslStore
load
(@Nullable PemSslStoreDetails details) Return aPemSslStore
instance loaded using the givenPemSslStoreDetails
.static @Nullable PemSslStore
load
(@Nullable PemSslStoreDetails details, ResourceLoader resourceLoader) Return aPemSslStore
instance loaded using the givenPemSslStoreDetails
.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 newPemSslStore
with the given values.static PemSslStore
of
(@Nullable String type, List<X509Certificate> certificates, @Nullable PrivateKey privateKey) Factory method that can be used to create a newPemSslStore
with the given values.static PemSslStore
of
(List<X509Certificate> certificates, @Nullable PrivateKey privateKey) Factory method that can be used to create a newPemSslStore
with the given values.@Nullable String
password()
The password used whensetting key entries
in theKeyStore
.@Nullable PrivateKey
The private key for this store ornull
.@Nullable String
type()
The key store type, for exampleJKS
orPKCS11
.default PemSslStore
Return a newPemSslStore
instance with a new alias.default PemSslStore
withPassword
(@Nullable String password) Return a newPemSslStore
instance 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 entries
in theKeyStore
.- Returns:
- the password
-
certificates
@Nullable List<X509Certificate> certificates()The certificates for this store. When aprivate 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
-
withAlias
Return a newPemSslStore
instance with a new alias.- Parameters:
alias
- the new alias- Returns:
- a new
PemSslStore
instance
-
withPassword
Return a newPemSslStore
instance with a new password.- Parameters:
password
- the new password- Returns:
- a new
PemSslStore
instance
-
load
Return aPemSslStore
instance loaded using the givenPemSslStoreDetails
.- Parameters:
details
- the PEM store details- Returns:
- a loaded
PemSslStore
ornull
.
-
load
static @Nullable PemSslStore load(@Nullable PemSslStoreDetails details, ResourceLoader resourceLoader) Return aPemSslStore
instance loaded using the givenPemSslStoreDetails
.- Parameters:
details
- the PEM store detailsresourceLoader
- the resource loader used to load content- Returns:
- a loaded
PemSslStore
ornull
. - 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 newPemSslStore
with the given values.- Parameters:
type
- the key store typecertificates
- the certificates for this storeprivateKey
- the private key- Returns:
- a new
PemSslStore
instance
-
of
Factory method that can be used to create a newPemSslStore
with the given values.- Parameters:
certificates
- the certificates for this storeprivateKey
- 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 newPemSslStore
with the given values.- Parameters:
type
- the key store typealias
- the alias used when setting entries in theKeyStore
password
- the password usedsetting key entries
in theKeyStore
certificates
- the certificates for this storeprivateKey
- the private key- Returns:
- a new
PemSslStore
instance
-