You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ka...@apache.org on 2006/11/16 09:55:43 UTC
svn commit: r475643 - in /webservices/axis2/trunk/c/rampart:
samples/client/echo/data/Makefile.am
samples/client/enc_echo/data/server.enc.axis2.xml
src/handlers/rampart_out_handler.c src/util/username_token.c
Author: kaushalye
Date: Thu Nov 16 00:55:42 2006
New Revision: 475643
URL: http://svn.apache.org/viewvc?view=rev&rev=475643
Log:
Few log entries were added to handlers and username token to make debugging more easier.
Modified:
webservices/axis2/trunk/c/rampart/samples/client/echo/data/Makefile.am
webservices/axis2/trunk/c/rampart/samples/client/enc_echo/data/server.enc.axis2.xml
webservices/axis2/trunk/c/rampart/src/handlers/rampart_out_handler.c
webservices/axis2/trunk/c/rampart/src/util/username_token.c
Modified: webservices/axis2/trunk/c/rampart/samples/client/echo/data/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/samples/client/echo/data/Makefile.am?view=diff&rev=475643&r1=475642&r2=475643
==============================================================================
--- webservices/axis2/trunk/c/rampart/samples/client/echo/data/Makefile.am (original)
+++ webservices/axis2/trunk/c/rampart/samples/client/echo/data/Makefile.am Thu Nov 16 00:55:42 2006
@@ -1,4 +1,4 @@
datadir=$(prefix)/bin/samples/rampart/client/echo/data
-data_DATA=axis2.xml server.axis2.xml
-EXTRA_DIST=axis2.xml server.axis2.xml
+data_DATA=un_ts.axis2.xml
+EXTRA_DIST=un_ts.axis2.xml
Modified: webservices/axis2/trunk/c/rampart/samples/client/enc_echo/data/server.enc.axis2.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/samples/client/enc_echo/data/server.enc.axis2.xml?view=diff&rev=475643&r1=475642&r2=475643
==============================================================================
--- webservices/axis2/trunk/c/rampart/samples/client/enc_echo/data/server.enc.axis2.xml (original)
+++ webservices/axis2/trunk/c/rampart/samples/client/enc_echo/data/server.enc.axis2.xml Thu Nov 16 00:55:42 2006
@@ -22,6 +22,7 @@
<parameter name="OutflowSecurity">
<action>
<items>Encrypt</items>
+ <encryptionKeyTransportAlgorithm>http://www.w3.org/2000/09/xmldsig#rsa-sha1</encryptionKeyTransportAlgorithm>
<encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>
<encryptionPropFile>/home/kau/keys/rsapub.pem</encryptionPropFile>
</action>
@@ -31,6 +32,7 @@
<parameter name="InflowSecurity">
<action>
<items>Encrypt</items>
+ <encryptionKeyTransportAlgorithm>http://www.w3.org/2000/09/xmldsig#rsa-sha1</encryptionKeyTransportAlgorithm>
<encryptionSymAlgorithm>http://www.w3.org/200i1/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>
<decryptionPropFile>/home/kau/keys/rsakey.pem</decryptionPropFile>
</action>
Modified: webservices/axis2/trunk/c/rampart/src/handlers/rampart_out_handler.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/handlers/rampart_out_handler.c?view=diff&rev=475643&r1=475642&r2=475643
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/handlers/rampart_out_handler.c (original)
+++ webservices/axis2/trunk/c/rampart/src/handlers/rampart_out_handler.c Thu Nov 16 00:55:42 2006
@@ -269,7 +269,6 @@
{
AXIS2_LOG_INFO(env->log, "[rampart][rampart_out_handler] Encrypting we do not support yet");
- /*rampart_enc_encrypt_message(env, msg_ctx, actions, soap_envelope, sec_node);*/
/*Signature*/
}
Modified: webservices/axis2/trunk/c/rampart/src/util/username_token.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/util/username_token.c?view=diff&rev=475643&r1=475642&r2=475643
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/util/username_token.c (original)
+++ webservices/axis2/trunk/c/rampart/src/util/username_token.c Thu Nov 16 00:55:42 2006
@@ -150,14 +150,14 @@
/*callback()*/
if (!ptr)
{
- printf("\nCallback ptr is null");
+ AXIS2_LOG_INFO(env->log, "[rampart][rampart_usernametoken] Unable to create the pw callback module %s. ERROR", callback_module_name);
return NULL;
}
rcb = (rampart_callback_t*)ptr;
if (!rcb)
{
- printf("\nrampart_callback_t is null");
+ AXIS2_LOG_INFO(env->log, "[rampart][rampart_usernametoken] Unable to load the pw callback module %s. ERROR", callback_module_name);
return NULL;
}
/*Get callback specific property if any from the ctx*/
@@ -171,6 +171,7 @@
/*Get the password thru the callback*/
password = RAMPART_CALLBACK_CALLBACK_PASSWORD(rcb, env, username, cb_prop_val);
+ AXIS2_LOG_INFO(env->log, "[rampart][rampart_usernametoken] Password taken from the callback module %s. SUCCESS", callback_module_name);
return password;
}
@@ -268,6 +269,7 @@
if (!password)
{
+ AXIS2_LOG_INFO(env->log, "[rampart][rampart_usernametoken] Cannot find the password for user %s. ERROR", username);
return AXIS2_FAILURE;
}
@@ -423,7 +425,7 @@
sec_node = rampart_get_security_token(env, msg_ctx, soap_header);
if (!sec_node)
{
- AXIS2_LOG_INFO(env->log, " Cannot find sec_node.. :(");
+ AXIS2_LOG_INFO(env->log, " [rampart][rampart_usernametoken] Cannot find security header element");
return AXIS2_FAILURE;
}
@@ -431,7 +433,6 @@
sec_ele = AXIOM_NODE_GET_DATA_ELEMENT(sec_node, env);
if (!sec_ele)
{
- AXIS2_LOG_INFO(env->log, " Cannot find sec_ele... :(");
return AXIS2_FAILURE;
}
@@ -444,7 +445,7 @@
ut_ele = AXIOM_ELEMENT_GET_FIRST_CHILD_WITH_QNAME(sec_ele, env, qname, sec_node, &ut_node);
if (!ut_ele)
{
- AXIS2_LOG_INFO(env->log, "Cannot find UsernameToken in Security element...");
+ AXIS2_LOG_INFO(env->log, "[rampart][rampart_usernametoken] Cannot find UsernameToken in Security header element...");
AXIS2_ARRAY_LIST_ADD(sub_codes, env, "No username token in the security header");
return AXIS2_FAILURE;
}
@@ -500,7 +501,7 @@
if (!password_type)
{
/*R4201 Any PASSWORD MUST specify a Type attribute */
- AXIS2_LOG_INFO(env->log, "Password Type is not specified in the password element");
+ AXIS2_LOG_INFO(env->log, "[rampart][rampart_usernametoken] Password Type is not specified in the password element");
AXIS2_ARRAY_LIST_ADD(sub_codes, env, "Password Type is not specified in the password element");
return AXIS2_FAILURE;
}
@@ -520,7 +521,7 @@
}
else
{
- AXIS2_LOG_INFO(env->log, "\nUnknown element found %s -> %s", localname, AXIOM_ELEMENT_GET_TEXT(element, env, node));
+ AXIS2_LOG_INFO(env->log, "\n[rampart][rampart_usernametoken] Unknown element found %s -> %s", localname, AXIOM_ELEMENT_GET_TEXT(element, env, node));
}
@@ -528,7 +529,7 @@
}
else
{
- AXIS2_LOG_INFO(env->log, "Cannot find child elements of Usernametoken");
+ AXIS2_LOG_INFO(env->log, "[rampart][rampart_usernametoken] Cannot find child elements of Usernametoken");
return AXIS2_FAILURE;
}
@@ -545,6 +546,7 @@
if (!password_from_svr)
{
+ AXIS2_LOG_INFO(env->log, "[rampart][rampart_usernametoken] Cannot get the password for user %s", username);
return AXIS2_FAILURE;
}
/*Alright NOW we have the password. Is digest needed?*/
@@ -560,11 +562,12 @@
/*The BIG moment. Compare passwords*/
if (0 == AXIS2_STRCMP(password_to_compare , password))
{
- AXIS2_ARRAY_LIST_ADD(sub_codes, env, "Password is not valid");
return AXIS2_SUCCESS;
}
else
{
+ AXIS2_LOG_INFO(env->log, "[rampart][rampart_usernametoken] Password is not valid for user %s", username);
+ AXIS2_ARRAY_LIST_ADD(sub_codes, env, "Password is not valid");
return AXIS2_FAILURE;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org