-
Apr 10th, 2012, 06:38 AM
#1
Missing method to set digest algorithm for signature (WSS4J)
Hi Spring WS Team,
I wanted to change the digest algorithm which is used for signatures in secured SOAP Messages (default is SHA1). WSS4J supports this, but it seems this is not included in the Wss4jSecurityInterceptor facade (2.0.4.RELEASE) from Spring WS Security.
The constant "org.apache.ws.security.handler.WSHandlerConstants .SIG_DIGEST_ALGO" allows it to set the digest algorithm which is used in WSS signatures.
I patched the following code into the Wss4jSecurityInterceptor class and was then able to change the digest algorithm:
public void setSecurementSignatureDigestAlgorithm(String digestAlgo) {
handler.setOption(WSHandlerConstants.SIG_DIGEST_AL GO, digestAlgo);
}
Context XML:
<bean id="wsSecurityInterceptor" class="org.springframework.ws.soap.security.wss4j. Wss4jSecurityInterceptor">
.. snip ..
<property name="securementSignatureDigestAlgorithm" value="http://www.w3.org/2001/04/xmlenc#sha256"/>
</bean>
Is it possible to add this to the next spring ws security release?
Thanks and best regards,
Oliver
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules