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

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

public class StandaloneCrypto
extends BaseCrypto


Constructor Summary
StandaloneCrypto()
           
 
Method Summary
protected  String[] getAliases()
           
protected  Certificate getCertificate(String alias)
           
protected  String getCertificateAlias(Certificate cert)
           
protected  Certificate[] getCertificateChain(String alias)
           
 String getKeyPassword()
           
 String getKeyStorePassword()
           
 String getKeyStoreType()
           
 org.springframework.core.io.Resource getKeyStoreUrl()
           
 PrivateKey getPrivateKey(String alias, String password)
          Gets the private key identified by alias and password.
protected  String[] getTrustCertificates()
           
 KeyStore loadKeyStore()
          Loads the the keystore.
 void setKeyPassword(String keyPassword)
           
 void setKeyStorePassword(String keyStorePassword)
           
 void setKeyStoreType(String keyStoreType)
           
 void setKeyStoreUrl(org.springframework.core.io.Resource keyStoreUrl)
           
 
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

StandaloneCrypto

public StandaloneCrypto()
Method Detail

getKeyPassword

public String getKeyPassword()
Returns:
the keyPassword

setKeyPassword

public void setKeyPassword(String keyPassword)
Parameters:
keyPassword - the keyPassword to set

getKeyStorePassword

public String getKeyStorePassword()
Returns:
the keyStorePassword

setKeyStorePassword

public void setKeyStorePassword(String keyStorePassword)
Parameters:
keyStorePassword - the keyStorePassword to set

getKeyStoreType

public String getKeyStoreType()
Returns:
the keyStoreType

setKeyStoreType

public void setKeyStoreType(String keyStoreType)
Parameters:
keyStoreType - the keyStoreType to set

getKeyStoreUrl

public org.springframework.core.io.Resource getKeyStoreUrl()
Returns:
the keyStoreUrl

setKeyStoreUrl

public void setKeyStoreUrl(org.springframework.core.io.Resource keyStoreUrl)
Parameters:
keyStoreUrl - the keyStoreUrl 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

loadKeyStore

public KeyStore loadKeyStore()
                      throws KeyStoreException
Loads the the keystore.

Throws:
org.apache.ws.security.components.crypto.CredentialException
KeyStoreException


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