You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by co...@apache.org on 2009/07/03 12:26:29 UTC

svn commit: r790849 - in /webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security: handler/WSHandler.java util/WSSecurityUtil.java

Author: coheigea
Date: Fri Jul  3 10:26:29 2009
New Revision: 790849

URL: http://svn.apache.org/viewvc?rev=790849&view=rev
Log:
Backmerged to 1_5_fixes.

Modified:
    webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/handler/WSHandler.java
    webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/util/WSSecurityUtil.java

Modified: webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/handler/WSHandler.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/handler/WSHandler.java?rev=790849&r1=790848&r2=790849&view=diff
==============================================================================
--- webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/handler/WSHandler.java (original)
+++ webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/handler/WSHandler.java Fri Jul  3 10:26:29 2009
@@ -93,8 +93,9 @@
             wssConfig = WSSConfig.getNewInstance();
         }
 
+        boolean enableSigConf = decodeEnableSignatureConfirmation(reqData);
         wssConfig.setEnableSignatureConfirmation(
-            decodeEnableSignatureConfirmation(reqData)
+            enableSigConf || ((doAction & WSConstants.SC) != 0)
         );
 
         wssConfig.setPrecisionInMilliSeconds(
@@ -253,8 +254,9 @@
         if (wssConfig == null) {
             wssConfig = WSSConfig.getNewInstance();
         }
+        boolean enableSigConf = decodeEnableSignatureConfirmation(reqData);
         wssConfig.setEnableSignatureConfirmation(
-            decodeEnableSignatureConfirmation(reqData)
+            enableSigConf || ((doAction & WSConstants.SC) != 0)
         );
         wssConfig.setTimeStampStrict(decodeTimestampStrict(reqData));
         wssConfig.setHandleCustomPasswordTypes(decodeCustomPasswordTypes(reqData));

Modified: webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/util/WSSecurityUtil.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/util/WSSecurityUtil.java?rev=790849&r1=790848&r2=790849&view=diff
==============================================================================
--- webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/util/WSSecurityUtil.java (original)
+++ webservices/wss4j/branches/1_5_x-fixes/src/org/apache/ws/security/util/WSSecurityUtil.java Fri Jul  3 10:26:29 2009
@@ -879,6 +879,9 @@
             } else if (single[i].equals(WSHandlerConstants.SIGN_WITH_UT_KEY)) {
                 doAction |= WSConstants.UT_SIGN;
                 actions.add(new Integer(WSConstants.UT_SIGN));
+            } else if (single[i].equals(WSHandlerConstants.ENABLE_SIGNATURE_CONFIRMATION)) {
+                doAction |= WSConstants.SC;
+                actions.add(new Integer(WSConstants.SC));
             } else {
                 throw new WSSecurityException(
                     "Unknown action defined: " + single[i]
@@ -936,6 +939,9 @@
             } else if (single[i].equals(WSHandlerConstants.SIGN_WITH_UT_KEY)) {
                 doAction |= WSConstants.UT_SIGN;
                 actions.add(new Integer(WSConstants.UT_SIGN));
+            } else if (single[i].equals(WSHandlerConstants.ENABLE_SIGNATURE_CONFIRMATION)) {
+                doAction |= WSConstants.SC;
+                actions.add(new Integer(WSConstants.SC));
             } else {
                 try {
                     int parsedAction = Integer.parseInt(single[i]);



---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org