axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manj...@apache.org
Subject svn commit: r583391 - in /webservices/axis2/trunk/c/neethi: include/rp_secpolicy.h src/secpolicy/builder/secpolicy_builder.c src/secpolicy/model/secpolicy.c
Date Wed, 10 Oct 2007 09:02:30 GMT
Author: manjula
Date: Wed Oct 10 02:02:21 2007
New Revision: 583391

URL: http://svn.apache.org/viewvc?rev=583391&view=rev
Log:
Adding wss11 and trust10 to secpolicy object.

Modified:
    webservices/axis2/trunk/c/neethi/include/rp_secpolicy.h
    webservices/axis2/trunk/c/neethi/src/secpolicy/builder/secpolicy_builder.c
    webservices/axis2/trunk/c/neethi/src/secpolicy/model/secpolicy.c

Modified: webservices/axis2/trunk/c/neethi/include/rp_secpolicy.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/include/rp_secpolicy.h?rev=583391&r1=583390&r2=583391&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/include/rp_secpolicy.h (original)
+++ webservices/axis2/trunk/c/neethi/include/rp_secpolicy.h Wed Oct 10 02:02:21 2007
@@ -35,6 +35,7 @@
 #include <rp_rampart_config.h>
 #include <rp_wss10.h>
 #include <rp_wss11.h>
+#include <rp_trust10.h>
 
 #ifdef __cplusplus
 extern "C"
@@ -192,6 +193,17 @@
 
     AXIS2_EXTERN rp_rampart_config_t *AXIS2_CALL
     rp_secpolicy_get_rampart_config(
+        rp_secpolicy_t * secpolicy,
+        const axutil_env_t * env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_secpolicy_set_trust10(
+        rp_secpolicy_t * secpolicy,
+        const axutil_env_t * env,
+        rp_trust10_t * trust10);
+
+    AXIS2_EXTERN rp_trust10_t *AXIS2_CALL
+    rp_secpolicy_get_trust10(
         rp_secpolicy_t * secpolicy,
         const axutil_env_t * env);
 

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/builder/secpolicy_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/builder/secpolicy_builder.c?rev=583391&r1=583390&r2=583391&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/builder/secpolicy_builder.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/builder/secpolicy_builder.c Wed Oct 10
02:02:21 2007
@@ -167,6 +167,31 @@
                 rp_property_set_value(wss, env, wss10, RP_PROPERTY_WSS10);
                 rp_secpolicy_set_wss(secpolicy, env, wss);
             }
+            else if (type == ASSERTION_TYPE_WSS11)
+            {
+                rp_wss11_t *wss11 = NULL;
+                rp_property_t *wss = NULL;
+                wss11 =
+                    (rp_wss11_t *) neethi_assertion_get_value(assertion, env);
+                if (!wss11)
+                {
+                    return AXIS2_FAILURE;
+                }
+                wss = rp_property_create(env);
+                rp_property_set_value(wss, env, wss11, RP_PROPERTY_WSS11);
+                rp_secpolicy_set_wss(secpolicy, env, wss);
+            }
+            else if (type == ASSERTION_TYPE_TRUST10)
+            {
+                rp_trust10_t *trust10 = NULL;
+                trust10 =
+                    (rp_trust10_t *) neethi_assertion_get_value(assertion, env);
+                if (!trust10)
+                {
+                    return AXIS2_FAILURE;
+                }
+                rp_secpolicy_set_trust10(secpolicy, env, trust10);
+            }            
             else if (type == ASSERTION_TYPE_SIGNED_ENCRYPTED_PARTS)
             {
                 rp_signed_encrypted_parts_t *signed_encrypted_parts = NULL;

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/model/secpolicy.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/model/secpolicy.c?rev=583391&r1=583390&r2=583391&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/secpolicy.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/secpolicy.c Wed Oct 10 02:02:21 2007
@@ -22,6 +22,7 @@
 {
     rp_property_t *binding;
     rp_property_t *wss;
+    rp_trust10_t *trust10;
     rp_supporting_tokens_t *supporting_tokens;
     rp_supporting_tokens_t *signed_supporting_tokens;
     rp_supporting_tokens_t *endorsing_supporting_tokens;
@@ -54,6 +55,7 @@
     }
     secpolicy->binding = NULL;
     secpolicy->wss = NULL;
+    secpolicy->trust10 = NULL;
     secpolicy->supporting_tokens = NULL;
     secpolicy->signed_supporting_tokens = NULL;
     secpolicy->endorsing_supporting_tokens = NULL;
@@ -88,6 +90,11 @@
             rp_property_free(secpolicy->wss, env);
             secpolicy->wss = NULL;
         }
+        if(secpolicy->trust10)
+        {
+            rp_trust10_free(secpolicy->trust10, env);
+            secpolicy->trust10 = NULL;
+        }    
         if (secpolicy->supporting_tokens)
         {
             rp_supporting_tokens_free(secpolicy->supporting_tokens, env);
@@ -442,6 +449,30 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
     return secpolicy->wss;
+}
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+rp_secpolicy_set_trust10(
+    rp_secpolicy_t * secpolicy,
+    const axutil_env_t * env,
+    rp_trust10_t * trust10)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, trust10, AXIS2_FAILURE);
+
+    rp_trust10_increment_ref(trust10, env);
+    secpolicy->trust10 = trust10;
+    return AXIS2_SUCCESS;
+}
+
+AXIS2_EXTERN rp_trust10_t *AXIS2_CALL
+rp_secpolicy_get_trust10(
+    rp_secpolicy_t * secpolicy,
+    const axutil_env_t * env)
+{
+    AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+    return secpolicy->trust10;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message