org.apache.servicemix.soap.handlers.security
Class KeystoreInstanceCrypto
java.lang.Object
org.apache.servicemix.soap.handlers.security.BaseCrypto
org.apache.servicemix.soap.handlers.security.KeystoreInstanceCrypto
- All Implemented Interfaces:
- org.apache.ws.security.components.crypto.Crypto
public class KeystoreInstanceCrypto
- extends BaseCrypto
| Methods inherited from class org.apache.servicemix.soap.handlers.security.BaseCrypto |
getAliasesForDN, getAliasForX509Cert, getAliasForX509Cert, getAliasForX509Cert, getAliasForX509Cert, getAliasForX509CertThumb, getCertificateChainOrCertificate, getCertificateData, getCertificateFactory, getCertificates, getDefaultX509Alias, getKeyStore, getProvider, getSKIBytesFromCert, getX509Certificates, loadCertificate, setDefaultX509Alias, setProvider, splitAndTrim, validateCertPath |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KeystoreInstanceCrypto
public KeystoreInstanceCrypto()
KeystoreInstanceCrypto
public KeystoreInstanceCrypto(KeystoreInstance keystore)
KeystoreInstanceCrypto
public KeystoreInstanceCrypto(KeystoreManager keystoreManager,
java.lang.String keystore)
getKeystore
public KeystoreInstance getKeystore()
- Returns:
- the keystore
setKeystore
public void setKeystore(KeystoreInstance keystore)
- Parameters:
keystore - the keystore to set
getAliases
protected java.lang.String[] getAliases()
throws java.security.KeyStoreException
- Specified by:
getAliases in class BaseCrypto
- Throws:
java.security.KeyStoreException
getCertificate
protected java.security.cert.Certificate getCertificate(java.lang.String alias)
throws java.security.KeyStoreException
- Specified by:
getCertificate in class BaseCrypto
- Throws:
java.security.KeyStoreException
getCertificateAlias
protected java.lang.String getCertificateAlias(java.security.cert.Certificate cert)
throws java.security.KeyStoreException
- Specified by:
getCertificateAlias in class BaseCrypto
- Throws:
java.security.KeyStoreException
getCertificateChain
protected java.security.cert.Certificate[] getCertificateChain(java.lang.String alias)
throws java.security.KeyStoreException
- Specified by:
getCertificateChain in class BaseCrypto
- Throws:
java.security.KeyStoreException
getPrivateKey
public java.security.PrivateKey getPrivateKey(java.lang.String alias,
java.lang.String password)
throws org.apache.ws.security.WSSecurityException
- Description copied from class:
BaseCrypto
- Gets the private key identified by
alias> and password.
- Specified by:
getPrivateKey in interface org.apache.ws.security.components.crypto.Crypto- Specified by:
getPrivateKey in class BaseCrypto
- Parameters:
alias - The alias (KeyStore) of the key ownerpassword - The password needed to access the private key
- Returns:
- The private key
- Throws:
org.apache.ws.security.WSSecurityException
getTrustCertificates
protected java.lang.String[] getTrustCertificates()
throws java.security.KeyStoreException
- Specified by:
getTrustCertificates in class BaseCrypto
- Throws:
java.security.KeyStoreException
getCryptoProvider
public java.lang.String getCryptoProvider()
setCryptoProvider
public void setCryptoProvider(java.lang.String provider)
getDefaultX509Identifier
public java.lang.String getDefaultX509Identifier()
throws org.apache.ws.security.WSSecurityException
- Throws:
org.apache.ws.security.WSSecurityException
setDefaultX509Identifier
public void setDefaultX509Identifier(java.lang.String identifier)
setCertificateFactory
public void setCertificateFactory(java.lang.String provider,
java.security.cert.CertificateFactory certFactory)
getBytesFromCertificates
public byte[] getBytesFromCertificates(java.security.cert.X509Certificate[] certs)
throws org.apache.ws.security.WSSecurityException
- Throws:
org.apache.ws.security.WSSecurityException
getCertificatesFromBytes
public java.security.cert.X509Certificate[] getCertificatesFromBytes(byte[] data)
throws org.apache.ws.security.WSSecurityException
- Throws:
org.apache.ws.security.WSSecurityException
getX509Certificates
public java.security.cert.X509Certificate[] getX509Certificates(org.apache.ws.security.components.crypto.CryptoType cryptoType)
throws org.apache.ws.security.WSSecurityException
- Throws:
org.apache.ws.security.WSSecurityException
getX509Identifier
public java.lang.String getX509Identifier(java.security.cert.X509Certificate cert)
throws org.apache.ws.security.WSSecurityException
- Throws:
org.apache.ws.security.WSSecurityException
getPrivateKey
public java.security.PrivateKey getPrivateKey(java.security.cert.X509Certificate certificate,
javax.security.auth.callback.CallbackHandler callbackHandler)
throws org.apache.ws.security.WSSecurityException
- Throws:
org.apache.ws.security.WSSecurityException
verifyTrust
public boolean verifyTrust(java.security.cert.X509Certificate[] certs)
throws org.apache.ws.security.WSSecurityException
- Throws:
org.apache.ws.security.WSSecurityException
verifyTrust
public boolean verifyTrust(java.security.PublicKey publicKey)
throws org.apache.ws.security.WSSecurityException
- Throws:
org.apache.ws.security.WSSecurityException
Copyright © 2005-2012 FuseSource. All Rights Reserved.