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
- Author:
- Phillip Webb
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionalias()The alias used when setting entries in theKeyStore.The certificates for this store.static PemSslStoreload(PemSslStoreDetails details) Return aPemSslStoreinstance loaded using the givenPemSslStoreDetails.static PemSslStoreof(String type, String alias, String password, List<X509Certificate> certificates, PrivateKey privateKey) Factory method that can be used to create a newPemSslStorewith the given values.static PemSslStoreof(String type, List<X509Certificate> certificates, PrivateKey privateKey) Factory method that can be used to create a newPemSslStorewith the given values.static PemSslStoreof(List<X509Certificate> certificates, PrivateKey privateKey) Factory method that can be used to create a newPemSslStorewith the given values.password()The password used whensetting key entriesin theKeyStore.The private key for this store ornull.type()The key store type, for exampleJKSorPKCS11.default PemSslStoreReturn a newPemSslStoreinstance with a new alias.default PemSslStorewithPassword(String password) Return a newPemSslStoreinstance 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 entriesin theKeyStore.- Returns:
- the password
-
certificates
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
PrivateKey privateKey()The private key for this store ornull.- Returns:
- the private key
-
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. - Throws:
IOException- on IO error
-
of
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(String type, String alias, String password, List<X509Certificate> certificates, 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
-