java.lang.Object
java.security.KeyStore.PrivateKeyEntry
- 所有已实现的接口:
KeyStore.Entry
- 封闭类:
KeyStore
包含
PrivateKey 和相应证书链的 KeyStore 条目。
- 自从:
- 1.5
-
内部类总结
在接口 java.security.KeyStore.Entry 中声明的嵌套类/接口
KeyStore.Entry.Attribute -
构造方法总结
构造方法构造方法描述PrivateKeyEntry(PrivateKey privateKey, Certificate[] chain) 使用PrivateKey和相应的证书链构造PrivateKeyEntry。PrivateKeyEntry(PrivateKey privateKey, Certificate[] chain, Set<KeyStore.Entry.Attribute> attributes) 使用PrivateKey和相应的证书链以及关联的条目属性构造PrivateKeyEntry。 -
方法总结
修饰符和类型方法描述检索与条目关联的属性。从此条目中的证书链获取结束实体Certificate。从此条目获取Certificate链。从此条目中获取PrivateKey。toString()返回此 PrivateKeyEntry 的字符串表示形式。
-
构造方法详细信息
-
PrivateKeyEntry
使用PrivateKey和相应的证书链构造PrivateKeyEntry。指定的
chain在存储到新的PrivateKeyEntry对象之前被克隆。- 参数:
privateKey-PrivateKeychain- 代表证书链的Certificate数组。该链必须有序并且在索引 0 处包含一个与私钥对应的Certificate。- 抛出:
NullPointerException- 如果privateKey或chain是nullIllegalArgumentException- 如果指定链的长度为 0,如果指定链不包含相同类型的Certificate,或者如果PrivateKey算法与最终实体Certificate中的PublicKey的算法不匹配(在索引 0 处)
-
PrivateKeyEntry
public PrivateKeyEntry(PrivateKey privateKey, Certificate [] chain, Set <KeyStore.Entry.Attribute > attributes) 使用PrivateKey和相应的证书链以及关联的条目属性构造PrivateKeyEntry。指定的
chain和attributes在存储到新的PrivateKeyEntry对象之前被克隆。- 参数:
privateKey-PrivateKeychain- 代表证书链的Certificate数组。该链必须有序并且在索引 0 处包含一个与私钥对应的Certificate。attributes- 属性- 抛出:
NullPointerException- 如果privateKey、chain或attributes是nullIllegalArgumentException- 如果指定链的长度为 0,如果指定链不包含相同类型的Certificate,或者如果PrivateKey算法与最终实体Certificate中的PublicKey的算法不匹配(在索引 0 处)- 自从:
- 1.8
-
-
方法详情
-
getPrivateKey
从此条目中获取PrivateKey。- 返回:
-
该条目中的
PrivateKey
-
getCertificateChain
从此条目获取Certificate链。存储链在返回之前被克隆。
- 返回:
-
与公钥证书链对应的
Certificate数组。如果证书的类型为 X.509,则返回数组的运行时类型为X509Certificate[]。
-
getCertificate
从此条目中的证书链获取结束实体Certificate。- 返回:
-
此条目中证书链中的最终实体
Certificate(在索引 0 处)。如果证书是 X.509 类型,则返回证书的运行时类型是X509Certificate。
-
getAttributes
检索与条目关联的属性。- 指定者:
getAttributes在接口KeyStore.Entry中- 返回:
-
不可修改的
Set属性,可能为空 - 自从:
- 1.8
-
toString
返回此 PrivateKeyEntry 的字符串表示形式。
-