Announcement Announcement Module
Collapse
No announcement yet.
Missing method to set digest algorithm for signature (WSS4J) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
Working...
X