记录类 PemSslStoreDetails
java.lang.Object
java.lang.Record
org.springframework.boot.ssl.pem.PemSslStoreDetails
- 记录组件:
type
- the key store type, for exampleJKS
orPKCS11
. Anull
value will useKeyStore.getDefaultType()
).alias
- the alias used when setting entries in theKeyStore
password
- the password usedsetting key entries
in theKeyStore
certificates
- the certificates content (either the PEM content itself or a reference to the resource to load). When aprivate key
is 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 newPemSslStoreDetails
instance.PemSslStoreDetails
(String type, String certificate, String privateKey, String privateKeyPassword) Create a newPemSslStoreDetails
instance.PemSslStoreDetails
(String type, String alias, String password, String certificates, String privateKey, String privateKeyPassword) Create a newPemSslStoreDetails
instance. -
方法概要
修饰符和类型方法说明alias()
返回alias
记录组件的值。返回certificates
记录组件的值。final boolean
指示某个其他对象是否“等于”此对象。static PemSslStoreDetails
forCertificate
(String certificate) Factory method to create a newPemSslStoreDetails
instance for the given certificate.static PemSslStoreDetails
forCertificates
(String certificates) Factory method to create a newPemSslStoreDetails
instance for the given certificates.final int
hashCode()
返回此对象的哈希代码值。password()
返回password
记录组件的值。返回privateKey
记录组件的值。返回privateKeyPassword
记录组件的值。final String
toString()
返回此记录类的字符串表示形式。type()
返回type
记录组件的值。Return a newPemSslStoreDetails
instance with a new alias.withPassword
(String password) Return a newPemSslStoreDetails
instance with a new password.withPrivateKey
(String privateKey) Return a newPemSslStoreDetails
instance with a new private key.withPrivateKeyPassword
(String privateKeyPassword) Return a newPemSslStoreDetails
instance with a new private key password.
-
构造器详细资料
-
PemSslStoreDetails
public PemSslStoreDetails(String type, String alias, String password, String certificates, String privateKey, String privateKeyPassword) Create a newPemSslStoreDetails
instance.- 参数:
type
- the key store type, for exampleJKS
orPKCS11
. Anull
value will useKeyStore.getDefaultType()
).alias
- the alias used when setting entries in theKeyStore
password
- the password usedsetting key entries
in theKeyStore
certificates
- 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 newPemSslStoreDetails
instance.- 参数:
type
- the key store type, for exampleJKS
orPKCS11
. Anull
value 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 newPemSslStoreDetails
instance.- 参数:
type
- the key store type, for exampleJKS
orPKCS11
. Anull
value 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 newPemSslStoreDetails
instance with a new alias.- 参数:
alias
- the new alias- 返回:
- a new
PemSslStoreDetails
instance - 从以下版本开始:
- 3.2.0
-
withPassword
Return a newPemSslStoreDetails
instance with a new password.- 参数:
password
- the new password- 返回:
- a new
PemSslStoreDetails
instance - 从以下版本开始:
- 3.2.0
-
withPrivateKey
Return a newPemSslStoreDetails
instance with a new private key.- 参数:
privateKey
- the new private key- 返回:
- a new
PemSslStoreDetails
instance
-
withPrivateKeyPassword
Return a newPemSslStoreDetails
instance with a new private key password.- 参数:
privateKeyPassword
- the new private key password- 返回:
- a new
PemSslStoreDetails
instance
-
forCertificate
Factory method to create a newPemSslStoreDetails
instance 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
PemSslStoreDetails
instance.
-
forCertificates
Factory method to create a newPemSslStoreDetails
instance for the given certificates.- 参数:
certificates
- the certificates content (either the PEM content itself or a reference to the resource to load)- 返回:
- a new
PemSslStoreDetails
instance. - 从以下版本开始:
- 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
记录组件的值
-