Fixing build following WSS4J changes
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/189756a8 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/189756a8 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/189756a8 Branch: refs/heads/master-jaxrs-2.1 Commit: 189756a8ff668d39d59cb7ff1658ed40d70ec12b Parents: 8f8e587 Author: Colm O hEigeartaigh <cohei...@apache.org> Authored: Mon Jul 18 18:01:41 2016 +0100 Committer: Colm O hEigeartaigh <cohei...@apache.org> Committed: Mon Jul 18 19:47:15 2016 +0100 ---------------------------------------------------------------------- .../ws/security/wss4j/WSS4JInInterceptor.java | 12 ---------- .../security/wss4j/WSS4JStaxInInterceptor.java | 24 +++----------------- 2 files changed, 3 insertions(+), 33 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/189756a8/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java index bd90c04..b7c3d6d 100644 --- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java +++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java @@ -399,31 +399,22 @@ public class WSS4JInInterceptor extends AbstractWSS4JInterceptor { protected void configureReplayCaches(RequestData reqData, List<Integer> actions, SoapMessage msg) throws WSSecurityException { - reqData.setEnableNonceReplayCache(false); if (isNonceCacheRequired(actions, msg)) { ReplayCache nonceCache = getReplayCache( msg, SecurityConstants.ENABLE_NONCE_CACHE, SecurityConstants.NONCE_CACHE_INSTANCE ); reqData.setNonceReplayCache(nonceCache); - if (nonceCache != null) { - reqData.setEnableNonceReplayCache(true); - } } - reqData.setEnableTimestampReplayCache(false); if (isTimestampCacheRequired(actions, msg)) { ReplayCache timestampCache = getReplayCache( msg, SecurityConstants.ENABLE_TIMESTAMP_CACHE, SecurityConstants.TIMESTAMP_CACHE_INSTANCE ); reqData.setTimestampReplayCache(timestampCache); - if (timestampCache != null) { - reqData.setEnableTimestampReplayCache(true); - } } - reqData.setEnableSamlOneTimeUseReplayCache(false); if (isSamlCacheRequired(actions, msg)) { ReplayCache samlCache = getReplayCache( @@ -431,9 +422,6 @@ public class WSS4JInInterceptor extends AbstractWSS4JInterceptor { SecurityConstants.SAML_ONE_TIME_USE_CACHE_INSTANCE ); reqData.setSamlOneTimeUseReplayCache(samlCache); - if (samlCache != null) { - reqData.setEnableSamlOneTimeUseReplayCache(true); - } } } http://git-wip-us.apache.org/repos/asf/cxf/blob/189756a8/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java ---------------------------------------------------------------------- diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java index b855505..26376f2 100644 --- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java +++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java @@ -208,13 +208,7 @@ public class WSS4JStaxInInterceptor extends AbstractWSS4JStaxInterceptor { msg, SecurityConstants.ENABLE_NONCE_CACHE, SecurityConstants.NONCE_CACHE_INSTANCE ); } - if (nonceCache == null) { - securityProperties.setEnableNonceReplayCache(false); - securityProperties.setNonceReplayCache(null); - } else { - securityProperties.setEnableNonceReplayCache(true); - securityProperties.setNonceReplayCache(nonceCache); - } + securityProperties.setNonceReplayCache(nonceCache); ReplayCache timestampCache = null; if (isTimestampCacheRequired(msg, securityProperties)) { @@ -222,13 +216,7 @@ public class WSS4JStaxInInterceptor extends AbstractWSS4JStaxInterceptor { msg, SecurityConstants.ENABLE_TIMESTAMP_CACHE, SecurityConstants.TIMESTAMP_CACHE_INSTANCE ); } - if (timestampCache == null) { - securityProperties.setEnableTimestampReplayCache(false); - securityProperties.setTimestampReplayCache(null); - } else { - securityProperties.setEnableTimestampReplayCache(true); - securityProperties.setTimestampReplayCache(timestampCache); - } + securityProperties.setTimestampReplayCache(timestampCache); ReplayCache samlCache = null; if (isSamlCacheRequired(msg, securityProperties)) { @@ -237,13 +225,7 @@ public class WSS4JStaxInInterceptor extends AbstractWSS4JStaxInterceptor { SecurityConstants.SAML_ONE_TIME_USE_CACHE_INSTANCE ); } - if (samlCache == null) { - securityProperties.setEnableSamlOneTimeUseReplayCache(false); - securityProperties.setSamlOneTimeUseReplayCache(null); - } else { - securityProperties.setEnableSamlOneTimeUseReplayCache(true); - securityProperties.setSamlOneTimeUseReplayCache(samlCache); - } + securityProperties.setSamlOneTimeUseReplayCache(samlCache); boolean enableRevocation = MessageUtils.isTrue(SecurityUtils.getSecurityPropertyValue(SecurityConstants.ENABLE_REVOCATION, msg));