Author: nandika
Date: Wed Jun 14 23:52:03 2006
New Revision: 414489
URL: http://svn.apache.org/viewvc?rev=414489&view=rev
Log:
compilation problems fixed for win32
Modified:
webservices/axis2/trunk/c/rampart/include/rampart_callback.h
webservices/axis2/trunk/c/rampart/include/rampart_constants.h
webservices/axis2/trunk/c/rampart/samples/callback/pwcb.c
webservices/axis2/trunk/c/rampart/src/handlers/rampart_out_handler.c
webservices/axis2/trunk/c/rampart/src/util/rampart_crypto_util.c
webservices/axis2/trunk/c/rampart/src/util/rampart_util.c
webservices/axis2/trunk/c/rampart/src/util/username_token.c
Modified: webservices/axis2/trunk/c/rampart/include/rampart_callback.h
URL:
http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/rampart_callback.h?rev=414489&r1=414488&r2=414489&view=diff
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/rampart_callback.h (original)
+++ webservices/axis2/trunk/c/rampart/include/rampart_callback.h Wed Jun 14
23:52:03 2006
@@ -50,10 +50,14 @@
axis2_char_t *(AXIS2_CALL*
get_password)(rampart_callback_t *rcb,
const axis2_env_t *env, const axis2_char_t *username);
+
+ axis2_status_t (AXIS2_CALL*
+ free)(rampart_callback_t *rcb,
+ const axis2_env_t* env);
};
- AXIS2_DECLARE_DATA struct rampart_callback
+ struct rampart_callback
{
rampart_callback_ops_t *ops;
};
Modified: webservices/axis2/trunk/c/rampart/include/rampart_constants.h
URL:
http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/rampart_constants.h?rev=414489&r1=414488&r2=414489&view=diff
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/rampart_constants.h (original)
+++ webservices/axis2/trunk/c/rampart/include/rampart_constants.h Wed Jun 14
23:52:03 2006
@@ -42,6 +42,8 @@
#define RAMPART_WSU_XMLNS
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
#define RAMPART_PASSWORD_DIGEST_URI
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest"
+#define RAMPART_PASSWORD_TEXT_URI
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"
+
/* Inflow outflow security parameter */
#define RAMPART_INFLOW_SECURITY "InflowSecurity"
#define RAMPART_OUTFLOW_SECURITY "OutflowSecurity"
Modified: webservices/axis2/trunk/c/rampart/samples/callback/pwcb.c
URL:
http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/samples/callback/pwcb.c?rev=414489&r1=414488&r2=414489&view=diff
==============================================================================
--- webservices/axis2/trunk/c/rampart/samples/callback/pwcb.c (original)
+++ webservices/axis2/trunk/c/rampart/samples/callback/pwcb.c Wed Jun 14
23:52:03 2006
@@ -5,9 +5,12 @@
#include <axis2_utils.h>
#include <rampart_callback.h>
#include <axis2_string.h>
+#include <axis2_svc_skeleton.h>
+#include <axis2_string.h>
-axis2_char_t* get_sample_password(rampart_callback_t *rcb,
+axis2_char_t* AXIS2_CALL
+get_sample_password(rampart_callback_t *rcb,
const axis2_env_t *env, const axis2_char_t *username)
{
axis2_char_t * pw = NULL;
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?rev=414489&r1=414488&r2=414489&view=diff
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/handlers/rampart_out_handler.c
(original)
+++ webservices/axis2/trunk/c/rampart/src/handlers/rampart_out_handler.c Wed
Jun 14 23:52:03 2006
@@ -176,37 +176,42 @@
sec_ns_obj = axiom_namespace_create (env, RAMPART_WSSE_XMLNS,
RAMPART_WSSE);
- sec_header_block = AXIOM_SOAP_HEADER_ADD_HEADER_BLOCK (soap_header,
- env,
RAMPART_SECURITY,
- sec_ns_obj);
+ sec_header_block = AXIOM_SOAP_HEADER_ADD_HEADER_BLOCK(soap_header,
+ env, RAMPART_SECURITY, sec_ns_obj);
+
if(sec_header_block)
{
axis2_char_t* item = NULL;
sec_node = AXIOM_SOAP_HEADER_BLOCK_GET_BASE_NODE
(sec_header_block, env);
sec_ele = (axiom_element_t *)
AXIOM_NODE_GET_DATA_ELEMENT (sec_node, env);
-
+ /*
AXIOM_ELEMENT_DECLARE_NAMESPACE (sec_ele, env,
sec_node, sec_ns_obj);
-
+ */
item = strtok (items," ");
while (item != NULL)
{
- if(0 == AXIS2_STRCMP(RAMPART_ACTION_ITEMS_USERNAMETOKEN ,
AXIS2_STRTRIM(env, item, NULL)))
+ if(0 == AXIS2_STRCMP(RAMPART_ACTION_ITEMS_USERNAMETOKEN ,
+ AXIS2_STRTRIM(env, item, NULL)))
{
- sec_node = rampart_build_username_token(env, ctx,
param_action, sec_node, sec_ns_obj);
+ sec_node = rampart_build_username_token(env,
+ ctx, param_action, sec_node, sec_ns_obj);
if(!sec_node)
return AXIS2_FAILURE;
- }else if(0 == AXIS2_STRCMP(RAMPART_ACTION_ITEMS_TIMESTAMP,
AXIS2_STRTRIM(env, item, NULL)))
+ }else if(0 == AXIS2_STRCMP(RAMPART_ACTION_ITEMS_TIMESTAMP,
+ AXIS2_STRTRIM(env, item, NULL)))
{
- sec_node = rampart_build_timestamp_token(env, ctx,
sec_node, sec_ns_obj, 300);
+ sec_node = rampart_build_timestamp_token(env,
+ ctx, sec_node, sec_ns_obj, 300);
if(!sec_node)
return AXIS2_FAILURE;
}else
{
- rampart_print_info(env," Rampart happy to see
usernametokens and timestamps at the moment");
+ rampart_print_info(env,
+ " Rampart happy to see usernametokens and timestamps
at the moment");
}
item = strtok (NULL, " ");
}
Modified: webservices/axis2/trunk/c/rampart/src/util/rampart_crypto_util.c
URL:
http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/util/rampart_crypto_util.c?rev=414489&r1=414488&r2=414489&view=diff
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/util/rampart_crypto_util.c (original)
+++ webservices/axis2/trunk/c/rampart/src/util/rampart_crypto_util.c Wed Jun 14
23:52:03 2006
@@ -45,7 +45,7 @@
result = AXIS2_MALLOC(env->allocator, SHA_DIGEST_LENGTH + 1);
SHA1(input,SHA_DIGEST_LENGTH, result);
- result[SHA_DIGEST_LENGTH + 1] = '\0';
+ result[SHA_DIGEST_LENGTH] = '\0';
encoded_str = AXIS2_MALLOC(env->allocator,
axis2_base64_encode_len(SIZE_HASH));
axis2_base64_encode(encoded_str, result, AXIS2_STRLEN(result));
Modified: webservices/axis2/trunk/c/rampart/src/util/rampart_util.c
URL:
http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/util/rampart_util.c?rev=414489&r1=414488&r2=414489&view=diff
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/util/rampart_util.c (original)
+++ webservices/axis2/trunk/c/rampart/src/util/rampart_util.c Wed Jun 14
23:52:03 2006
@@ -43,7 +43,7 @@
encoded_str = AXIS2_MALLOC(env->allocator, sizeof(char)*SIZE_NONCE);
axis2_base64_encode(encoded_str,rand_str,AXIS2_STRLEN(rand_str));
- AXIS2_FREE(env->allocator, rand_str);
+ /* AXIS2_FREE(env->allocator, rand_str); */
return encoded_str;
}
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?rev=414489&r1=414488&r2=414489&view=diff
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/util/username_token.c (original)
+++ webservices/axis2/trunk/c/rampart/src/util/username_token.c Wed Jun 14
23:52:03 2006
@@ -223,11 +223,11 @@
AXIOM_ELEMENT_SET_NAMESPACE(created_ele, env, wsu_ns_obj,
created_node);
}
-
+ /*
AXIS2_FREE(env->allocator, nonce_val);
AXIS2_FREE(env->allocator, created_val);
AXIS2_FREE(env->allocator, digest_val);
-
+ */
}else /*default is passwordText*/
{
pw_ele = axiom_element_create (env, ut_node,
RAMPART_SECURITY_USERNAMETOKEN_PASSWORD, sec_ns_obj,
@@ -312,6 +312,12 @@
password_type =
AXIOM_ELEMENT_GET_ATTRIBUTE_VALUE_BY_NAME(element,
env,
RAMPART_SECURITY_USERNAMETOKEN_PASSWORD_ATTR_TYPE);
+
+ if(!password_type)
+ {
+ password_type = RAMPART_PASSWORD_TEXT_URI;
+ }
+
password = AXIOM_ELEMENT_GET_TEXT(element, env, node);
@@ -347,7 +353,6 @@
{
return AXIS2_FAILURE;
}
-
/*Alright NOW we have the password. Is digest needed?*/
if(0 == AXIS2_STRCMP(password_type, RAMPART_PASSWORD_DIGEST_URI))
{
@@ -363,5 +368,5 @@
}else{
return AXIS2_FAILURE;
}
-
+ return AXIS2_SUCCESS;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]