public static final class KeyStore.PrivateKeyEntry extends Object implements KeyStore.Entry
KeyStore条目,其中包含一个
PrivateKey和相应的证书链。
KeyStore.Entry.Attribute| Constructor and Description |
|---|
PrivateKeyEntry(PrivateKey privateKey, Certificate[] chain)
构造一个
PrivateKeyEntry与
PrivateKey和相应的证书链。
|
PrivateKeyEntry(PrivateKey privateKey, Certificate[] chain, Set<KeyStore.Entry.Attribute> attributes)
构造一个
PrivateKeyEntry与
PrivateKey和相应的证书链和相关的条目属性。
|
| Modifier and Type | Method and Description |
|---|---|
Set<KeyStore.Entry.Attribute> |
getAttributes()
检索与条目关联的属性。
|
Certificate |
getCertificate()
从该条目中的证书链中获取终端实体
Certificate 。
|
Certificate[] |
getCertificateChain()
从此条目获取
Certificate链。
|
PrivateKey |
getPrivateKey()
从此条目获取
PrivateKey 。
|
String |
toString()
返回此PrivateKeyEntry的字符串表示形式。
|
public PrivateKeyEntry(PrivateKey privateKey, Certificate[] chain)
PrivateKeyEntry与PrivateKey和相应的证书链。
指定的chain在存储在新的PrivateKeyEntry对象之前被克隆。
privateKey -
PrivateKey
chain - 代表证书链的Certificate s数组。
必须对该链进行排序,并在索引0处包含与Certificate 。
NullPointerException - 如果
privateKey或
chain是
null
IllegalArgumentException -如果指定的链具有的长度为0,如果指定的链不包含
Certificate S中的相同的类型,或者如果
PrivateKey算法不所述的算法匹配
PublicKey到底实体
Certificate (索引0)
public PrivateKeyEntry(PrivateKey privateKey, Certificate[] chain, Set<KeyStore.Entry.Attribute> attributes)
PrivateKeyEntry与PrivateKey和相应的证书链和相关的条目属性。
指定的chain和attributes在被存储在新的PrivateKeyEntry对象之前被克隆。
privateKey -
PrivateKey
chain - 表示证书链的Certificate s的数组。
必须对该链进行排序,并在索引0处包含与Certificate 。
attributes - 属性
NullPointerException -如果
privateKey ,
chain或
attributes是
null
IllegalArgumentException -如果指定的链具有的长度为0,如果指定的链不包含
Certificate S中的相同的类型,或者如果
PrivateKey算法不所述的算法匹配
PublicKey到底实体
Certificate (索引0)
public PrivateKey getPrivateKey()
PrivateKey 。
PrivateKey
public Certificate[] getCertificateChain()
Certificate链。
存储链在被返回之前被克隆。
Certificate的数组对应于公钥的证书链。
如果证书的类型为X.509,则返回的数组的运行时类型为X509Certificate[] 。
public Certificate getCertificate()
Certificate 。
Certificate (在索引0处)。
如果证书的类型为X.509,则返回的证书的运行时类型为X509Certificate 。
public Set<KeyStore.Entry.Attribute> getAttributes()
getAttributes在接口
KeyStore.Entry
Set的属性Set可能是空的
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.