Record Class PemSslStoreDetails
java.lang.Object
java.lang.Record
cn.taketoday.core.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 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.- 从以下版本开始:
- 4.0
- 作者:
- Scott Frederick, Phillip Webb, Harry Yang
-
字段概要
字段修饰符和类型字段说明private final Stringalias记录组件的字段。private final Stringcertificates记录组件的字段。private final Stringpassword记录组件的字段。private final StringprivateKey记录组件的字段。private final StringprivateKeyPassword记录组件的字段。private final Stringtype记录组件的字段。 -
构造器概要
构造器构造器说明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) 创建PemSslStoreDetails记录的实例。 -
方法概要
修饰符和类型方法说明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()返回此对象的哈希代码值。(专用程序包) booleanisEmpty()private booleanpassword()返回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 password) Return a newPemSslStoreDetailsinstance with a new private key password.
-
字段详细资料
-
type
type记录组件的字段。 -
alias
alias记录组件的字段。 -
password
password记录组件的字段。 -
certificates
certificates记录组件的字段。 -
privateKey
privateKey记录组件的字段。 -
privateKeyPassword
privateKeyPassword记录组件的字段。
-
-
构造器详细资料
-
PemSslStoreDetails
public PemSslStoreDetails(@Nullable String type, @Nullable String certificate, @Nullable String privateKey) Create a newPemSslStoreDetailsinstance.- 参数:
type- the key store type, for exampleJKSorPKCS11. Anullvalue will useKeyStore.getDefaultType()).certificate- the certificates 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)
-
PemSslStoreDetails
public PemSslStoreDetails(@Nullable String type, @Nullable String certificate, @Nullable String privateKey, @Nullable String privateKeyPassword) Create a newPemSslStoreDetailsinstance.- 参数:
type- the key store type, for exampleJKSorPKCS11. Anullvalue will useKeyStore.getDefaultType()).certificate- the certificates 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
public PemSslStoreDetails(@Nullable String type, @Nullable String alias, @Nullable String password, @Nullable String certificates, @Nullable String privateKey, @Nullable String privateKeyPassword) 创建PemSslStoreDetails记录的实例。- 参数:
type-type记录组件的值alias-alias记录组件的值password-password记录组件的值certificates-certificates记录组件的值privateKey-privateKey记录组件的值privateKeyPassword-privateKeyPassword记录组件的值
-
-
方法详细资料
-
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.- 参数:
password- the new private key password- 返回:
- a new
PemSslStoreDetailsinstance
-
withAlias
Return a newPemSslStoreDetailsinstance with a new alias.- 参数:
alias- the new alias- 返回:
- a new
PemSslStoreDetailsinstance
-
withPassword
Return a newPemSslStoreDetailsinstance with a new password.- 参数:
password- the new password- 返回:
- a new
PemSslStoreDetailsinstance
-
isEmpty
boolean isEmpty() -
isEmpty
-
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.
-
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记录组件的值
-