org.apache.servicemix.soap.handlers.security
Class KeystoreInstanceCrypto

java.lang.Object
  extended by org.apache.servicemix.soap.handlers.security.BaseCrypto
      extended by org.apache.servicemix.soap.handlers.security.KeystoreInstanceCrypto
All Implemented Interfaces:
org.apache.ws.security.components.crypto.Crypto

public class KeystoreInstanceCrypto
extends BaseCrypto


Constructor Summary
KeystoreInstanceCrypto()
           
KeystoreInstanceCrypto(KeystoreInstance keystore)
           
KeystoreInstanceCrypto(KeystoreManager keystoreManager, String keystore)
           
 
Method Summary
protected  String[] getAliases()
           
protected  Certificate getCertificate(String alias)
           
protected  String getCertificateAlias(Certificate cert)
           
protected  Certificate[] getCertificateChain(String alias)
           
 KeystoreInstance getKeystore()
           
 PrivateKey getPrivateKey(String alias, String password)
          Gets the private key identified by alias and password.
protected  String[] getTrustCertificates()
           
 void setKeystore(KeystoreInstance keystore)
           
 
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
 

Constructor Detail

KeystoreInstanceCrypto

public KeystoreInstanceCrypto()

KeystoreInstanceCrypto

public KeystoreInstanceCrypto(KeystoreInstance keystore)

KeystoreInstanceCrypto

public KeystoreInstanceCrypto(KeystoreManager keystoreManager,
                              String keystore)
Method Detail

getKeystore

public KeystoreInstance getKeystore()
Returns:
the keystore

setKeystore

public void setKeystore(KeystoreInstance keystore)
Parameters:
keystore - the keystore to set

getAliases

protected String[] getAliases()
                       throws KeyStoreException
Specified by:
getAliases in class BaseCrypto
Throws:
KeyStoreException

getCertificate

protected Certificate getCertificate(String alias)
                              throws KeyStoreException
Specified by:
getCertificate in class BaseCrypto
Throws:
KeyStoreException

getCertificateAlias

protected String getCertificateAlias(Certificate cert)
                              throws KeyStoreException
Specified by:
getCertificateAlias in class BaseCrypto
Throws:
KeyStoreException

getCertificateChain

protected Certificate[] getCertificateChain(String alias)
                                     throws KeyStoreException
Specified by:
getCertificateChain in class BaseCrypto
Throws:
KeyStoreException

getPrivateKey

public PrivateKey getPrivateKey(String alias,
                                String password)
                         throws Exception
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 owner
password - The password needed to access the private key
Returns:
The private key
Throws:
Exception

getTrustCertificates

protected String[] getTrustCertificates()
                                 throws KeyStoreException
Specified by:
getTrustCertificates in class BaseCrypto
Throws:
KeyStoreException


Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.