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;
}
}