You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ma...@apache.org on 2007/04/30 12:15:52 UTC
svn commit: r533671 - in
/webservices/axis2/scratch/c/neethi/axis2c/neethi/src: assertion_builder.c
secpolicy/builder/asymmetric_binding_builder.c
Author: manjula
Date: Mon Apr 30 03:15:51 2007
New Revision: 533671
URL: http://svn.apache.org/viewvc?view=rev&rev=533671
Log:
Fixing some bugs to invoke a security service using neethi/c framework.
Modified:
webservices/axis2/scratch/c/neethi/axis2c/neethi/src/assertion_builder.c
webservices/axis2/scratch/c/neethi/axis2c/neethi/src/secpolicy/builder/asymmetric_binding_builder.c
Modified: webservices/axis2/scratch/c/neethi/axis2c/neethi/src/assertion_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/neethi/src/assertion_builder.c?view=diff&rev=533671&r1=533670&r2=533671
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/neethi/src/assertion_builder.c (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/neethi/src/assertion_builder.c Mon Apr 30 03:15:51 2007
@@ -350,7 +350,7 @@
}
else if(axutil_strcmp(localname, RP_ENCRYPTED_PARTS)==0)
{
- if(rp_match_secpolicy_qname(env, RP_LAYOUT, node, element))
+ if(rp_match_secpolicy_qname(env, RP_ENCRYPTED_PARTS, node, element))
{
return rp_signed_encrypted_parts_builder_build(env, node, element);
}
Modified: webservices/axis2/scratch/c/neethi/axis2c/neethi/src/secpolicy/builder/asymmetric_binding_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/neethi/src/secpolicy/builder/asymmetric_binding_builder.c?view=diff&rev=533671&r1=533670&r2=533671
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/neethi/src/secpolicy/builder/asymmetric_binding_builder.c (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/neethi/src/secpolicy/builder/asymmetric_binding_builder.c Mon Apr 30 03:15:51 2007
@@ -106,94 +106,90 @@
value = neethi_assertion_get_value(assertion, env);
type = neethi_assertion_get_type(assertion, env);
- if(value)
+ if(type == ASSERTION_TYPE_INITIATOR_TOKEN)
{
- if(type == ASSERTION_TYPE_INITIATOR_TOKEN)
+ rp_property_t *initiator_token = NULL;
+ initiator_token = (rp_property_t *)neethi_assertion_get_value(assertion, env);
+ if(initiator_token)
{
- rp_property_t *initiator_token = NULL;
- initiator_token = (rp_property_t *)neethi_assertion_get_value(assertion, env);
- if(initiator_token)
- {
- rp_asymmetric_binding_set_initiator_token(asymmetric_binding, env, initiator_token);
- }
- else return AXIS2_FAILURE;
- }
- if(type == ASSERTION_TYPE_RECIPIENT_TOKEN)
- {
- rp_property_t *recipient_token = NULL;
- recipient_token = (rp_property_t *)neethi_assertion_get_value(assertion, env);
- if(recipient_token)
- {
- rp_asymmetric_binding_set_recipient_token(asymmetric_binding, env, recipient_token);
- }
- else return AXIS2_FAILURE;
- }
- else if(type == ASSERTION_TYPE_ALGORITHM_SUITE)
- {
- rp_algorithmsuite_t *algorithmsuite = NULL;
- algorithmsuite = (rp_algorithmsuite_t *)neethi_assertion_get_value(assertion, env);
- if(algorithmsuite)
- {
- rp_binding_commons_set_algorithmsuite(commons, env, algorithmsuite);
- }
- else return AXIS2_FAILURE;
+ rp_asymmetric_binding_set_initiator_token(asymmetric_binding, env, initiator_token);
}
- else if(type == ASSERTION_TYPE_INCLUDE_TIMESTAMP)
+ else return AXIS2_FAILURE;
+ }
+ else if(type == ASSERTION_TYPE_RECIPIENT_TOKEN)
+ {
+ rp_property_t *recipient_token = NULL;
+ recipient_token = (rp_property_t *)neethi_assertion_get_value(assertion, env);
+ if(recipient_token)
{
- rp_binding_commons_set_include_timestamp(commons, env, AXIS2_TRUE);
+ rp_asymmetric_binding_set_recipient_token(asymmetric_binding, env, recipient_token);
}
- else if(type == ASSERTION_TYPE_LAYOUT)
- {
- rp_layout_t *layout = NULL;
- layout = (rp_layout_t *)neethi_assertion_get_value(assertion, env);
- if(layout)
- {
- rp_binding_commons_set_layout(commons, env, layout);
- }
- else return AXIS2_FAILURE;
- }
- else if(type == ASSERTION_TYPE_ENCRYPT_BEFORE_SIGNING)
+ else return AXIS2_FAILURE;
+ }
+ else if(type == ASSERTION_TYPE_ALGORITHM_SUITE)
+ {
+ rp_algorithmsuite_t *algorithmsuite = NULL;
+ algorithmsuite = (rp_algorithmsuite_t *)neethi_assertion_get_value(assertion, env);
+ if(algorithmsuite)
{
- rp_symmetric_asymmetric_binding_commons_set_protection_order(as_commons, env, RP_ENCRYPT_BEFORE_SIGNING);
+ rp_binding_commons_set_algorithmsuite(commons, env, algorithmsuite);
}
- else if(type == ASSERTION_TYPE_SIGN_BEFORE_ENCRYPTING)
- {
- rp_symmetric_asymmetric_binding_commons_set_protection_order(as_commons, env, RP_SIGN_BEFORE_ENCRYPTING);
- }
- else if(type == ASSERTION_TYPE_ENCRYPT_SIGNATURE)
- {
- rp_symmetric_asymmetric_binding_commons_set_signature_protection(as_commons, env, AXIS2_TRUE);
- }
- else if(type == ASSERTION_TYPE_PROTECT_TOKENS)
- {
- rp_symmetric_asymmetric_binding_commons_set_token_protection(as_commons, env, AXIS2_TRUE);
- }
- else if(type == ASSERTION_TYPE_ONLY_SIGN_ENTIRE_HEADERS_AND_BODY)
- {
- rp_symmetric_asymmetric_binding_commons_set_entire_headers_and_body_signatures(as_commons, env, AXIS2_TRUE);
- }
- else if(type == ASSERTION_TYPE_SUPPORTING_TOKENS)
+ else return AXIS2_FAILURE;
+ }
+ else if(type == ASSERTION_TYPE_INCLUDE_TIMESTAMP)
+ {
+ rp_binding_commons_set_include_timestamp(commons, env, AXIS2_TRUE);
+ }
+ else if(type == ASSERTION_TYPE_LAYOUT)
+ {
+ rp_layout_t *layout = NULL;
+ layout = (rp_layout_t *)neethi_assertion_get_value(assertion, env);
+ if(layout)
{
- rp_supporting_tokens_t *supporting_tokens = NULL;
- supporting_tokens = (rp_supporting_tokens_t *)neethi_assertion_get_value(assertion, env);
- if(supporting_tokens)
+ rp_binding_commons_set_layout(commons, env, layout);
+ }
+ else return AXIS2_FAILURE;
+ }
+ else if(type == ASSERTION_TYPE_ENCRYPT_BEFORE_SIGNING)
+ {
+ rp_symmetric_asymmetric_binding_commons_set_protection_order(as_commons, env, RP_ENCRYPT_BEFORE_SIGNING);
+ }
+ else if(type == ASSERTION_TYPE_SIGN_BEFORE_ENCRYPTING)
+ {
+ rp_symmetric_asymmetric_binding_commons_set_protection_order(as_commons, env, RP_SIGN_BEFORE_ENCRYPTING);
+ }
+ else if(type == ASSERTION_TYPE_ENCRYPT_SIGNATURE)
+ {
+ rp_symmetric_asymmetric_binding_commons_set_signature_protection(as_commons, env, AXIS2_TRUE);
+ }
+ else if(type == ASSERTION_TYPE_PROTECT_TOKENS)
+ {
+ rp_symmetric_asymmetric_binding_commons_set_token_protection(as_commons, env, AXIS2_TRUE);
+ }
+ else if(type == ASSERTION_TYPE_ONLY_SIGN_ENTIRE_HEADERS_AND_BODY)
+ {
+ rp_symmetric_asymmetric_binding_commons_set_entire_headers_and_body_signatures(as_commons, env, AXIS2_TRUE);
+ }
+ else if(type == ASSERTION_TYPE_SUPPORTING_TOKENS)
+ {
+ rp_supporting_tokens_t *supporting_tokens = NULL;
+ supporting_tokens = (rp_supporting_tokens_t *)neethi_assertion_get_value(assertion, env);
+ if(supporting_tokens)
+ {
+ int type = 0;
+ type = rp_supporting_tokens_get_type(supporting_tokens, env);
+ if(type == RP_SUPPORTING_SIGNED_SUPPORTING)
{
- int type = 0;
- type = rp_supporting_tokens_get_type(supporting_tokens, env);
- if(type == RP_SUPPORTING_SIGNED_SUPPORTING)
- {
- rp_binding_commons_set_signed_supporting_tokens(commons, env, supporting_tokens);
- }
- else if(type == RP_SUPPORTING_SIGNED_ENDORSING_SUPPORTING)
- {
- rp_binding_commons_set_signed_endorsing_supporting_tokens(commons, env, supporting_tokens);
- }
- else return AXIS2_FAILURE;
- }
+ rp_binding_commons_set_signed_supporting_tokens(commons, env, supporting_tokens);
+ }
+ else if(type == RP_SUPPORTING_SIGNED_ENDORSING_SUPPORTING)
+ {
+ rp_binding_commons_set_signed_endorsing_supporting_tokens(commons, env, supporting_tokens);
+ }
else return AXIS2_FAILURE;
- }
+ }
else return AXIS2_FAILURE;
- }
+ }
else return AXIS2_FAILURE;
}
rp_symmetric_asymmetric_binding_commons_set_binding_commons(as_commons, env, commons);
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org