public class CertificateStore extends CryptoBase
Modifier and Type | Field and Description |
---|---|
protected X509Certificate[] |
trustedCerts |
certFactMap, cryptoProvider, defaultAlias, NAME_CONSTRAINTS_OID, SKI_OID
Constructor and Description |
---|
CertificateStore(X509Certificate[] trustedCerts)
Constructor
|
Modifier and Type | Method and Description |
---|---|
PrivateKey |
getPrivateKey(String identifier,
String password)
Gets the private key corresponding to the identifier.
|
PrivateKey |
getPrivateKey(X509Certificate certificate,
CallbackHandler callbackHandler)
Gets the private key corresponding to the certificate.
|
X509Certificate[] |
getX509Certificates(CryptoType cryptoType)
Get an X509Certificate (chain) corresponding to the CryptoType argument.
|
String |
getX509Identifier(X509Certificate cert)
Get the implementation-specific identifier corresponding to the cert parameter.
|
boolean |
verifyTrust(PublicKey publicKey)
Evaluate whether a given public key should be trusted.
|
boolean |
verifyTrust(X509Certificate[] certs)
Deprecated.
|
boolean |
verifyTrust(X509Certificate[] certs,
boolean enableRevocation)
Evaluate whether a given certificate chain should be trusted.
|
createBCX509Name, getBytesFromCertificates, getCertificateFactory, getCertificatesFromBytes, getCryptoProvider, getDefaultX509Identifier, getSKIBytesFromCert, loadCertificate, setCertificateFactory, setCryptoProvider, setDefaultX509Identifier
protected X509Certificate[] trustedCerts
public CertificateStore(X509Certificate[] trustedCerts)
public X509Certificate[] getX509Certificates(CryptoType cryptoType) throws WSSecurityException
WSSecurityException
public String getX509Identifier(X509Certificate cert) throws WSSecurityException
cert
- The X509Certificate for which to search for an identifierWSSecurityException
public PrivateKey getPrivateKey(X509Certificate certificate, CallbackHandler callbackHandler) throws WSSecurityException
certificate
- The X509Certificate corresponding to the private keycallbackHandler
- The callbackHandler needed to get the passwordWSSecurityException
public PrivateKey getPrivateKey(String identifier, String password) throws WSSecurityException
identifier
- The implementation-specific identifier corresponding to the keypassword
- The password needed to get the keyWSSecurityException
@Deprecated public boolean verifyTrust(X509Certificate[] certs) throws WSSecurityException
certs
- Certificate chain to validateWSSecurityException
public boolean verifyTrust(X509Certificate[] certs, boolean enableRevocation) throws WSSecurityException
certs
- Certificate chain to validateenableRevocation
- whether to enable CRL verification or notWSSecurityException
public boolean verifyTrust(PublicKey publicKey) throws WSSecurityException
publicKey
- The PublicKey to be evaluatedWSSecurityException
Copyright © 2004–2016 The Apache Software Foundation. All rights reserved.