Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add method to set digest algorithm for signature (WSS4J) [SWS-761] #848

Closed
gregturn opened this issue Apr 11, 2012 · 2 comments
Closed

Add method to set digest algorithm for signature (WSS4J) [SWS-761] #848

gregturn opened this issue Apr 11, 2012 · 2 comments
Assignees
Milestone

Comments

@gregturn
Copy link
Member

@gregturn gregturn commented Apr 11, 2012

Oliver Mihatsch opened SWS-761 and commented

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>

Affects: 2.0.4

Reference URL: http://forum.springsource.org/showthread.php?125244-Missing-method-to-set-digest-algorithm-for-signature-%28WSS4J%29

Referenced from: commits d631f72

@gregturn
Copy link
Member Author

@gregturn gregturn commented May 1, 2012

Arjen Poutsma commented

Added formatting.

@gregturn
Copy link
Member Author

@gregturn gregturn commented May 4, 2012

Arjen Poutsma commented

Closing old issues

@gregturn gregturn closed this May 4, 2012
@gregturn gregturn added this to the 2.0.5 milestone Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.