Package org.springframework.boot.ssl.pem
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 Summary
Modifier and TypeMethodDescriptionalias()
The alias used when setting entries in theKeyStore
.The certificates for this store.static PemSslStore
load
(PemSslStoreDetails details) Return aPemSslStore
instance loaded using the givenPemSslStoreDetails
.static PemSslStore
of
(String type, String alias, String password, List<X509Certificate> certificates, PrivateKey privateKey) Factory method that can be used to create a newPemSslStore
with the given values.static PemSslStore
of
(String type, List<X509Certificate> certificates, PrivateKey privateKey) Factory method that can be used to create a newPemSslStore
with the given values.static PemSslStore
of
(List<X509Certificate> certificates, PrivateKey privateKey) Factory method that can be used to create a newPemSslStore
with the given values.password()
The password used whensetting key entries
in theKeyStore
.The private key for this store ornull
.type()
The key store type, for exampleJKS
orPKCS11
.default PemSslStore
Return a newPemSslStore
instance with a new alias.default PemSslStore
withPassword
(String password) Return a newPemSslStore
instance with a new password.
-
Method Details
-
type
String type()- Returns:
- the key store type
-
alias
String alias()The alias used when setting entries in theKeyStore
.- Returns:
- the alias
-
password
String password()The password used whensetting key entries
in theKeyStore
.- Returns:
- the password
-
certificates
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
PrivateKey privateKey()The private key for this store ornull
.- Returns:
- the private key
-
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
.
-
of
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(String type, String alias, String password, List<X509Certificate> certificates, 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
-