|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ws.security.message.WSSecBase
org.apache.ws.security.message.WSSecDerivedKeyBase
org.apache.ws.security.message.WSSecDKSign
public class WSSecDKSign
Builder to sign with derived keys
| Field Summary | |
|---|---|
protected String |
canonAlgo
|
protected String |
sigAlgo
|
protected byte[] |
signatureValue
|
| Fields inherited from class org.apache.ws.security.message.WSSecDerivedKeyBase |
|---|
clientLabel, derivedKeyBytes, derivedKeyLength, dkt, dktId, document, envelope, ephemeralKey, serviceLabel, strElem, tokenIdDirectId, tokenIdentifier |
| Fields inherited from class org.apache.ws.security.message.WSSecBase |
|---|
doDebug, keyIdentifierType, parts, password, user, wssConfig |
| Constructor Summary | |
|---|---|
WSSecDKSign()
|
|
| Method Summary | |
|---|---|
void |
addReferencesToSign(Vector references,
WSSecHeader secHeader)
This method adds references to the Signature. |
void |
appendSigToHeader(WSSecHeader secHeader)
|
Document |
build(Document doc,
WSSecHeader secHeader)
|
void |
computeSignature()
Compute the Signature over the references. |
protected Element |
createSTRParameter(Document doc)
|
protected int |
getDerivedKeyLength()
The derived key will change depending on the sig/encr algorithm. |
protected Set |
getInclusivePrefixes(Element target)
|
protected Set |
getInclusivePrefixes(Element target,
boolean excludeVisible)
|
String |
getSigCanonicalization()
Get the canonicalization method. |
Element |
getSignatureElement()
Returns the signature Element. |
byte[] |
getSignatureValue()
|
void |
prepare(Document doc,
WSSecHeader secHeader)
|
void |
prependSigToHeader(WSSecHeader secHeader)
Prepends the Signature element to the elements already in the Security header. |
void |
setSigCanonicalization(String algo)
Set the canonicalization method to use. |
void |
setSignatureAlgorithm(String algo)
|
| Methods inherited from class org.apache.ws.security.message.WSSecDerivedKeyBase |
|---|
appendDKElementToHeader, getdktElement, getId, getTokenIdentifier, prepare, prependDKElementToHeader, setClientLabel, setCustomValueType, setDerivedKeyLength, setExternalKey, setExternalKey, setServiceLabel, setTokenIdDirectId, setWscVersion |
| Methods inherited from class org.apache.ws.security.message.WSSecBase |
|---|
getKeyIdentifierType, setBodyID, setKeyIdentifierType, setParts, setUserInfo, setWsConfig, setWsuId |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String sigAlgo
protected String canonAlgo
protected byte[] signatureValue
| Constructor Detail |
|---|
public WSSecDKSign()
| Method Detail |
|---|
public Document build(Document doc,
WSSecHeader secHeader)
throws WSSecurityException,
ConversationException
WSSecurityException
ConversationException
public void prepare(Document doc,
WSSecHeader secHeader)
throws WSSecurityException,
ConversationException
WSSecurityException
ConversationExceptionprotected Set getInclusivePrefixes(Element target)
protected Set getInclusivePrefixes(Element target,
boolean excludeVisible)
public void addReferencesToSign(Vector references,
WSSecHeader secHeader)
throws WSSecurityException
computeSignature(). This method can be called several
times to add references as required. addReferencesToSign()
can be called any time after prepare.
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.
WSSecurityExceptionprotected Element createSTRParameter(Document doc)
public void prependSigToHeader(WSSecHeader secHeader)
prepare().
This allows to insert the Signature element at any position in the
Security header.
secHeader - The secHeader that holds the Signature element.public void appendSigToHeader(WSSecHeader secHeader)
public Element getSignatureElement()
prepare().
public void computeSignature()
throws WSSecurityException
addReferencesToSign().
WSSecurityException
protected int getDerivedKeyLength()
throws WSSecurityException
WSSecDerivedKeyBase
getDerivedKeyLength in class WSSecDerivedKeyBaseWSSecurityExceptionWSSecDerivedKeyBase.getDerivedKeyLength()public void setSignatureAlgorithm(String algo)
public byte[] getSignatureValue()
public void setSigCanonicalization(String algo)
algo - Is the name of the signature algorithmWSConstants.C14N_OMIT_COMMENTS,
WSConstants.C14N_WITH_COMMENTS,
WSConstants.C14N_EXCL_OMIT_COMMENTS,
WSConstants.C14N_EXCL_WITH_COMMENTSpublic String getSigCanonicalization()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||