Author: kaushalye
Date: Wed Nov 14 21:27:21 2007
New Revision: 595210
URL: http://svn.apache.org/viewvc?rev=595210&view=rev
Log:
Signature confirmation processing. Using security policies to configure.
Modified:
webservices/rampart/trunk/c/include/rampart_context.h
webservices/rampart/trunk/c/src/util/rampart_context.c
webservices/rampart/trunk/c/src/util/rampart_sec_header_builder.c
webservices/rampart/trunk/c/src/util/rampart_sec_header_processor.c
Modified: webservices/rampart/trunk/c/include/rampart_context.h
URL:
http://svn.apache.org/viewvc/webservices/rampart/trunk/c/include/rampart_context.h?rev=595210&r1=595209&r2=595210&view=diff
==============================================================================
--- webservices/rampart/trunk/c/include/rampart_context.h (original)
+++ webservices/rampart/trunk/c/include/rampart_context.h Wed Nov 14 21:27:21
2007
@@ -582,6 +582,9 @@
rampart_context_t *rampart_context,
const axutil_env_t *env);
+ AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+ rampart_context_is_sig_confirmation_reqd(rampart_context_t
*rampart_context,
+ const axutil_env_t *env);
#ifdef __cplusplus
}
Modified: webservices/rampart/trunk/c/src/util/rampart_context.c
URL:
http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/util/rampart_context.c?rev=595210&r1=595209&r2=595210&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/util/rampart_context.c (original)
+++ webservices/rampart/trunk/c/src/util/rampart_context.c Wed Nov 14 21:27:21
2007
@@ -1271,6 +1271,26 @@
return rp_binding_commons_get_algorithmsuite(binding_commons,env);
}
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+rampart_context_is_sig_confirmation_reqd(rampart_context_t *rampart_context,
+ const axutil_env_t *env)
+{
+ rp_property_t *wss = NULL;
+ rp_wss11_t *wss11 = NULL;
+
+ wss = rp_secpolicy_get_wss(rampart_context->secpolicy,env);
+ if(!wss){
+ return AXIS2_FALSE;
+ }
+
+ wss11 = rp_property_get_value(wss,env);
+ if(wss11){
+ return rp_wss11_get_require_signature_confirmation(wss11, env);
+ }else{
+ return AXIS2_FALSE;
+ }
+}
+
axis2_char_t *AXIS2_CALL
rampart_context_get_key_identifier_from_wss(
rampart_context_t *rampart_context,
Modified: webservices/rampart/trunk/c/src/util/rampart_sec_header_builder.c
URL:
http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/util/rampart_sec_header_builder.c?rev=595210&r1=595209&r2=595210&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/util/rampart_sec_header_builder.c (original)
+++ webservices/rampart/trunk/c/src/util/rampart_sec_header_builder.c Wed Nov
14 21:27:21 2007
@@ -253,7 +253,8 @@
/*Signature Confirmation support. Only in the server side*/
if(axis2_msg_ctx_get_server_side(msg_ctx,env)){
axis2_bool_t sign_conf_reqd = AXIS2_FALSE;
- /*TODO sign_conf_reqd <- Get from context <- policy*/
+ /*Sign_conf_reqd <- Get from context <- policy*/
+ sign_conf_reqd =
rampart_context_is_sig_confirmation_reqd(rampart_context, env);
if(sign_conf_reqd){
status = rampart_sig_confirm_signature(env, msg_ctx,
rampart_context, sec_node);
}
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=595210&r1=595209&r2=595210&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 Wed Nov
14 21:27:21 2007
@@ -1359,6 +1359,7 @@
return AXIS2_SUCCESS;
}
+
/*Public functions*/
AXIS2_EXTERN axis2_status_t AXIS2_CALL