public final class X500PrivateCredential extends Object implements Destroyable
这类代表一个X500PrivateCredential
。它将X.509证书,相应的私钥和密钥别名,确切的密钥对密钥库参考。这使得寻找一个主题的X.500主要私人凭据。
Constructor and Description |
---|
X500PrivateCredential(X509Certificate cert, PrivateKey key)
创建一个x500privatecredential将X.509证书、私钥和密钥库的别名。
|
X500PrivateCredential(X509Certificate cert, PrivateKey key, String alias)
创建一个x500privatecredential将X.509证书、私钥和密钥库的别名。
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
清除的X.509证书的私钥和别名引用,这个对象的密钥库。
|
String |
getAlias()
返回KeyStore alias。
|
X509Certificate |
getCertificate()
返回的X.509证书。
|
PrivateKey |
getPrivateKey()
返回密钥。
|
boolean |
isDestroyed()
确定是否在这个对象的X.509证书和私钥资料已被清除。
|
public X500PrivateCredential(X509Certificate cert, PrivateKey key)
cert
- X509Certificate
key
-证书的PrivateKey
IllegalArgumentException
-如果
cert
或
key
是空的
public X500PrivateCredential(X509Certificate cert, PrivateKey key, String alias)
cert
- X509Certificate
key
-证书的PrivateKey
alias
- KeyStore alias
IllegalArgumentException
-如果
cert
,
key
或
alias
是空的
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.