public final class X500PrivateCredential extends Object implements Destroyable
这个班代表一个X500PrivateCredential 。 它将X.509证书,相应的私钥和KeyStore别名相关联,用于在KeyStore中引用确切的密钥对。 这可以查看主题中X.500主体的私人凭据。
| Constructor and Description |
|---|
X500PrivateCredential(X509Certificate cert, PrivateKey key)
创建X500PrivateCredential,它将X.509证书,私钥和KeyStore别名相关联。
|
X500PrivateCredential(X509Certificate cert, PrivateKey key, String alias)
创建X500PrivateCredential,它将X.509证书,私钥和KeyStore别名相关联。
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
清除此对象中X.509证书,私钥和KeyStore别名的引用。
|
String |
getAlias()
返回KeyStore别名。
|
X509Certificate |
getCertificate()
返回X.509证书。
|
PrivateKey |
getPrivateKey()
返回PrivateKey。
|
boolean |
isDestroyed()
确定对此对象中X.509证书和私钥的引用是否已被清除。
|
public X500PrivateCredential(X509Certificate cert, PrivateKey key)
cert - X509证书
key - 用于证书的PrivateKey
IllegalArgumentException - 如果
cert或
key为null
public X500PrivateCredential(X509Certificate cert, PrivateKey key, String alias)
cert - X509证书
key - 用于证书的PrivateKey
alias - KeyStore别名
IllegalArgumentException如果任-
cert ,
key或
alias为null
public X509Certificate getCertificate()
public PrivateKey getPrivateKey()
public String getAlias()
public void destroy()
destroy在界面
Destroyable
public boolean isDestroyed()
isDestroyed在界面
Destroyable
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.