org.apache.ws.security.message
Class WSSecDKSign
java.lang.Object
org.apache.ws.security.message.WSSecBase
org.apache.ws.security.message.WSSecDerivedKeyBase
org.apache.ws.security.message.WSSecDKSign
- public class WSSecDKSign
- extends WSSecDerivedKeyBase
Builder to sign with derived keys
- Author:
- Ruchith Fernando (ruchith.fernando@gmail.com), Davanum Srinivas (dims@yahoo.com), Werner Dittmann (werner@apache.org)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sigAlgo
protected java.lang.String sigAlgo
canonAlgo
protected java.lang.String canonAlgo
signatureValue
protected byte[] signatureValue
WSSecDKSign
public WSSecDKSign()
build
public org.w3c.dom.Document build(org.w3c.dom.Document doc,
Crypto crypto,
WSSecHeader secHeader)
throws WSSecurityException
- Throws:
WSSecurityException
prepare
protected void prepare(org.w3c.dom.Document doc,
Crypto crypto,
WSSecHeader secHeader)
throws WSSecurityException
- Throws:
WSSecurityException
getInclusivePrefixes
protected java.util.Set getInclusivePrefixes(org.w3c.dom.Element target)
getInclusivePrefixes
protected java.util.Set getInclusivePrefixes(org.w3c.dom.Element target,
boolean excludeVisible)
addReferencesToSign
public void addReferencesToSign(java.util.Vector references,
WSSecHeader secHeader)
throws WSSecurityException
- This method adds references to the Signature.
The added references are signed when calling
computeSignature()
. This method can be called several
times to add references as required. addReferencesToSign()
can be called anytime after prepare
.
- Parameters:
references
- A vector containing WSEncryptionPart
objects
that define the parts to sign.secHeader
- Used to compute namespaces to be inserted by
InclusiveNamespaces to be WSI compliant.
- Throws:
WSSecurityException
createSTRParameter
protected org.w3c.dom.Element createSTRParameter(org.w3c.dom.Document doc)
prependSigToHeader
public void prependSigToHeader(WSSecHeader secHeader)
- Prepends the Signature element to the elements already in the Security
header.
The method can be called any time after
prepare()
.
This allows to insert the Signature element at any position in the
Security header.
computeSignature
public void computeSignature()
throws WSSecurityException
- Compute the Signature over the references.
After references are set this method computes the Signature for them.
This method can be called anytime after the references were set. See
addReferencesToSign()
.
- Throws:
WSSecurityException
getDerivedKeyLength
protected int getDerivedKeyLength()
throws WSSecurityException
- Description copied from class:
WSSecDerivedKeyBase
- The derived key will change depending on the sig/encr algorithm.
Therefore the child classes are expected to provide this value.
- Specified by:
getDerivedKeyLength
in class WSSecDerivedKeyBase
- Returns:
-
- Throws:
WSSecurityException
- See Also:
WSSecDerivedKeyBase.getDerivedKeyLength()
setSignatureAlgorithm
public void setSignatureAlgorithm(java.lang.String algo)
Copyright © 2004-2008 Apache Web Services. All Rights Reserved.