From d955cc878d69a79a101ab59c44388bfd85ef5508 Mon Sep 17 00:00:00 2001 From: Jonas Christiaens Date: Thu, 13 Feb 2020 21:36:54 +0100 Subject: [PATCH] Add support for configuring WSS4J's USE_SINGLE_CERTIFICATE option This commit allows to configure the `USE_SINGLE_CERTIFICATE` option, which enables the choice of using valueType X509PKIPathv1 instead of X509v3. See gh-153 --- .../ws/soap/security/wss4j2/Wss4jSecurityInterceptor.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spring-ws-security/src/main/java/org/springframework/ws/soap/security/wss4j2/Wss4jSecurityInterceptor.java b/spring-ws-security/src/main/java/org/springframework/ws/soap/security/wss4j2/Wss4jSecurityInterceptor.java index fec85315..31576e18 100644 --- a/spring-ws-security/src/main/java/org/springframework/ws/soap/security/wss4j2/Wss4jSecurityInterceptor.java +++ b/spring-ws-security/src/main/java/org/springframework/ws/soap/security/wss4j2/Wss4jSecurityInterceptor.java @@ -595,6 +595,14 @@ public class Wss4jSecurityInterceptor extends AbstractWsSecurityInterceptor impl this.enableRevocation = enableRevocation; } + /** + * Enables the {@code useSingleCertificate} attribute on WS-Security headers on outgoing messages. Default is + * {@code true}. + */ + public void setUseSingleCertificate(boolean useSingleCertificate) { + handler.setOption(WSHandlerConstants.USE_SINGLE_CERTIFICATE, useSingleCertificate); + } + /** * Set the WS-I Basic Security Profile compliance mode. Default is {@code true}. */