|
||||||||||
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 java.security.cert.X509Certificate[] |
trustedCerts
|
Fields inherited from class org.apache.ws.security.components.crypto.CryptoBase |
---|
certFactMap, cryptoProvider, defaultAlias, NAME_CONSTRAINTS_OID, SKI_OID |
Constructor Summary | |
---|---|
CertificateStore(java.security.cert.X509Certificate[] trustedCerts)
Constructor |
Method Summary | |
---|---|
java.security.PrivateKey |
getPrivateKey(java.lang.String identifier,
java.lang.String password)
Gets the private key corresponding to the identifier. |
java.security.PrivateKey |
getPrivateKey(java.security.cert.X509Certificate certificate,
javax.security.auth.callback.CallbackHandler callbackHandler)
Gets the private key corresponding to the certificate. |
java.security.cert.X509Certificate[] |
getX509Certificates(CryptoType cryptoType)
Get an X509Certificate (chain) corresponding to the CryptoType argument. |
java.lang.String |
getX509Identifier(java.security.cert.X509Certificate cert)
Get the implementation-specific identifier corresponding to the cert parameter. |
boolean |
verifyTrust(java.security.PublicKey publicKey)
Evaluate whether a given public key should be trusted. |
boolean |
verifyTrust(java.security.cert.X509Certificate[] certs)
Deprecated. |
boolean |
verifyTrust(java.security.cert.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 java.security.cert.X509Certificate[] trustedCerts
Constructor Detail |
---|
public CertificateStore(java.security.cert.X509Certificate[] trustedCerts)
Method Detail |
---|
public java.security.cert.X509Certificate[] getX509Certificates(CryptoType cryptoType) throws WSSecurityException
WSSecurityException
public java.lang.String getX509Identifier(java.security.cert.X509Certificate cert) throws WSSecurityException
cert
- The X509Certificate for which to search for an identifier
WSSecurityException
public java.security.PrivateKey getPrivateKey(java.security.cert.X509Certificate certificate, javax.security.auth.callback.CallbackHandler callbackHandler) throws WSSecurityException
certificate
- The X509Certificate corresponding to the private keycallbackHandler
- The callbackHandler needed to get the password
WSSecurityException
public java.security.PrivateKey getPrivateKey(java.lang.String identifier, java.lang.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(java.security.cert.X509Certificate[] certs) throws WSSecurityException
certs
- Certificate chain to validate
WSSecurityException
public boolean verifyTrust(java.security.cert.X509Certificate[] certs, boolean enableRevocation) throws WSSecurityException
certs
- Certificate chain to validateenableRevocation
- whether to enable CRL verification or not
WSSecurityException
public boolean verifyTrust(java.security.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 |