You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by ma...@apache.org on 2007/08/22 09:34:21 UTC

svn commit: r568486 - in /webservices/rampart/trunk/c/src: omxmlsec/axiom.c util/rampart_signature.c

Author: manjula
Date: Wed Aug 22 00:34:19 2007
New Revision: 568486

URL: http://svn.apache.org/viewvc?rev=568486&view=rev
Log:
Fixing a bug.

Modified:
    webservices/rampart/trunk/c/src/omxmlsec/axiom.c
    webservices/rampart/trunk/c/src/util/rampart_signature.c

Modified: webservices/rampart/trunk/c/src/omxmlsec/axiom.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/axiom.c?rev=568486&r1=568485&r2=568486&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/axiom.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/axiom.c Wed Aug 22 00:34:19 2007
@@ -238,7 +238,6 @@
                 return axiom_attribute_get_value(om_attr, env);
             }
         }
-
     }
 
     return NULL;

Modified: webservices/rampart/trunk/c/src/util/rampart_signature.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/util/rampart_signature.c?rev=568486&r1=568485&r2=568486&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/util/rampart_signature.c (original)
+++ webservices/rampart/trunk/c/src/util/rampart_signature.c Wed Aug 22 00:34:19 2007
@@ -179,17 +179,22 @@
         }
         axutil_array_list_add(nodes_to_sign,env,ts_node);
     }
-    if(rampart_context_get_require_ut(rampart_context,env))
+
+    if(server_side)
     {
-        axiom_node_t *ut_node = NULL;
-        ut_node = oxs_axiom_get_node_by_local_name(env,sec_node,RAMPART_SECURITY_USERNAMETOKEN);
-        if(!ut_node)
+        if(rampart_context_get_require_ut(rampart_context,env))
         {
-            AXIS2_LOG_INFO(env->log, "[rampart][rampart_signature] Required username token cannot be found.");
-            return AXIS2_FAILURE;
+            axiom_node_t *ut_node = NULL;
+            ut_node = oxs_axiom_get_node_by_local_name(env,sec_node,RAMPART_SECURITY_USERNAMETOKEN);
+            if(!ut_node)
+            {
+                AXIS2_LOG_INFO(env->log, "[rampart][rampart_signature] Required username token cannot be found.");
+                return AXIS2_FAILURE;
+            }
+            axutil_array_list_add(nodes_to_sign,env,ut_node);
         }
-        axutil_array_list_add(nodes_to_sign,env,ut_node);
     }
+
     /*Now we have to check whether a token is specified.*/
     token = rampart_context_get_token(rampart_context, env, AXIS2_FALSE, server_side, AXIS2_FALSE);
     if(!token)