记录类 PemSslStoreDetails
java.lang.Object
java.lang.Record
org.springframework.boot.ssl.pem.PemSslStoreDetails
- 记录组件:
type- the key store type, for exampleJKSorPKCS11. Anullvalue will useKeyStore.getDefaultType()).alias- the alias used when setting entries in theKeyStorepassword- the password usedsetting key entriesin theKeyStorecertificates- the certificates content (either the PEM content itself or a reference to the resource to load). When aprivate keyis present this value is treated as a certificate chain, otherwise it is treated a list of certificates that should all be registered.privateKey- the private key content (either the PEM content itself or a reference to the resource to load)privateKeyPassword- a password used to decrypt an encrypted private key
public record PemSslStoreDetails(String type, String alias, String password, String certificates, String privateKey, String privateKeyPassword)
extends Record
Details for an individual trust or key store in a
PemSslStoreBundle.- 从以下版本开始:
- 3.1.0
- 作者:
- Scott Frederick, Phillip Webb
- 另请参阅:
-
构造器概要
构造器构造器说明PemSslStoreDetails(String type, String certificate, String privateKey) Create a newPemSslStoreDetailsinstance.PemSslStoreDetails(String type, String certificate, String privateKey, String privateKeyPassword) Create a newPemSslStoreDetailsinstance.PemSslStoreDetails(String type, String alias, String password, String certificates, String privateKey, String privateKeyPassword) Create a newPemSslStoreDetailsinstance. -
方法概要
修饰符和类型方法说明alias()返回alias记录组件的值。返回certificates记录组件的值。final boolean指示某个其他对象是否“等于”此对象。static PemSslStoreDetailsforCertificate(String certificate) Factory method to create a newPemSslStoreDetailsinstance for the given certificate.static PemSslStoreDetailsforCertificates(String certificates) Factory method to create a newPemSslStoreDetailsinstance for the given certificates.final inthashCode()返回此对象的哈希代码值。password()返回password记录组件的值。返回privateKey记录组件的值。返回privateKeyPassword记录组件的值。final StringtoString()返回此记录类的字符串表示形式。type()返回type记录组件的值。Return a newPemSslStoreDetailsinstance with a new alias.withPassword(String password) Return a newPemSslStoreDetailsinstance with a new password.withPrivateKey(String privateKey) Return a newPemSslStoreDetailsinstance with a new private key.withPrivateKeyPassword(String privateKeyPassword) Return a newPemSslStoreDetailsinstance with a new private key password.
-
构造器详细资料
-
PemSslStoreDetails
public PemSslStoreDetails(String type, String alias, String password, String certificates, String privateKey, String privateKeyPassword) Create a newPemSslStoreDetailsinstance.- 参数:
type- the key store type, for exampleJKSorPKCS11. Anullvalue will useKeyStore.getDefaultType()).alias- the alias used when setting entries in theKeyStorepassword- the password usedsetting key entriesin theKeyStorecertificates- the certificate content (either the PEM content itself or a reference to the resource to load)privateKey- the private key content (either the PEM content itself or a reference to the resource to load)privateKeyPassword- a password used to decrypt an encrypted private key- 从以下版本开始:
- 3.2.0
-
PemSslStoreDetails
public PemSslStoreDetails(String type, String certificate, String privateKey, String privateKeyPassword) Create a newPemSslStoreDetailsinstance.- 参数:
type- the key store type, for exampleJKSorPKCS11. Anullvalue will useKeyStore.getDefaultType()).certificate- the certificate content (either the PEM content itself or a reference to the resource to load)privateKey- the private key content (either the PEM content itself or a reference to the resource to load)privateKeyPassword- a password used to decrypt an encrypted private key
-
PemSslStoreDetails
Create a newPemSslStoreDetailsinstance.- 参数:
type- the key store type, for exampleJKSorPKCS11. Anullvalue will useKeyStore.getDefaultType()).certificate- the certificate content (either the PEM content itself or a reference to the resource to load)privateKey- the private key content (either the PEM content itself or a reference to the resource to load)
-
-
方法详细资料
-
withAlias
Return a newPemSslStoreDetailsinstance with a new alias.- 参数:
alias- the new alias- 返回:
- a new
PemSslStoreDetailsinstance - 从以下版本开始:
- 3.2.0
-
withPassword
Return a newPemSslStoreDetailsinstance with a new password.- 参数:
password- the new password- 返回:
- a new
PemSslStoreDetailsinstance - 从以下版本开始:
- 3.2.0
-
withPrivateKey
Return a newPemSslStoreDetailsinstance with a new private key.- 参数:
privateKey- the new private key- 返回:
- a new
PemSslStoreDetailsinstance
-
withPrivateKeyPassword
Return a newPemSslStoreDetailsinstance with a new private key password.- 参数:
privateKeyPassword- the new private key password- 返回:
- a new
PemSslStoreDetailsinstance
-
forCertificate
Factory method to create a newPemSslStoreDetailsinstance for the given certificate. Note: This method doesn't actually check if the provided value only contains a single certificate. It is functionally equivalent toforCertificates(String).- 参数:
certificate- the certificate content (either the PEM content itself or a reference to the resource to load)- 返回:
- a new
PemSslStoreDetailsinstance.
-
forCertificates
Factory method to create a newPemSslStoreDetailsinstance for the given certificates.- 参数:
certificates- the certificates content (either the PEM content itself or a reference to the resource to load)- 返回:
- a new
PemSslStoreDetailsinstance. - 从以下版本开始:
- 3.2.0
-
toString
返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 此记录类中的所有组件都使用Objects::equals(Object,Object)进行比较。 -
type
返回type记录组件的值。- 返回:
type记录组件的值
-
alias
返回alias记录组件的值。- 返回:
alias记录组件的值
-
password
返回password记录组件的值。- 返回:
password记录组件的值
-
certificates
返回certificates记录组件的值。- 返回:
certificates记录组件的值
-
privateKey
返回privateKey记录组件的值。- 返回:
privateKey记录组件的值
-
privateKeyPassword
返回privateKeyPassword记录组件的值。- 返回:
privateKeyPassword记录组件的值
-