Author: manjula Date: Thu May 17 07:07:24 2007 New Revision: 538931 URL: http://svn.apache.org/viewvc?view=rev&rev=538931 Log: Adding minor changes done during the interops to the svn
Modified: webservices/axis2/scratch/c/neethi/axis2c/neethi/test/main webservices/axis2/scratch/c/neethi/axis2c/neethi/test/main.c webservices/axis2/scratch/c/neethi/rampart/include/rampart_context.h webservices/axis2/scratch/c/neethi/rampart/samples/client/sec_echo/echo.c webservices/axis2/scratch/c/neethi/rampart/samples/client/sec_echo/policy.xml webservices/axis2/scratch/c/neethi/rampart/src/omxmlsec/encryption.c webservices/axis2/scratch/c/neethi/rampart/src/omxmlsec/xml_encryption.c webservices/axis2/scratch/c/neethi/rampart/src/omxmlsec/xml_signature.c webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_context.c webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_encryption.c webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_sec_header_processor.c webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_signature.c Modified: webservices/axis2/scratch/c/neethi/axis2c/neethi/test/main URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/neethi/test/main?view=diff&rev=538931&r1=538930&r2=538931 ============================================================================== Binary files - no diff available. Modified: webservices/axis2/scratch/c/neethi/axis2c/neethi/test/main.c URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/neethi/test/main.c?view=diff&rev=538931&r1=538930&r2=538931 ============================================================================== --- webservices/axis2/scratch/c/neethi/axis2c/neethi/test/main.c (original) +++ webservices/axis2/scratch/c/neethi/axis2c/neethi/test/main.c Thu May 17 07:07:24 2007 @@ -6,18 +6,32 @@ #include <stdio.h> #include <axiom_xml_reader.h> #include <neethi_engine.h> - +#include <axutil_hash.h> axis2_status_t AXIS2_CALL om_node_serialize( axiom_node_t *node, const axutil_env_t *env); -axis2_status_t AXIS2_CALL +/*axis2_status_t AXIS2_CALL load_policy_array( axutil_array_list_t *arraylist, axis2_char_t *file_name, const axutil_env_t *env); +*/ +axis2_status_t AXIS2_CALL +load_policy_array( + axutil_array_list_t *arraylist, + axiom_node_t *root, + const axutil_env_t *env); + +axiom_node_t * return_policy_element(axis2_char_t * name, const axutil_env_t * env, axis2_char_t * wsdl_name); + +axis2_char_t * get_policy_ref(axiom_node_t *node, const axutil_env_t * env); + +void get_all_policy(axis2_char_t * element_name, const axutil_env_t * env, axutil_array_list_t * policy_node_list, axis2_char_t *wsdl_name); + + neethi_policy_t *AXIS2_CALL merge_policylist( @@ -30,16 +44,23 @@ axis2_status_t status = AXIS2_FAILURE; int i = 0; axutil_array_list_t *policy_list = NULL; + axutil_array_list_t *policy_node_list = NULL; neethi_policy_t *resultant = NULL; axutil_allocator_t *allocator = axutil_allocator_init (NULL); axutil_error_t *error = axutil_error_create (allocator); const axutil_env_t *env = axutil_env_create_with_error(allocator, error); policy_list = axutil_array_list_create(env, 0); + policy_node_list = axutil_array_list_create(env, 0); - for(i=1; i<argc; i++) + get_all_policy(argv[1], env, policy_node_list, argv[2]); + + + for(i=0; i<axutil_array_list_size(policy_node_list, env); i++) { - status = load_policy_array(policy_list, argv[i], env); + axiom_node_t *node = NULL; + node = (axiom_node_t *)axutil_array_list_get(policy_node_list, env, i); + status = load_policy_array(policy_list, node, env); } resultant = merge_policylist(policy_list, env); @@ -115,7 +136,7 @@ printf("\naxiom_node_serialize success\n"); /* end serializing stuff */ - /*axiom_node_free_tree(node1, environment);*/ + /*axiom_node_free_tree(node1, env);*/ output_buffer = (axis2_char_t*)axiom_xml_writer_get_xml(writer, env); printf("\nend test_om_serialize\n"); @@ -127,66 +148,186 @@ axis2_status_t AXIS2_CALL load_policy_array( axutil_array_list_t *arraylist, - axis2_char_t *file_name, + axiom_node_t *root, const axutil_env_t *env) { - axiom_xml_reader_t *reader = NULL; - axiom_stax_builder_t *builder = NULL; - axiom_document_t *document = NULL; - axiom_node_t *root = NULL; axiom_element_t *root_ele = NULL; - reader = axiom_xml_reader_create_for_file(env, file_name, NULL); + if(root) + { + if(axiom_node_get_node_type(root, env) == AXIOM_ELEMENT) + { + root_ele = (axiom_element_t*)axiom_node_get_data_element(root, env); + if(root_ele) + { + neethi_policy_t *neethi_policy = NULL; + neethi_policy = neethi_engine_get_policy(env,root,root_ele); + if(!neethi_policy) + { + printf("Policy Creation fails\n"); + return AXIS2_FAILURE; + } + axutil_array_list_add(arraylist, env, neethi_policy); + } + } + } + return AXIS2_SUCCESS; +} + + +axiom_node_t * return_policy_element(axis2_char_t * name, const axutil_env_t * env, axis2_char_t * wsdl_name) +{ + axiom_element_t *ele1 = NULL, *ele2 = NULL; + axiom_document_t *document = NULL; + axiom_node_t *node1 = NULL, *node2 = NULL, *policy_node = NULL; + axiom_namespace_t* ns = NULL; + axiom_xml_reader_t *reader = NULL; + axiom_stax_builder_t *builder = NULL; + char *buffer = NULL; + axiom_attribute_t *attr = NULL; + axis2_char_t * value = NULL; + axis2_char_t * val = NULL; + axutil_hash_t *attr_hash = NULL; + axis2_char_t *xml_output = NULL; + axutil_hash_index_t *hi; + +/* + f = fopen(wsdl_name, "r"); + if (!f) + return NULL; + + reader = axiom_xml_reader_create_for_io(env, read_input, NULL , NULL, NULL); +*/ + reader = axiom_xml_reader_create_for_file(env, wsdl_name, NULL); if (!reader) { - AXIS2_ERROR_SET(env->error, AXIS2_ERROR_CREATING_XML_STREAM_READER, - AXIS2_FAILURE); - printf("xml reader creation failed\n"); - return AXIS2_FAILURE; + printf("ERROR CREATING PULLPARSER"); + return NULL; } builder = axiom_stax_builder_create(env, reader); - if(!builder) + + if (!builder) { - axiom_xml_reader_free(reader, env); - printf("Builder creation failed\n"); - return AXIS2_FAILURE; + printf("ERROR CREATING PULL PARSER"); + return NULL; } + document = axiom_stax_builder_get_document(builder, env); - if(!document) + if (!document) + return NULL; + + node1 = axiom_document_get_root_element(document, env); + if (!node1) { + printf(" root element null "); axiom_stax_builder_free(builder, env); - printf("Document creation failed\n"); - return AXIS2_FAILURE; + return NULL; } - /*root = axiom_document_get_root_element(document, env);*/ - root = axiom_document_build_all(document, env); - if(!root) + do { - axiom_stax_builder_free(builder, env); - return AXIS2_FAILURE; - } - if(root) + node2 = axiom_document_build_next(document , env); + + if (!node2) + break; + + if (axiom_node_get_node_type(node2, env) == AXIOM_ELEMENT) + { + ele2 = (axiom_element_t*) axiom_node_get_data_element(node2, env); + attr_hash = axiom_element_get_all_attributes(ele2, env); + if (attr_hash) + { + hi = axutil_hash_first(attr_hash, env); + axutil_hash_this(hi, NULL, NULL, &attr); + + if (axutil_strcmp(axiom_attribute_get_value(attr, env), name) == 0) + { + policy_node = node2; + } + } + } + }while (node2); + return policy_node; +} + +axis2_char_t * get_policy_ref(axiom_node_t *node, const axutil_env_t * env) +{ + axiom_element_t *policy_element = NULL; + axiom_children_iterator_t *children_iter = NULL; + axiom_node_t *child_node = NULL; + axutil_qname_t *qname = NULL; + axis2_char_t * value = NULL; + axis2_char_t * val = NULL; + axiom_attribute_t * attr = NULL; + + policy_element = (axiom_element_t *) axiom_node_get_data_element(node, env); + children_iter = axiom_element_get_children(policy_element, env, node); + + while(axiom_children_iterator_has_next(children_iter, env)) { - if(axiom_node_get_node_type(root, env) == AXIOM_ELEMENT) + child_node = axiom_children_iterator_next(children_iter, env); + if(axiom_node_get_node_type(child_node, env) == AXIOM_ELEMENT) { - root_ele = (axiom_element_t*)axiom_node_get_data_element(root, env); - if(root_ele) + policy_element = (axiom_element_t*) axiom_node_get_data_element(child_node, env); + + if (axutil_strcmp(axiom_element_get_localname(policy_element, env), "PolicyReference") == 0) { - neethi_policy_t *neethi_policy = NULL; - neethi_policy = neethi_engine_get_policy(env,root,root_ele); - if(!neethi_policy) + qname = axutil_qname_create(env, "URI", NULL, NULL); + attr = axiom_element_get_attribute(policy_element, env, qname); + + if (attr) { - printf("Policy Creation fails\n"); - return AXIS2_FAILURE; + value = axiom_attribute_get_value(attr, env); + val = axutil_string_substring_starting_at(value, 1); + return val; } - axutil_array_list_add(arraylist, env, neethi_policy); } } } - return AXIS2_SUCCESS; + return NULL; +} + + +void get_all_policy(axis2_char_t * element_name, const axutil_env_t * env, axutil_array_list_t * policy_node_list, axis2_char_t *wsdl_name) +{ + axutil_hash_t *attr_hash = NULL; + axutil_hash_index_t *hi = NULL; + axiom_element_t *element = NULL; + axiom_attribute_t *attribute = NULL; + axis2_char_t * attribute_val = NULL; + axiom_node_t * parent_policy_node = NULL, *parent_node = NULL; + + parent_node = return_policy_element(element_name, env, wsdl_name); + if (!parent_node) + return; + + parent_policy_node = return_policy_element(get_policy_ref(parent_node, env), env, wsdl_name); + axutil_array_list_add(policy_node_list, env, parent_policy_node); + + if (axiom_node_get_node_type(parent_node, env) == AXIOM_ELEMENT) + { + element = (axiom_element_t*) axiom_node_get_data_element(parent_node, env); + attr_hash = axiom_element_get_all_attributes(element, env); + if (attr_hash) + { + hi = axutil_hash_next(env, axutil_hash_first(attr_hash, env)); + do + { + if (hi) + { + axutil_hash_this(hi, NULL, NULL, &attribute); + attribute_val = axiom_attribute_get_value(attribute, env); + attribute_val = axutil_rindex(attribute_val, ':'); + attribute_val = axutil_string_substring_starting_at(attribute_val,1); + get_all_policy(attribute_val, env, policy_node_list, wsdl_name); + hi = axutil_hash_next(env, hi); + } + }while (hi); + } + } + return; } Modified: webservices/axis2/scratch/c/neethi/rampart/include/rampart_context.h URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/rampart/include/rampart_context.h?view=diff&rev=538931&r1=538930&r2=538931 ============================================================================== --- webservices/axis2/scratch/c/neethi/rampart/include/rampart_context.h (original) +++ webservices/axis2/scratch/c/neethi/rampart/include/rampart_context.h Thu May 17 07:07:24 2007 @@ -418,6 +418,7 @@ rp_property_t *token, int token_type, axis2_bool_t server_side, + axis2_bool_t is_inpath, const axutil_env_t *env); /* AXIS2_EXTERN axis2_char_t *AXIS2_CALL Modified: webservices/axis2/scratch/c/neethi/rampart/samples/client/sec_echo/echo.c URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/rampart/samples/client/sec_echo/echo.c?view=diff&rev=538931&r1=538930&r2=538931 ============================================================================== --- webservices/axis2/scratch/c/neethi/rampart/samples/client/sec_echo/echo.c (original) +++ webservices/axis2/scratch/c/neethi/rampart/samples/client/sec_echo/echo.c Thu May 17 07:07:24 2007 @@ -65,8 +65,10 @@ /* Setup options */ options = axis2_options_create(env); axis2_options_set_to(options, env, endpoint_ref); + /*axis2_options_set_action(options, env, + "http://ws.apache.org/axis2/c/samples/sec_echo");*/ axis2_options_set_action(options, env, - "http://ws.apache.org/axis2/c/samples/sec_echo"); + "http://example.com/ws/2004/09/policy/Test/EchoRequest"); @@ -164,17 +166,20 @@ { axiom_node_t *echo_om_node = NULL; axiom_element_t* echo_om_ele = NULL; - axiom_node_t* text_om_node = NULL; - axiom_element_t * text_om_ele = NULL; + /*axiom_node_t* text_om_node = NULL;*/ + /*axiom_element_t * text_om_ele = NULL;*/ axiom_namespace_t *ns1 = NULL; axis2_char_t *om_str = NULL; - ns1 = axiom_namespace_create(env, "http://ws.apache.org/axis2/c/samples", "ns1"); - echo_om_ele = axiom_element_create(env, NULL, "echoString", ns1, &echo_om_node); + ns1 = axiom_namespace_create(env, /*"http://ws.apache.org/axis2/c/samples"*/ "http://sample03.policy.samples.rampart.apache.org/xsd", "ns1"); + echo_om_ele = axiom_element_create(env, NULL, /*"echoString"*/"EchoRequest", ns1, &echo_om_node); - text_om_ele = axiom_element_create(env, echo_om_node, "text", NULL, &text_om_node); - axiom_element_set_text(text_om_ele, env, "echo5\n", text_om_node); + /*text_om_ele = axiom_element_create(env, echo_om_node, "text", NULL, &text_om_node);*/ + /*axiom_element_set_text(text_om_ele, env, "echo5\n", text_om_node);*/ + + /*axiom_element_set_text(echo_om_ele, env, "echo5", echo_om_node);*/ + axiom_element_set_text(echo_om_ele, env, "Hello", echo_om_node); om_str = axiom_node_to_string(echo_om_node, env); if (om_str){ Modified: webservices/axis2/scratch/c/neethi/rampart/samples/client/sec_echo/policy.xml URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/rampart/samples/client/sec_echo/policy.xml?view=diff&rev=538931&r1=538930&r2=538931 ============================================================================== --- webservices/axis2/scratch/c/neethi/rampart/samples/client/sec_echo/policy.xml (original) +++ webservices/axis2/scratch/c/neethi/rampart/samples/client/sec_echo/policy.xml Thu May 17 07:07:24 2007 @@ -24,6 +24,7 @@ <sp:AlgorithmSuite> <wsp:Policy> <sp:Basic256Rsa15/> + <!--sp:TripleDesRsa15/--> </wsp:Policy> </sp:AlgorithmSuite> <sp:Layout> @@ -32,14 +33,14 @@ </wsp:Policy> </sp:Layout> <sp:IncludeTimestamp/> - <sp:EncryptBeforeSigning/> + <!--sp:EncryptBeforeSigning/--> </wsp:Policy> </sp:AsymmetricBinding> - <sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <!--sp:SignedSupportingTokens xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> <wsp:Policy> <sp:UsernameToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Always"/> </wsp:Policy> - </sp:SignedSupportingTokens> + </sp:SignedSupportingTokens--> <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> <wsp:Policy> <sp:MustSupportRefKeyIdentifier/> @@ -54,14 +55,14 @@ <sp:Body/> </sp:SignedParts> <rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy"> - <rampc:User>Gampola</rampc:User> + <rampc:User>Bob</rampc:User> <rampc:TimeToLive>360</rampc:TimeToLive> <rampc:EncryptionUser>b</rampc:EncryptionUser> <rampc:PasswordType>Digest</rampc:PasswordType> - <rampc:PasswordCallbackClass>/home/manjula/axis2/c/deploy/bin/samples/rampart/callback/libpwcb.so</rampc:PasswordCallbackClass> - <rampc:ReceiverCertificate>/home/manjula/axis2/c/deploy/bin/samples/rampart/keys/ahome/b_cert.cert</rampc:ReceiverCertificate> - <rampc:Certificate>/home/manjula/axis2/c/deploy/bin/samples/rampart/keys/ahome/a_cert.cert</rampc:Certificate> - <rampc:PrivateKey>/home/manjula/axis2/c/deploy/bin/samples/rampart/keys/ahome/a_key.pem</rampc:PrivateKey> + <rampc:PasswordCallbackClass>/home/manjula/neethi/neethi/axis2c/deploy/bin/samples/rampart/callback/libpwcb.so</rampc:PasswordCallbackClass> + <rampc:ReceiverCertificate>/home/manjula/neethi/neethi/rampart/samples/keys/ahome/bob_cert.cert</rampc:ReceiverCertificate> + <rampc:Certificate>/home/manjula/neethi/neethi/rampart/samples/keys/ahome/alice_cert.cert</rampc:Certificate> + <rampc:PrivateKey>/home/manjula/neethi/neethi/rampart/samples/keys/ahome/alice_key.pem</rampc:PrivateKey> </rampc:RampartConfig> </wsp:All> </wsp:ExactlyOne> Modified: webservices/axis2/scratch/c/neethi/rampart/src/omxmlsec/encryption.c URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/rampart/src/omxmlsec/encryption.c?view=diff&rev=538931&r1=538930&r2=538931 ============================================================================== --- webservices/axis2/scratch/c/neethi/rampart/src/omxmlsec/encryption.c (original) +++ webservices/axis2/scratch/c/neethi/rampart/src/omxmlsec/encryption.c Thu May 17 07:07:24 2007 @@ -130,12 +130,14 @@ unsigned char *decoded_data = NULL;/*Can be binary*/ int decoded_len = -1; int enclen = -1; + int x=-1; oxs_buffer_t *decoded_buf = NULL; decoded_buf = oxs_buffer_create(env); /*First we need to base64 decode*/ - decoded_data = AXIS2_MALLOC(env->allocator, axutil_base64_decode_len((char*)oxs_buffer_get_data(input, env))); + x = axutil_base64_decode_len((const char*)oxs_buffer_get_data(input, env)); + decoded_data = AXIS2_MALLOC(env->allocator, x); decoded_len = axutil_base64_decode_binary(decoded_data, (char*)oxs_buffer_get_data(input, env) ); if (decoded_len < 0) { Modified: webservices/axis2/scratch/c/neethi/rampart/src/omxmlsec/xml_encryption.c URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/rampart/src/omxmlsec/xml_encryption.c?view=diff&rev=538931&r1=538930&r2=538931 ============================================================================== --- webservices/axis2/scratch/c/neethi/rampart/src/omxmlsec/xml_encryption.c (original) +++ webservices/axis2/scratch/c/neethi/rampart/src/omxmlsec/xml_encryption.c Thu May 17 07:07:24 2007 @@ -351,6 +351,7 @@ axiom_node_t *cd_node = NULL; axiom_node_t *cv_node = NULL; axis2_char_t *cipher_val = NULL; + axis2_char_t *new_cipher_val = NULL; axis2_char_t *sym_algo = NULL; axis2_char_t *type = NULL; axis2_char_t *id = NULL; @@ -370,16 +371,20 @@ /*Populate the context for future use*/ oxs_ctx_set_enc_mtd_algorithm(enc_ctx, env, sym_algo); oxs_ctx_set_id(enc_ctx, env, id); - oxs_ctx_set_id(enc_ctx, env, type); + oxs_ctx_set_type(enc_ctx, env, type); /*Get the cipher value*/ cd_node = oxs_axiom_get_first_child_node_by_name(env, enc_type_node, OXS_NODE_CIPHER_DATA,OXS_ENC_NS,OXS_XENC); 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*/ + new_cipher_val = oxs_util_get_newline_removed_string(env, cipher_val); + + /*eof NEW CODE*/ /*Create input buffer with cipher data obtained*/ input_buf = oxs_buffer_create(env); - oxs_buffer_populate(input_buf, env, (unsigned char*)cipher_val, axutil_strlen(cipher_val) ); + oxs_buffer_populate(input_buf, env, (unsigned char*)new_cipher_val, axutil_strlen(new_cipher_val) ); /*Decrypt*/ oxs_ctx_set_operation(enc_ctx, env, OXS_CTX_OPERATION_DECRYPT); Modified: webservices/axis2/scratch/c/neethi/rampart/src/omxmlsec/xml_signature.c URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/rampart/src/omxmlsec/xml_signature.c?view=diff&rev=538931&r1=538930&r2=538931 ============================================================================== --- webservices/axis2/scratch/c/neethi/rampart/src/omxmlsec/xml_signature.c (original) +++ webservices/axis2/scratch/c/neethi/rampart/src/omxmlsec/xml_signature.c Thu May 17 07:07:24 2007 @@ -332,17 +332,22 @@ axutil_array_list_add(tr_list, env, tr); }else{ /*<ds:Transforms> cant have any other element*/ - oxs_error(env, ERROR_LOCATION, OXS_ERROR_TRANSFORM_FAILED,"<ds:Transforms> cannot have node %s ", node_name ); - return AXIS2_FAILURE; + /*NOTE: Removed this check for interop testing*/ + /*oxs_error(env, ERROR_LOCATION, OXS_ERROR_TRANSFORM_FAILED,"<ds:Transforms> cannot have node %s ", node_name ); + return AXIS2_FAILURE;*/ } - /*Set the next node to be precessed*/ + /*Set the next node to be processed*/ tr_node = axiom_node_get_next_sibling(tr_node, env); + /*axiom_util_get_next_sibling_element(axiom_node_get_data_element(tr_node, env), env, + tr_node, &tr_node);*/ }/*eof while*/ /*Set transforms for this signature part*/ oxs_sign_part_set_transforms(sign_part, env, tr_list); /*At the end, set the next node as the child node*/ - child_node = axiom_node_get_next_sibling(child_node, env); + /*child_node = axiom_node_get_next_sibling(child_node, env);*/ + axiom_util_get_next_sibling_element(axiom_node_get_data_element(child_node, env), env, + child_node, &child_node); }else{ /*There are no transforms for this sign part*/ } @@ -356,7 +361,9 @@ oxs_sign_part_set_digest_mtd(sign_part, env, digest_mtd); /*At the end, set the next node as the child node*/ - child_node = axiom_node_get_next_sibling(child_node, env); + /*child_node = axiom_node_get_next_sibling(child_node, env);*/ + axiom_util_get_next_sibling_element(axiom_node_get_data_element(child_node, env), env, + child_node, &child_node); }else{ oxs_error(env, ERROR_LOCATION, OXS_ERROR_SIG_VERIFICATION_FAILED,"Cannot find <ds:DigestMethod> " ); return AXIS2_FAILURE; @@ -449,12 +456,16 @@ /*We do not process*/ } cur_node = axiom_node_get_next_sibling(cur_node, env); + /*axiom_util_get_next_sibling_element(axiom_node_get_data_element(cur_node, env), env, + cur_node, &cur_node);*/ } oxs_sign_ctx_set_sign_parts(sign_ctx, env, sign_part_list); /*Finished processing SignedInfo. Now we are processing the Signature Value element*/ /*The very next child of SignedInfo Should be the ds:SignatureValue*/ - sig_val_node = axiom_node_get_next_sibling(signed_info_node, env); + /*sig_val_node = axiom_node_get_next_sibling(signed_info_node, env);*/ + axiom_util_get_next_sibling_element(axiom_node_get_data_element(signed_info_node, env), env, + signed_info_node, &sig_val_node); if(0 == axutil_strcmp( OXS_NODE_SIGNATURE_VALUE, axiom_util_get_localname(sig_val_node, env))){ axis2_char_t *sig_val = NULL; axis2_char_t *newline_removed = NULL; Modified: webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_context.c URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_context.c?view=diff&rev=538931&r1=538930&r2=538931 ============================================================================== --- webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_context.c (original) +++ webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_context.c Thu May 17 07:07:24 2007 @@ -1907,6 +1907,7 @@ rp_property_t *token, int token_type, axis2_bool_t server_side, + axis2_bool_t is_inpath, const axutil_env_t *env) { axis2_char_t *inclusion = NULL; @@ -1919,14 +1920,27 @@ inclusion = rp_x509_token_get_inclusion(x509_token,env); if(server_side) - include = ((axutil_strcmp(inclusion,RP_INCLUDE_ALWAYS)==0)|| + { + if(is_inpath) + { + include = ((axutil_strcmp(inclusion,RP_INCLUDE_ALWAYS)==0)|| (axutil_strcmp(inclusion,RP_INCLUDE_ONCE)==0)|| (axutil_strcmp(inclusion,RP_INCLUDE_ALWAYS_TO_RECIPIENT)==0)); + } + else + include = (axutil_strcmp(inclusion,RP_INCLUDE_ALWAYS)==0); + } else - include = ((axutil_strcmp(inclusion,RP_INCLUDE_ALWAYS)==0)|| + { + if(!is_inpath) + { + include = ((axutil_strcmp(inclusion,RP_INCLUDE_ALWAYS)==0)|| (axutil_strcmp(inclusion,RP_INCLUDE_ONCE)==0)|| (axutil_strcmp(inclusion,RP_INCLUDE_ALWAYS_TO_RECIPIENT)==0)); - + } + else + include = (axutil_strcmp(inclusion,RP_INCLUDE_ALWAYS)==0); + } return include; } else Modified: webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_encryption.c URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_encryption.c?view=diff&rev=538931&r1=538930&r2=538931 ============================================================================== --- webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_encryption.c (original) +++ webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_encryption.c Thu May 17 07:07:24 2007 @@ -167,7 +167,7 @@ /*First we should check whether we include the token in the *message.*/ - if(rampart_context_is_token_include(rampart_context,token,token_type,server_side,env)) + if(rampart_context_is_token_include(rampart_context,token,token_type,server_side,AXIS2_FALSE,env)) { eki = RAMPART_STR_DIRECT_REFERENCE; } Modified: webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_sec_header_processor.c URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_sec_header_processor.c?view=diff&rev=538931&r1=538930&r2=538931 ============================================================================== --- webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_sec_header_processor.c (original) +++ webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_sec_header_processor.c Thu May 17 07:07:24 2007 @@ -568,7 +568,7 @@ AXIS2_LOG_INFO(env->log,"[rampart][shp] We still do not support derived keys"); return AXIS2_FAILURE; } - is_include_token = rampart_context_is_token_include(rampart_context,token,token_type,server_side,env); + is_include_token = rampart_context_is_token_include(rampart_context,token,token_type,server_side,AXIS2_TRUE,env); key_info_node = oxs_axiom_get_first_child_node_by_name(env, sig_node, OXS_NODE_KEY_INFO,OXS_DSIG_NS, OXS_DS ); Modified: webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_signature.c URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_signature.c?view=diff&rev=538931&r1=538930&r2=538931 ============================================================================== --- webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_signature.c (original) +++ webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_signature.c Thu May 17 07:07:24 2007 @@ -202,7 +202,7 @@ } /*If the requirement is to include the token we should build the binary security * token element here.*/ - if(rampart_context_is_token_include(rampart_context,token,token_type,server_side,env)) + if(rampart_context_is_token_include(rampart_context,token,token_type,server_side, AXIS2_FALSE, env)) { axis2_char_t *bst_data = NULL; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]