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

setKeyPassword

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

getKeyStorePassword

public java.lang.String getKeyStorePassword()
Returns:
the keyStorePassword

setKeyStorePassword

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

getKeyStoreType

public java.lang.String getKeyStoreType()
Returns:
the keyStoreType

setKeyStoreType

public void setKeyStoreType(java.lang.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 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 java.lang.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:
java.lang.Exception

getTrustCertificates

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

loadKeyStore

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

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


Copyright © 2005-2011 FuseSource. All Rights Reserved.