You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by co...@apache.org on 2016/07/18 16:31:28 UTC

svn commit: r1753265 - in /webservices/wss4j/branches/2_1_x-fixes: ws-security-dom/src/test/java/org/apache/wss4j/dom/common/ ws-security-stax/src/test/java/org/apache/wss4j/stax/test/

Author: coheigea
Date: Mon Jul 18 16:31:28 2016
New Revision: 1753265

URL: http://svn.apache.org/viewvc?rev=1753265&view=rev
Log:
Fixing build

Modified:
    webservices/wss4j/branches/2_1_x-fixes/ws-security-dom/src/test/java/org/apache/wss4j/dom/common/SecurityTestUtil.java
    webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/ReplayTest.java
    webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/UsernameTokenTest.java

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-dom/src/test/java/org/apache/wss4j/dom/common/SecurityTestUtil.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-dom/src/test/java/org/apache/wss4j/dom/common/SecurityTestUtil.java?rev=1753265&r1=1753264&r2=1753265&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-dom/src/test/java/org/apache/wss4j/dom/common/SecurityTestUtil.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-dom/src/test/java/org/apache/wss4j/dom/common/SecurityTestUtil.java Mon Jul 18 16:31:28 2016
@@ -19,12 +19,12 @@
 package org.apache.wss4j.dom.common;
 
 import java.io.File;
-import java.util.Base64;
 
 import org.apache.wss4j.common.cache.ReplayCache;
 import org.apache.wss4j.common.cache.ReplayCacheFactory;
 import org.apache.wss4j.common.ext.WSSecurityException;
 import org.apache.wss4j.dom.util.WSSecurityUtil;
+import org.apache.xml.security.utils.Base64;
 
 /**
  * A utility class for security tests
@@ -51,7 +51,7 @@ public final class SecurityTestUtil {
 
     public static ReplayCache createCache(String key) throws WSSecurityException {
         ReplayCacheFactory replayCacheFactory = ReplayCacheFactory.newInstance();
-        String cacheKey = key + Base64.getEncoder().encodeToString(WSSecurityUtil.generateNonce(10));
+        String cacheKey = key + Base64.encode(WSSecurityUtil.generateNonce(10));
         return replayCacheFactory.newReplayCache(cacheKey, null);
     }
 }

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/ReplayTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/ReplayTest.java?rev=1753265&r1=1753264&r2=1753265&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/ReplayTest.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/ReplayTest.java Mon Jul 18 16:31:28 2016
@@ -21,7 +21,6 @@ package org.apache.wss4j.stax.test;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.InputStream;
-import java.util.Base64;
 import java.util.Properties;
 
 import javax.xml.stream.XMLStreamException;
@@ -44,6 +43,7 @@ import org.apache.wss4j.stax.test.saml.S
 import org.apache.wss4j.stax.test.utils.StAX2DOM;
 import org.apache.wss4j.stax.validate.SamlTokenValidatorImpl;
 import org.apache.xml.security.exceptions.XMLSecurityException;
+import org.apache.xml.security.utils.Base64;
 import org.junit.Assert;
 import org.junit.Test;
 import org.w3c.dom.Document;
@@ -56,7 +56,7 @@ public class ReplayTest extends Abstract
         byte[] nonceValue;
         try {
             nonceValue = WSSConstants.generateBytes(10);
-            String cacheKey = key + Base64.getEncoder().encodeToString(nonceValue);
+            String cacheKey = key + Base64.encode(nonceValue);
             return replayCacheFactory.newReplayCache(cacheKey, null);
         } catch (XMLSecurityException e) {
             throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, e);

Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/UsernameTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/UsernameTokenTest.java?rev=1753265&r1=1753264&r2=1753265&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/UsernameTokenTest.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/UsernameTokenTest.java Mon Jul 18 16:31:28 2016
@@ -23,7 +23,6 @@ import java.io.ByteArrayOutputStream;
 import java.io.InputStream;
 import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
-import java.util.Base64;
 import java.util.Calendar;
 import java.util.GregorianCalendar;
 import java.util.HashMap;
@@ -57,6 +56,8 @@ import org.apache.wss4j.stax.test.utils.
 import org.apache.xml.security.exceptions.XMLSecurityException;
 import org.apache.xml.security.stax.securityEvent.SecurityEvent;
 import org.apache.xml.security.stax.securityEvent.SecurityEventListener;
+import org.apache.xml.security.utils.Base64;
+
 import org.junit.Assert;
 import org.junit.Test;
 import org.w3c.dom.Document;
@@ -842,7 +843,7 @@ public class UsernameTokenTest extends A
         byte[] nonceValue;
         try {
             nonceValue = WSSConstants.generateBytes(10);
-            String cacheKey = key + Base64.getEncoder().encodeToString(nonceValue);
+            String cacheKey = key + Base64.encode(nonceValue);
             return replayCacheFactory.newReplayCache(cacheKey, null);
         } catch (XMLSecurityException e) {
             throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, e);