public static final class KeyStore.PrivateKeyEntry extends Object implements KeyStore.Entry
KeyStore条目,持有
PrivateKey和相应的证书链。
KeyStore.Entry.Attribute| Constructor and Description |
|---|
PrivateKeyEntry(PrivateKey privateKey, Certificate[] chain)
构建一个与
PrivateKey和相应的证书链
PrivateKeyEntry。
|
PrivateKeyEntry(PrivateKey privateKey, Certificate[] chain, Set<KeyStore.Entry.Attribute> attributes)
构建一个与
PrivateKey和相应的证书链
PrivateKeyEntry和相关条目属性。
|
| 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)
PrivateKey和相应的证书链
PrivateKeyEntry。
克隆之前,它是存储在新的PrivateKeyEntry对象指定的chain。
privateKey -
PrivateKey
chain -代表证书链
Certificates数组。链必须有序和包含在索引0
Certificate对应的私钥。
NullPointerException -如果
privateKey或
chain是
null
IllegalArgumentException -如果指定链长度为0,如果指定的链不包含相同类型的
Certificates,或者如果
PrivateKey算法不匹配,最后实体
Certificate的
PublicKey算法(索引0)
public PrivateKeyEntry(PrivateKey privateKey, Certificate[] chain, Set<KeyStore.Entry.Attribute> attributes)
PrivateKey和相应的证书链
PrivateKeyEntry和相关条目属性。
指定的chain和attributes克隆之前,它们被存储在新的PrivateKeyEntry对象。
privateKey -
PrivateKey
chain -代表证书链
Certificates数组。链必须有序和包含在索引0对应的私钥
Certificate。
attributes -属性
NullPointerException -如果
privateKey,
chain或
attributes是
null
IllegalArgumentException -如果指定链长度为0,如果指定的链不包含相同类型的
Certificates,或者如果
PrivateKey算法不匹配,最后实体
Certificate的
PublicKey算法(索引0)
public PrivateKey getPrivateKey()
PrivateKey。
PrivateKey
public Certificate[] getCertificateChain()
Certificate链。
存储的链在返回之前被克隆。
Certificates对应的公钥的证书链。如果证书的类型是X.509,返回数组的运行时类型是
X509Certificate[]。
public Certificate getCertificate()
Certificate。
Certificate(索引0)从这个入口证书链。如果证书是X.509证书的类型,返回的运行时类型是
X509Certificate。
public Set<KeyStore.Entry.Attribute> getAttributes()
getAttributes 接口
KeyStore.Entry
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.