|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ws.security.components.crypto.CryptoBase
org.apache.ws.security.components.crypto.CertificateStore
public class CertificateStore
A Crypto implementation based on a simple array of X509Certificate(s). PrivateKeys are not supported, so this cannot be used for signature creation, or decryption.
Field Summary | |
---|---|
protected X509Certificate[] |
trustedCerts
|
Fields inherited from class org.apache.ws.security.components.crypto.CryptoBase |
---|
certFactMap, cryptoProvider, defaultAlias, NAME_CONSTRAINTS_OID, SKI_OID |
Constructor Summary | |
---|---|
CertificateStore(X509Certificate[] trustedCerts)
Constructor |
Method Summary | |
---|---|
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. |
Methods inherited from class org.apache.ws.security.components.crypto.CryptoBase |
---|
createBCX509Name, getBytesFromCertificates, getCertificateFactory, getCertificatesFromBytes, getCryptoProvider, getDefaultX509Identifier, getSKIBytesFromCert, loadCertificate, setCertificateFactory, setCryptoProvider, setDefaultX509Identifier |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected X509Certificate[] trustedCerts
Constructor Detail |
---|
public CertificateStore(X509Certificate[] trustedCerts)
Method Detail |
---|
public X509Certificate[] getX509Certificates(CryptoType cryptoType) throws WSSecurityException
WSSecurityException
public String getX509Identifier(X509Certificate cert) throws WSSecurityException
cert
- The X509Certificate for which to search for an identifier
WSSecurityException
public PrivateKey getPrivateKey(X509Certificate certificate, CallbackHandler callbackHandler) throws WSSecurityException
certificate
- The X509Certificate corresponding to the private keycallbackHandler
- The callbackHandler needed to get the password
WSSecurityException
public PrivateKey getPrivateKey(String identifier, String password) throws WSSecurityException
identifier
- The implementation-specific identifier corresponding to the keypassword
- The password needed to get the key
WSSecurityException
@Deprecated public boolean verifyTrust(X509Certificate[] certs) throws WSSecurityException
certs
- Certificate chain to validate
WSSecurityException
public boolean verifyTrust(X509Certificate[] certs, boolean enableRevocation) throws WSSecurityException
certs
- Certificate chain to validateenableRevocation
- whether to enable CRL verification or not
WSSecurityException
public boolean verifyTrust(PublicKey publicKey) throws WSSecurityException
publicKey
- The PublicKey to be evaluated
WSSecurityException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |