Merge pull request #153 from cjsr

* pr/153:
  Polish contribution
  Add support for configuring WSS4J's USE_SINGLE_CERTIFICATE option

Closes gh-153
This commit is contained in:
Stéphane Nicoll
2025-03-10 06:44:02 +01:00

View File

@@ -615,6 +615,18 @@ public class Wss4jSecurityInterceptor extends AbstractWsSecurityInterceptor impl
this.addInclusivePrefixes = addInclusivePrefixes;
}
/**
* Set whether to use a single certificate or a whole certificate chain when
* constructing a {@code BinarySecurityToken} used for direct reference in signature.
* default is {@code true}, meaning that only a single certificate is used.
* @param useSingleCertificate whether to use a single certificate
* @since 4.1.0
* @see WSHandlerConstants#USE_SINGLE_CERTIFICATE
*/
public void setUseSingleCertificate(boolean useSingleCertificate) {
this.handler.setOption(WSHandlerConstants.USE_SINGLE_CERTIFICATE, useSingleCertificate);
}
/**
* Sets whether the RSA 1.5 key transport algorithm is allowed.
*/