记录类 PemSslStoreDetails

java.lang.Object
java.lang.Record
org.springframework.boot.ssl.pem.PemSslStoreDetails
记录组件:
type - the key store type, for example JKS or PKCS11. A null value will use KeyStore.getDefaultType()).
alias - the alias used when setting entries in the KeyStore
password - the password used setting key entries in the KeyStore
certificates - the certificates content (either the PEM content itself or a reference to the resource to load). When a private 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

      public PemSslStoreDetails(String type, String alias, String password, String certificates, String privateKey, String privateKeyPassword)
      Create a new PemSslStoreDetails instance.
      参数:
      type - the key store type, for example JKS or PKCS11. A null value will use KeyStore.getDefaultType()).
      alias - the alias used when setting entries in the KeyStore
      password - the password used setting key entries in the KeyStore
      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 new PemSslStoreDetails instance.
      参数:
      type - the key store type, for example JKS or PKCS11. A null value will use KeyStore.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

      public PemSslStoreDetails(String type, String certificate, String privateKey)
      Create a new PemSslStoreDetails instance.
      参数:
      type - the key store type, for example JKS or PKCS11. A null value will use KeyStore.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

      public PemSslStoreDetails withAlias(String alias)
      Return a new PemSslStoreDetails instance with a new alias.
      参数:
      alias - the new alias
      返回:
      a new PemSslStoreDetails instance
      从以下版本开始:
      3.2.0
    • withPassword

      public PemSslStoreDetails withPassword(String password)
      Return a new PemSslStoreDetails instance with a new password.
      参数:
      password - the new password
      返回:
      a new PemSslStoreDetails instance
      从以下版本开始:
      3.2.0
    • withPrivateKey

      public PemSslStoreDetails withPrivateKey(String privateKey)
      Return a new PemSslStoreDetails instance with a new private key.
      参数:
      privateKey - the new private key
      返回:
      a new PemSslStoreDetails instance
    • withPrivateKeyPassword

      public PemSslStoreDetails withPrivateKeyPassword(String privateKeyPassword)
      Return a new PemSslStoreDetails instance with a new private key password.
      参数:
      privateKeyPassword - the new private key password
      返回:
      a new PemSslStoreDetails instance
    • forCertificate

      public static PemSslStoreDetails forCertificate(String certificate)
      Factory method to create a new PemSslStoreDetails 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 to forCertificates(String).
      参数:
      certificate - the certificate content (either the PEM content itself or a reference to the resource to load)
      返回:
      a new PemSslStoreDetails instance.
    • forCertificates

      public static PemSslStoreDetails forCertificates(String certificates)
      Factory method to create a new PemSslStoreDetails 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

      public final String toString()
      返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。
      指定者:
      toString 在类中 Record
      返回:
      此对象的字符串表示形式
    • hashCode

      public final int hashCode()
      返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。
      指定者:
      hashCode 在类中 Record
      返回:
      此对象的哈希代码值
    • equals

      public final boolean equals(Object o)
      指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 此记录类中的所有组件都使用 Objects::equals(Object,Object) 进行比较。
      指定者:
      equals 在类中 Record
      参数:
      o - 要与之进行比较的对象
      返回:
      如果此对象与 o 参数相同,则为 true;否则为 false
    • type

      public String type()
      返回 type 记录组件的值。
      返回:
      type 记录组件的值
    • alias

      public String alias()
      返回 alias 记录组件的值。
      返回:
      alias 记录组件的值
    • password

      public String password()
      返回 password 记录组件的值。
      返回:
      password 记录组件的值
    • certificates

      public String certificates()
      返回 certificates 记录组件的值。
      返回:
      certificates 记录组件的值
    • privateKey

      public String privateKey()
      返回 privateKey 记录组件的值。
      返回:
      privateKey 记录组件的值
    • privateKeyPassword

      public String privateKeyPassword()
      返回 privateKeyPassword 记录组件的值。
      返回:
      privateKeyPassword 记录组件的值