|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.rahas.impl.util.CommonUtil
public class CommonUtil
This class implements some utility methods common to SAML1 and SAML2.
Constructor Summary | |
---|---|
CommonUtil()
|
Method Summary | |
---|---|
static java.security.cert.X509Certificate |
getCertificateByAlias(org.apache.ws.security.components.crypto.Crypto crypto,
java.lang.String alias)
Gets the certificates chain by alias. |
static java.security.cert.X509Certificate[] |
getCertificatesByAlias(org.apache.ws.security.components.crypto.Crypto crypto,
java.lang.String alias)
Gets the certificates chain by alias. |
static org.apache.ws.security.components.crypto.Crypto |
getCrypto(java.util.Properties properties,
java.lang.ClassLoader classLoader)
Constructs crypto configuration based on the given properties. |
static org.apache.ws.security.components.crypto.Crypto |
getCrypto(java.lang.String propertiesFile,
java.lang.ClassLoader classLoader)
Constructs crypto configuration based on the given properties. |
static byte[] |
getDecryptedBytes(javax.security.auth.callback.CallbackHandler callbackHandler,
org.apache.ws.security.components.crypto.Crypto crypto,
org.w3c.dom.Node encryptedKeyElement)
Decrypts the EncryptedKey element and returns the secret that was used. |
static org.w3c.dom.Document |
getOMDOMDocument()
This method creates a DOM compatible Axiom document. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommonUtil()
Method Detail |
---|
public static org.w3c.dom.Document getOMDOMDocument() throws TrustException
TrustException
- If an error occurred while creating the Document.public static java.security.cert.X509Certificate getCertificateByAlias(org.apache.ws.security.components.crypto.Crypto crypto, java.lang.String alias) throws TrustException
crypto
- Crypto to lookup certificate.alias
- Alias name.
TrustException
- If an error occurred
while retrieving the certificate or if no certificates are found for given alias.public static java.security.cert.X509Certificate[] getCertificatesByAlias(org.apache.ws.security.components.crypto.Crypto crypto, java.lang.String alias) throws TrustException
crypto
- Crypto to lookup certificate.alias
- Alias name.
TrustException
- If an error occurred
while retrieving the certificate.public static byte[] getDecryptedBytes(javax.security.auth.callback.CallbackHandler callbackHandler, org.apache.ws.security.components.crypto.Crypto crypto, org.w3c.dom.Node encryptedKeyElement) throws org.apache.ws.security.WSSecurityException
callbackHandler
- Callback handler to pass to WSS4J framework.crypto
- To get private key information.encryptedKeyElement
- The encrypted Key element.
org.apache.ws.security.WSSecurityException
- If an error is occurred while decrypting the element.public static org.apache.ws.security.components.crypto.Crypto getCrypto(java.util.Properties properties, java.lang.ClassLoader classLoader) throws TrustException
properties
- Crypto configuration properties.classLoader
- Class loader used to create provider.
TrustException
- If an error occurred while creating the Crypto object.public static org.apache.ws.security.components.crypto.Crypto getCrypto(java.lang.String propertiesFile, java.lang.ClassLoader classLoader) throws TrustException
propertiesFile
- Crypto configuration properties file name.classLoader
- Class loader used to create provider.
TrustException
- If an error occurred while creating the Crypto object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |