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 ka...@apache.org on 2007/06/08 08:48:38 UTC

svn commit: r545440 - in /webservices/rampart/trunk/c: Makefile.am rampart-tests.sh samples/secpolicy/README.txt src/omxmlsec/signature.c src/omxmlsec/transform.c src/omxmlsec/utility.c src/omxmlsec/xml_encryption.c src/omxmlsec/xml_signature.c

Author: kaushalye
Date: Thu Jun  7 23:48:37 2007
New Revision: 545440

URL: http://svn.apache.org/viewvc?view=rev&rev=545440
Log:
Memory leak fixes.
Changed build system, NOT TO build test in the first go.

Added:
    webservices/rampart/trunk/c/rampart-tests.sh   (with props)
Modified:
    webservices/rampart/trunk/c/Makefile.am
    webservices/rampart/trunk/c/samples/secpolicy/README.txt
    webservices/rampart/trunk/c/src/omxmlsec/signature.c
    webservices/rampart/trunk/c/src/omxmlsec/transform.c
    webservices/rampart/trunk/c/src/omxmlsec/utility.c
    webservices/rampart/trunk/c/src/omxmlsec/xml_encryption.c
    webservices/rampart/trunk/c/src/omxmlsec/xml_signature.c

Modified: webservices/rampart/trunk/c/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/Makefile.am?view=diff&rev=545440&r1=545439&r2=545440
==============================================================================
--- webservices/rampart/trunk/c/Makefile.am (original)
+++ webservices/rampart/trunk/c/Makefile.am Thu Jun  7 23:48:37 2007
@@ -1,5 +1,7 @@
-SUBDIRS = src  test
+SUBDIRS = src 
 include_HEADERS=$(top_builddir)/include/*.h
 EXTRA_DIST = LICENSE NOTICE build.sh autogen.sh samples build
 
+check:	
+	./rampart-tests.sh
 

Added: webservices/rampart/trunk/c/rampart-tests.sh
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/rampart-tests.sh?view=auto&rev=545440
==============================================================================
--- webservices/rampart/trunk/c/rampart-tests.sh (added)
+++ webservices/rampart/trunk/c/rampart-tests.sh Thu Jun  7 23:48:37 2007
@@ -0,0 +1,5 @@
+#!/bin/bash
+cd test
+make
+make install
+cd ..

Propchange: webservices/rampart/trunk/c/rampart-tests.sh
------------------------------------------------------------------------------
    svn:executable = *

Modified: webservices/rampart/trunk/c/samples/secpolicy/README.txt
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/secpolicy/README.txt?view=diff&rev=545440&r1=545439&r2=545440
==============================================================================
--- webservices/rampart/trunk/c/samples/secpolicy/README.txt (original)
+++ webservices/rampart/trunk/c/samples/secpolicy/README.txt Thu Jun  7 23:48:37 2007
@@ -2,9 +2,9 @@
 
 Simply give the scenario name as an argument to the script
 e.g. %sh deploy.sh scenario1 
+(Win32 users please use the win_deploy.bat)
 
 Make sure you have run the deploy_client_repo.sh.
-
 These scenarios will only copy the security policy xml files. To run the
 client use the script samples/client/sec_echo/update_n_run.sh or
 samples/client/sec_echo/update_n_run.bat
@@ -21,6 +21,12 @@
 
 FAQ:
 ---
+* I am NOT in LINUX. Are there any changes to be done in samples.
+----------------------------------------------------------------
+YES. You have to change file names accordingly. For example your password
+callback module might have "*.so" as the extension. This might be different in
+WIN32 and Mac OS.
+
 * I am in a HURRY and I need to try a scenario
 --------------------------------------------
 If you are in a real hurry and need to try a scenario please use the

Modified: webservices/rampart/trunk/c/src/omxmlsec/signature.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/signature.c?view=diff&rev=545440&r1=545439&r2=545440
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/signature.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/signature.c Thu Jun  7 23:48:37 2007
@@ -145,12 +145,16 @@
     if(AXIS2_SUCCESS != status){
         /*Error in signature processing*/
         oxs_error(env, ERROR_LOCATION, OXS_ERROR_SIG_VERIFICATION_FAILED,"Signature verification FAILED.");
+        oxs_buffer_free(sig_buf, env);
+        sig_buf = NULL;
         oxs_buffer_free(in_buf, env);
         in_buf = NULL;
         return AXIS2_FAILURE;
     }else{
 
         AXIS2_LOG_INFO(env->log, "[oxs][sig] Signature verification SUCCESS " );
+        oxs_buffer_free(sig_buf, env);
+        sig_buf = NULL;
         oxs_buffer_free(in_buf, env);
         in_buf = NULL;
         return AXIS2_SUCCESS;

Modified: webservices/rampart/trunk/c/src/omxmlsec/transform.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/transform.c?view=diff&rev=545440&r1=545439&r2=545440
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/transform.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/transform.c Thu Jun  7 23:48:37 2007
@@ -131,7 +131,6 @@
 oxs_transform_free(oxs_transform_t *transform,
                    const axutil_env_t *env)
 {
-    /*TODO free*/
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
     if (transform->id)

Modified: webservices/rampart/trunk/c/src/omxmlsec/utility.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/utility.c?view=diff&rev=545440&r1=545439&r2=545440
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/utility.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/utility.c Thu Jun  7 23:48:37 2007
@@ -35,6 +35,8 @@
     random =  axutil_strndup(env, axutil_uuid_gen(env),18);
     sprintf(_id, "%s-%s",prefix,random);
     id = (axis2_char_t*)axutil_strdup(env, _id);
+    AXIS2_FREE(env->allocator, random);
+    random = NULL;
     return id;
 
 }

Modified: webservices/rampart/trunk/c/src/omxmlsec/xml_encryption.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/xml_encryption.c?view=diff&rev=545440&r1=545439&r2=545440
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/xml_encryption.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/xml_encryption.c Thu Jun  7 23:48:37 2007
@@ -378,7 +378,7 @@
     cv_node = oxs_axiom_get_first_child_node_by_name(env, cd_node, OXS_NODE_CIPHER_VALUE,OXS_ENC_NS,OXS_XENC);
     cipher_val = oxs_token_get_cipher_value(env, cv_node);
 
-    /*NEW CODE*/
+    /*We need to remove new lines if any*/
     new_cipher_val = oxs_util_get_newline_removed_string(env, cipher_val);
 
     /*eof NEW CODE*/

Modified: webservices/rampart/trunk/c/src/omxmlsec/xml_signature.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/xml_signature.c?view=diff&rev=545440&r1=545439&r2=545440
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/xml_signature.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/xml_signature.c Thu Jun  7 23:48:37 2007
@@ -215,6 +215,12 @@
     /*Construct <SignatureValue>*/
     signature_val_node = oxs_token_build_signature_value_element(env, signature_node, signature_val);
 
+    /*Free*/
+    oxs_buffer_free(input_buf, env);
+    input_buf = NULL;
+    oxs_buffer_free(output_buf, env);
+    output_buf = NULL;
+
     return status;
 }