ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1150653 - in /webservices/wss4j/trunk/src: main/java/org/apache/ws/security/message/token/UsernameToken.java test/java/org/apache/ws/security/message/UTDerivedKeyTest.java
Date Mon, 25 Jul 2011 12:07:18 GMT
Author: coheigea
Date: Mon Jul 25 12:07:17 2011
New Revision: 1150653

URL: http://svn.apache.org/viewvc?rev=1150653&view=rev
Log:
[WSS-299] - UsernameToken Salt Mac/Encryption Flag on Wrong End of Array

Modified:
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/token/UsernameToken.java
    webservices/wss4j/trunk/src/test/java/org/apache/ws/security/message/UTDerivedKeyTest.java

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/token/UsernameToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/token/UsernameToken.java?rev=1150653&r1=1150652&r2=1150653&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/token/UsernameToken.java
(original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/message/token/UsernameToken.java
Mon Jul 25 12:07:17 2011
@@ -849,9 +849,9 @@ public class UsernameToken {
             return null;
         }
         if (useForMac) {
-            saltValue[15] = 0x01;
+            saltValue[0] = 0x01;
         } else {
-            saltValue[15] = 0x02;
+            saltValue[0] = 0x02;
         }
         return saltValue;
     }

Modified: webservices/wss4j/trunk/src/test/java/org/apache/ws/security/message/UTDerivedKeyTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/test/java/org/apache/ws/security/message/UTDerivedKeyTest.java?rev=1150653&r1=1150652&r2=1150653&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/test/java/org/apache/ws/security/message/UTDerivedKeyTest.java
(original)
+++ webservices/wss4j/trunk/src/test/java/org/apache/ws/security/message/UTDerivedKeyTest.java
Mon Jul 25 12:07:17 2011
@@ -71,7 +71,7 @@ public class UTDerivedKeyTest extends or
         
         byte[] salt = usernameToken.addSalt(doc, null, false);
         assertTrue(salt.length == 16);
-        assertTrue(salt[15] == 0x02);
+        assertTrue(salt[0] == 0x02);
         byte[] utSalt = usernameToken.getSalt();
         assertTrue(salt.length == utSalt.length);
         for (int i = 0; i < salt.length; i++) {



Mime
View raw message