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/09/10 05:58:48 UTC

svn commit: r574126 - /webservices/rampart/trunk/c/src/util/rampart_sec_header_processor.c

Author: manjula
Date: Sun Sep  9 20:58:48 2007
New Revision: 574126

URL: http://svn.apache.org/viewvc?rev=574126&view=rev
Log:
Improved error handling.

Modified:
    webservices/rampart/trunk/c/src/util/rampart_sec_header_processor.c

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=574126&r1=574125&r2=574126&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 Sun Sep  9 20:58:48 2007
@@ -1244,7 +1244,11 @@
                     if(!cur_node)
                     {
                         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
-                            "[rampart][shp] Nothing to encrypt outside Security header");
+                            "[rampart][shp] Protection order is wrong or Signature not encrypted.");
+                        rampart_create_fault_envelope(
+                            env, RAMPART_FAULT_INVALID_SECURITY, "Protection order is wrong or Signature is not encrypted. ",
+                            RAMPART_FAULT_IN_ENCRYPTED_KEY, msg_ctx);
+
                         return AXIS2_FAILURE;
                     }
                     status = rampart_shp_process_reference_list(env, msg_ctx, 
@@ -1252,8 +1256,12 @@
                     
                     if(status != AXIS2_SUCCESS)
                     {
+                        rampart_create_fault_envelope(
+                            env, RAMPART_FAULT_INVALID_SECURITY, "Error in decrypting the signature. ",
+                            RAMPART_FAULT_IN_ENCRYPTED_KEY, msg_ctx);
+
                         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
-                            "[rampart][shp] Nothing to encrypt outside Security header");
+                            "[rampart][shp] Error in decrypting the Signature.");
                         return status;
                     }
                 }