Author: kaushalye
Date: Mon Nov 26 00:41:42 2007
New Revision: 598166
URL: http://svn.apache.org/viewvc?rev=598166&view=rev
Log:
Memory leak fix
Modified:
webservices/rampart/trunk/c/src/omxmlsec/signature.c
webservices/rampart/trunk/c/src/util/rampart_sec_header_processor.c
Modified: webservices/rampart/trunk/c/src/omxmlsec/signature.c
URL:
http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/signature.c?rev=598166&r1=598165&r2=598166&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/signature.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/signature.c Mon Nov 26 00:41:42
2007
@@ -67,10 +67,15 @@
status = oxs_buffer_populate(output, env, (unsigned char*)encoded_str,
encodedlen);
+
/*Free signed_result_buf*/
oxs_buffer_free(signed_result_buf, env);
signed_result_buf = NULL;
+ /*Free encoded_str*/
+ AXIS2_FREE(env->allocator, encoded_str);
+ encoded_str = NULL;
+
return AXIS2_SUCCESS;
}
Modified: webservices/rampart/trunk/c/src/util/rampart_sec_header_processor.c
URL:
http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/util/rampart_sec_header_processor.c?rev=598166&r1=598165&r2=598166&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/util/rampart_sec_header_processor.c
(original)
+++ webservices/rampart/trunk/c/src/util/rampart_sec_header_processor.c Mon Nov
26 00:41:42 2007
@@ -966,15 +966,7 @@
return AXIS2_FAILURE;
}
- /*if(rampart_context_check_is_derived_keys(env, token))
- {
- rampart_create_fault_envelope(env,
RAMPART_FAULT_UNSUPPORTED_SECURITY_TOKEN,
- "Derived Keys are not supported.",
RAMPART_FAULT_IN_SIGNATURE, msg_ctx);
- AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
- "[rampart][shp] Derived Keys are not supported.");
-
- return AXIS2_FAILURE;
- }*/
+
is_include_token = rampart_context_is_token_include(
rampart_context, token, token_type, server_side,
AXIS2_TRUE, env);
@@ -1313,7 +1305,24 @@
}
return AXIS2_SUCCESS;
}
-/***/
+#if 0
+static axis2_status_t
+rampart_shp_process_bst(const axutil_env_t *env,
+ axis2_msg_ctx_t *msg_ctx,
+ rampart_context_t *rampart_context,
+ axiom_node_t *sec_node,
+ axiom_node_t *bst_node)
+{
+ axis2_char_t *cert_buf = NULL;
+
+ cert_buf = (axis2_char_t*)oxs_axiom_get_node_content(env, bst_node);
+ /*Set to Rampart Context*/
+ rampart_context_set_certificate(rampart_context, env, cert_buf);
+ rampart_context_set_certificate_type(rampart_context, env,
AXIS2_KEY_TYPE_PEM);
+ return AXIS2_SUCCESS;
+}
+#endif
+
static axis2_status_t
rampart_shp_process_derived_key(const axutil_env_t *env,
axis2_msg_ctx_t *msg_ctx,