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/07/12 10:00:30 UTC
svn commit: r555521 - in /webservices/rampart/trunk/c/src:
handlers/rampart_in_handler.c handlers/rampart_out_handler.c
util/rampart_context.c
Author: manjula
Date: Thu Jul 12 01:00:29 2007
New Revision: 555521
URL: http://svn.apache.org/viewvc?view=rev&rev=555521
Log:
Calling rampart context free and Signing the Body element instead of Body Child element.
Modified:
webservices/rampart/trunk/c/src/handlers/rampart_in_handler.c
webservices/rampart/trunk/c/src/handlers/rampart_out_handler.c
webservices/rampart/trunk/c/src/util/rampart_context.c
Modified: webservices/rampart/trunk/c/src/handlers/rampart_in_handler.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/handlers/rampart_in_handler.c?view=diff&rev=555521&r1=555520&r2=555521
==============================================================================
--- webservices/rampart/trunk/c/src/handlers/rampart_in_handler.c (original)
+++ webservices/rampart/trunk/c/src/handlers/rampart_in_handler.c Thu Jul 12 01:00:29 2007
@@ -155,15 +155,14 @@
{
AXIS2_LOG_INFO(env->log,
"[rampart][rampart_in_handler] Security Header processing failed.");
- /* rampart_engine_shutdown(env,rampart_context);*/
return status;
}
serverside = axis2_msg_ctx_get_server_side(msg_ctx,env);
- /*We do not need rampart context to be freed in the server side*/
- if(!serverside){
- /*This method will free the rampart_context*/
-/* status = rampart_engine_shutdown(env, rampart_context);*/
+ if(serverside)
+ {
+ rampart_context_free(rampart_context, env);
+ rampart_context = NULL;
}
return status;
Modified: webservices/rampart/trunk/c/src/handlers/rampart_out_handler.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/handlers/rampart_out_handler.c?view=diff&rev=555521&r1=555520&r2=555521
==============================================================================
--- webservices/rampart/trunk/c/src/handlers/rampart_out_handler.c (original)
+++ webservices/rampart/trunk/c/src/handlers/rampart_out_handler.c Thu Jul 12 01:00:29 2007
@@ -129,20 +129,18 @@
return AXIS2_FAILURE;
}
-/*
- rampart_context = rampart_engine_init(env,msg_ctx,AXIS2_FALSE);
- if(!rampart_context)
- return AXIS2_FAILURE;
-*/
/*We call the security header builder*/
status = rampart_shb_build_message(env, msg_ctx, rampart_context, soap_envelope);
if(AXIS2_FAILURE == status){
AXIS2_LOG_INFO(env->log,
"[rampart][rampart_out_handler] Security header building failed ERROR");
- /* rampart_engine_shutdown(env,rampart_context);*/
return AXIS2_FAILURE;
}
- /*status = rampart_engine_shutdown(env,rampart_context);*/
+ if(serverside)
+ {
+ rampart_context_free(rampart_context, env);
+ rampart_context = NULL;
+ }
}
return status;
}
Modified: webservices/rampart/trunk/c/src/util/rampart_context.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/util/rampart_context.c?view=diff&rev=555521&r1=555520&r2=555521
==============================================================================
--- webservices/rampart/trunk/c/src/util/rampart_context.c (original)
+++ webservices/rampart/trunk/c/src/util/rampart_context.c Thu Jul 12 01:00:29 2007
@@ -1616,7 +1616,14 @@
body = axiom_soap_envelope_get_body(soap_envelope, env);
body_node = axiom_soap_body_get_base_node(body, env);
body_child_node = axiom_node_get_first_element(body_node, env);
- axutil_array_list_add(nodes_to_sign_or_encrypt, env, body_child_node);
+ if(is_sign)
+ {
+ axutil_array_list_add(nodes_to_sign_or_encrypt, env, body_node);
+ }
+ else
+ {
+ axutil_array_list_add(nodes_to_sign_or_encrypt, env, body_child_node);
+ }
return AXIS2_SUCCESS;
}
else