Skip to content

Commit 945b330

Browse files
committed
Merge pull request #153 from cjsr
* pr/153: Polish contribution Add support for configuring WSS4J's USE_SINGLE_CERTIFICATE option Closes gh-153
2 parents ef6dbe6 + cb977ce commit 945b330

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

spring-ws-security/src/main/java/org/springframework/ws/soap/security/wss4j2/Wss4jSecurityInterceptor.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,18 @@ public void setAddInclusivePrefixes(boolean addInclusivePrefixes) {
615615
this.addInclusivePrefixes = addInclusivePrefixes;
616616
}
617617

618+
/**
619+
* Set whether to use a single certificate or a whole certificate chain when
620+
* constructing a {@code BinarySecurityToken} used for direct reference in signature.
621+
* default is {@code true}, meaning that only a single certificate is used.
622+
* @param useSingleCertificate whether to use a single certificate
623+
* @since 4.1.0
624+
* @see WSHandlerConstants#USE_SINGLE_CERTIFICATE
625+
*/
626+
public void setUseSingleCertificate(boolean useSingleCertificate) {
627+
this.handler.setOption(WSHandlerConstants.USE_SINGLE_CERTIFICATE, useSingleCertificate);
628+
}
629+
618630
/**
619631
* Sets whether the RSA 1.5 key transport algorithm is allowed.
620632
*/

0 commit comments

Comments
 (0)