axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shan...@apache.org
Subject svn commit: r805352 [4/5] - in /webservices/axis2/trunk/c/neethi/src: ./ rmpolicy/ secpolicy/builder/ secpolicy/model/
Date Tue, 18 Aug 2009 10:45:18 GMT
Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/builder/trust10_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/builder/trust10_builder.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/builder/trust10_builder.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/builder/trust10_builder.c Tue Aug 18 10:45:16 2009
@@ -24,7 +24,8 @@
 
 /*private functions*/
 
-axis2_status_t AXIS2_CALL trust10_process_alternatives(
+axis2_status_t AXIS2_CALL
+trust10_process_alternatives(
     const axutil_env_t *env,
     neethi_all_t *all,
     rp_trust10_t *trust10);
@@ -50,37 +51,31 @@
     trust10 = rp_trust10_create(env);
 
     child_node = axiom_node_get_first_element(node, env);
-    if (!child_node)
+    if(!child_node)
     {
         return NULL;
     }
 
-    if (axiom_node_get_node_type(child_node, env) == AXIOM_ELEMENT)
+    if(axiom_node_get_node_type(child_node, env) == AXIOM_ELEMENT)
     {
-        child_element =
-            (axiom_element_t *) axiom_node_get_data_element(child_node, env);
-        if (child_element)
+        child_element = (axiom_element_t *)axiom_node_get_data_element(child_node, env);
+        if(child_element)
         {
             policy = neethi_engine_get_policy(env, child_node, child_element);
-            if (!policy)
+            if(!policy)
             {
                 return NULL;
             }
-            normalized_policy =
-                neethi_engine_get_normalize(env, AXIS2_FALSE, policy);
+            normalized_policy = neethi_engine_get_normalize(env, AXIS2_FALSE, policy);
             neethi_policy_free(policy, env);
             policy = NULL;
-            alternatives =
-                neethi_policy_get_alternatives(normalized_policy, env);
-            component =
-                (neethi_operator_t *) axutil_array_list_get(alternatives, env,
-                                                            0);
-            all = (neethi_all_t *) neethi_operator_get_value(component, env);
+            alternatives = neethi_policy_get_alternatives(normalized_policy, env);
+            component = (neethi_operator_t *)axutil_array_list_get(alternatives, env, 0);
+            all = (neethi_all_t *)neethi_operator_get_value(component, env);
             trust10_process_alternatives(env, all, trust10);
 
-            assertion =
-                neethi_assertion_create_with_args(env, (AXIS2_FREE_VOID_ARG)rp_trust10_free,
-                                                  trust10, ASSERTION_TYPE_TRUST10);
+            assertion = neethi_assertion_create_with_args(env,
+                (AXIS2_FREE_VOID_ARG)rp_trust10_free, trust10, ASSERTION_TYPE_TRUST10);
 
             neethi_policy_free(normalized_policy, env);
             normalized_policy = NULL;
@@ -110,36 +105,33 @@
 
     arraylist = neethi_all_get_policy_components(all, env);
 
-    for (i = 0; i < axutil_array_list_size(arraylist, env); i++)
+    for(i = 0; i < axutil_array_list_size(arraylist, env); i++)
     {
-        operator =(neethi_operator_t *) axutil_array_list_get(arraylist, env,
-                                                              i);
-        assertion =
-            (neethi_assertion_t *) neethi_operator_get_value(operator, env);
+        operator = (neethi_operator_t *)axutil_array_list_get(arraylist, env, i);
+        assertion = (neethi_assertion_t *)neethi_operator_get_value(operator, env);
         value = neethi_assertion_get_value(assertion, env);
         type = neethi_assertion_get_type(assertion, env);
 
-        if (type == ASSERTION_TYPE_MUST_SUPPORT_CLIENT_CHALLENGE)
+        if(type == ASSERTION_TYPE_MUST_SUPPORT_CLIENT_CHALLENGE)
         {
             rp_trust10_set_must_support_client_challenge(trust10, env, AXIS2_TRUE);
         }
-        else if (type == ASSERTION_TYPE_MUST_SUPPORT_SERVER_CHALLENGE)
+        else if(type == ASSERTION_TYPE_MUST_SUPPORT_SERVER_CHALLENGE)
         {
             rp_trust10_set_must_support_server_challenge(trust10, env, AXIS2_TRUE);
         }
-        else if (type == ASSERTION_TYPE_REQUIRE_CLIENT_ENTROPY)
+        else if(type == ASSERTION_TYPE_REQUIRE_CLIENT_ENTROPY)
         {
             rp_trust10_set_require_client_entropy(trust10, env, AXIS2_TRUE);
         }
-        else if (type == ASSERTION_TYPE_REQUIRE_SERVER_ENTROPHY)
+        else if(type == ASSERTION_TYPE_REQUIRE_SERVER_ENTROPHY)
         {
-            rp_trust10_set_require_server_entropy(trust10, env,
-                                                         AXIS2_TRUE);
+            rp_trust10_set_require_server_entropy(trust10, env, AXIS2_TRUE);
         }
-        else if (type == ASSERTION_TYPE_MUST_SUPPORT_ISSUED_TOKENS)
+        else if(type == ASSERTION_TYPE_MUST_SUPPORT_ISSUED_TOKENS)
         {
             rp_trust10_set_must_support_issued_token(trust10, env, AXIS2_TRUE);
-        }    
+        }
         else
             return AXIS2_FAILURE;
     }

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/builder/username_token_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/builder/username_token_builder.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/builder/username_token_builder.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/builder/username_token_builder.c Tue Aug 18 10:45:16 2009
@@ -66,21 +66,20 @@
     rp_username_token_set_inclusion(username_token, env, inclusion_value);
 
     child_node = axiom_node_get_first_element(node, env);
-    if (!child_node)
+    if(!child_node)
     {
         assertion = neethi_assertion_create(env);
         neethi_assertion_set_value(assertion, env, username_token, ASSERTION_TYPE_USERNAME_TOKEN);
         return assertion;
     }
 
-    if (axiom_node_get_node_type(child_node, env) == AXIOM_ELEMENT)
+    if(axiom_node_get_node_type(child_node, env) == AXIOM_ELEMENT)
     {
-        child_element =
-            (axiom_element_t *) axiom_node_get_data_element(child_node, env);
-        if (child_element)
+        child_element = (axiom_element_t *)axiom_node_get_data_element(child_node, env);
+        if(child_element)
         {
             policy = neethi_engine_get_policy(env, child_node, child_element);
-            if (!policy)
+            if(!policy)
             {
                 return NULL;
             }
@@ -88,13 +87,13 @@
             neethi_policy_free(policy, env);
             policy = NULL;
             alternatives = neethi_policy_get_alternatives(normalized_policy, env);
-            component = (neethi_operator_t *) axutil_array_list_get(alternatives, env, 0);
-            all = (neethi_all_t *) neethi_operator_get_value(component, env);
+            component = (neethi_operator_t *)axutil_array_list_get(alternatives, env, 0);
+            all = (neethi_all_t *)neethi_operator_get_value(component, env);
             username_token_process_alternatives(env, all, username_token);
 
-            assertion = neethi_assertion_create_with_args(
-                env,(AXIS2_FREE_VOID_ARG)rp_username_token_free, 
-                username_token, ASSERTION_TYPE_USERNAME_TOKEN);
+            assertion = neethi_assertion_create_with_args(env,
+                (AXIS2_FREE_VOID_ARG)rp_username_token_free, username_token,
+                ASSERTION_TYPE_USERNAME_TOKEN);
 
             neethi_policy_free(normalized_policy, env);
             normalized_policy = NULL;
@@ -124,26 +123,22 @@
 
     arraylist = neethi_all_get_policy_components(all, env);
 
-    for (i = 0; i < axutil_array_list_size(arraylist, env); i++)
+    for(i = 0; i < axutil_array_list_size(arraylist, env); i++)
     {
-        operator =(neethi_operator_t *) axutil_array_list_get(arraylist, env,
-                                                              i);
-        assertion =
-            (neethi_assertion_t *) neethi_operator_get_value(operator, env);
+        operator = (neethi_operator_t *)axutil_array_list_get(arraylist, env, i);
+        assertion = (neethi_assertion_t *)neethi_operator_get_value(operator, env);
         value = neethi_assertion_get_value(assertion, env);
         type = neethi_assertion_get_type(assertion, env);
 
-        if (value)
+        if(value)
         {
-            if (type == ASSERTION_TYPE_WSS_USERNAME_TOKEN_10)
+            if(type == ASSERTION_TYPE_WSS_USERNAME_TOKEN_10)
             {
-                rp_username_token_set_useUTprofile10(username_token, env,
-                                                     AXIS2_TRUE);
+                rp_username_token_set_useUTprofile10(username_token, env, AXIS2_TRUE);
             }
-            else if (type == ASSERTION_TYPE_WSS_USERNAME_TOKEN_11)
+            else if(type == ASSERTION_TYPE_WSS_USERNAME_TOKEN_11)
             {
-                rp_username_token_set_useUTprofile11(username_token, env,
-                                                     AXIS2_TRUE);
+                rp_username_token_set_useUTprofile11(username_token, env, AXIS2_TRUE);
             }
             else
                 return AXIS2_FAILURE;

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/builder/wss10_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/builder/wss10_builder.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/builder/wss10_builder.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/builder/wss10_builder.c Tue Aug 18 10:45:16 2009
@@ -24,7 +24,8 @@
 
 /*private functions*/
 
-axis2_status_t AXIS2_CALL wss10_process_alternatives(
+axis2_status_t AXIS2_CALL
+wss10_process_alternatives(
     const axutil_env_t *env,
     neethi_all_t *all,
     rp_wss10_t *wss10);
@@ -50,37 +51,31 @@
     wss10 = rp_wss10_create(env);
 
     child_node = axiom_node_get_first_element(node, env);
-    if (!child_node)
+    if(!child_node)
     {
         return NULL;
     }
 
-    if (axiom_node_get_node_type(child_node, env) == AXIOM_ELEMENT)
+    if(axiom_node_get_node_type(child_node, env) == AXIOM_ELEMENT)
     {
-        child_element =
-            (axiom_element_t *) axiom_node_get_data_element(child_node, env);
-        if (child_element)
+        child_element = (axiom_element_t *)axiom_node_get_data_element(child_node, env);
+        if(child_element)
         {
             policy = neethi_engine_get_policy(env, child_node, child_element);
-            if (!policy)
+            if(!policy)
             {
                 return NULL;
             }
-            normalized_policy =
-                neethi_engine_get_normalize(env, AXIS2_FALSE, policy);
+            normalized_policy = neethi_engine_get_normalize(env, AXIS2_FALSE, policy);
             neethi_policy_free(policy, env);
             policy = NULL;
-            alternatives =
-                neethi_policy_get_alternatives(normalized_policy, env);
-            component =
-                (neethi_operator_t *) axutil_array_list_get(alternatives, env,
-                                                            0);
-            all = (neethi_all_t *) neethi_operator_get_value(component, env);
+            alternatives = neethi_policy_get_alternatives(normalized_policy, env);
+            component = (neethi_operator_t *)axutil_array_list_get(alternatives, env, 0);
+            all = (neethi_all_t *)neethi_operator_get_value(component, env);
             wss10_process_alternatives(env, all, wss10);
 
-            assertion =
-                neethi_assertion_create_with_args(env, (AXIS2_FREE_VOID_ARG)rp_wss10_free,
-                                                  wss10, ASSERTION_TYPE_WSS10);
+            assertion = neethi_assertion_create_with_args(env, (AXIS2_FREE_VOID_ARG)rp_wss10_free,
+                wss10, ASSERTION_TYPE_WSS10);
 
             neethi_policy_free(normalized_policy, env);
             normalized_policy = NULL;
@@ -110,32 +105,28 @@
 
     arraylist = neethi_all_get_policy_components(all, env);
 
-    for (i = 0; i < axutil_array_list_size(arraylist, env); i++)
+    for(i = 0; i < axutil_array_list_size(arraylist, env); i++)
     {
-        operator =(neethi_operator_t *) axutil_array_list_get(arraylist, env,
-                                                              i);
-        assertion =
-            (neethi_assertion_t *) neethi_operator_get_value(operator, env);
+        operator = (neethi_operator_t *)axutil_array_list_get(arraylist, env, i);
+        assertion = (neethi_assertion_t *)neethi_operator_get_value(operator, env);
         value = neethi_assertion_get_value(assertion, env);
         type = neethi_assertion_get_type(assertion, env);
 
-        if (type == ASSERTION_TYPE_MUST_SUPPORT_REF_KEY_IDENTIFIER)
+        if(type == ASSERTION_TYPE_MUST_SUPPORT_REF_KEY_IDENTIFIER)
         {
-            rp_wss10_set_must_support_ref_key_identifier(wss10, env,
-                                                         AXIS2_TRUE);
+            rp_wss10_set_must_support_ref_key_identifier(wss10, env, AXIS2_TRUE);
         }
-        else if (type == ASSERTION_TYPE_MUST_SUPPORT_REF_ISSUER_SERIAL)
+        else if(type == ASSERTION_TYPE_MUST_SUPPORT_REF_ISSUER_SERIAL)
         {
             rp_wss10_set_must_support_ref_issuer_serial(wss10, env, AXIS2_TRUE);
         }
-        else if (type == ASSERTION_TYPE_MUST_SUPPORT_REF_EXTERNAL_URI)
+        else if(type == ASSERTION_TYPE_MUST_SUPPORT_REF_EXTERNAL_URI)
         {
             rp_wss10_set_must_support_ref_external_uri(wss10, env, AXIS2_TRUE);
         }
-        else if (type == ASSERTION_TYPE_MUST_SUPPORT_REF_EMBEDDED_TOKEN)
+        else if(type == ASSERTION_TYPE_MUST_SUPPORT_REF_EMBEDDED_TOKEN)
         {
-            rp_wss10_set_must_support_ref_embedded_token(wss10, env,
-                                                         AXIS2_TRUE);
+            rp_wss10_set_must_support_ref_embedded_token(wss10, env, AXIS2_TRUE);
         }
         else
             return AXIS2_FAILURE;

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/builder/wss11_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/builder/wss11_builder.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/builder/wss11_builder.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/builder/wss11_builder.c Tue Aug 18 10:45:16 2009
@@ -24,7 +24,8 @@
 
 /*private functions*/
 
-axis2_status_t AXIS2_CALL wss11_process_alternatives(
+axis2_status_t AXIS2_CALL
+wss11_process_alternatives(
     const axutil_env_t *env,
     neethi_all_t *all,
     rp_wss11_t *wss11);
@@ -50,37 +51,31 @@
     wss11 = rp_wss11_create(env);
 
     child_node = axiom_node_get_first_element(node, env);
-    if (!child_node)
+    if(!child_node)
     {
         return NULL;
     }
 
-    if (axiom_node_get_node_type(child_node, env) == AXIOM_ELEMENT)
+    if(axiom_node_get_node_type(child_node, env) == AXIOM_ELEMENT)
     {
-        child_element =
-            (axiom_element_t *) axiom_node_get_data_element(child_node, env);
-        if (child_element)
+        child_element = (axiom_element_t *)axiom_node_get_data_element(child_node, env);
+        if(child_element)
         {
             policy = neethi_engine_get_policy(env, child_node, child_element);
-            if (!policy)
+            if(!policy)
             {
                 return NULL;
             }
-            normalized_policy =
-                neethi_engine_get_normalize(env, AXIS2_FALSE, policy);
+            normalized_policy = neethi_engine_get_normalize(env, AXIS2_FALSE, policy);
             neethi_policy_free(policy, env);
             policy = NULL;
-            alternatives =
-                neethi_policy_get_alternatives(normalized_policy, env);
-            component =
-                (neethi_operator_t *) axutil_array_list_get(alternatives, env,
-                                                            0);
-            all = (neethi_all_t *) neethi_operator_get_value(component, env);
+            alternatives = neethi_policy_get_alternatives(normalized_policy, env);
+            component = (neethi_operator_t *)axutil_array_list_get(alternatives, env, 0);
+            all = (neethi_all_t *)neethi_operator_get_value(component, env);
             wss11_process_alternatives(env, all, wss11);
 
-            assertion =
-                neethi_assertion_create_with_args(env, (AXIS2_FREE_VOID_ARG)rp_wss11_free,
-                                                  wss11, ASSERTION_TYPE_WSS11);
+            assertion = neethi_assertion_create_with_args(env, (AXIS2_FREE_VOID_ARG)rp_wss11_free,
+                wss11, ASSERTION_TYPE_WSS11);
 
             neethi_policy_free(normalized_policy, env);
             normalized_policy = NULL;
@@ -110,45 +105,40 @@
 
     arraylist = neethi_all_get_policy_components(all, env);
 
-    for (i = 0; i < axutil_array_list_size(arraylist, env); i++)
+    for(i = 0; i < axutil_array_list_size(arraylist, env); i++)
     {
-        operator =(neethi_operator_t *) axutil_array_list_get(arraylist, env,
-                                                              i);
-        assertion =
-            (neethi_assertion_t *) neethi_operator_get_value(operator, env);
+        operator = (neethi_operator_t *)axutil_array_list_get(arraylist, env, i);
+        assertion = (neethi_assertion_t *)neethi_operator_get_value(operator, env);
         value = neethi_assertion_get_value(assertion, env);
         type = neethi_assertion_get_type(assertion, env);
 
-        if (type == ASSERTION_TYPE_MUST_SUPPORT_REF_KEY_IDENTIFIER)
+        if(type == ASSERTION_TYPE_MUST_SUPPORT_REF_KEY_IDENTIFIER)
         {
-            rp_wss11_set_must_support_ref_key_identifier(wss11, env,
-                                                         AXIS2_TRUE);
+            rp_wss11_set_must_support_ref_key_identifier(wss11, env, AXIS2_TRUE);
         }
-        else if (type == ASSERTION_TYPE_MUST_SUPPORT_REF_ISSUER_SERIAL)
+        else if(type == ASSERTION_TYPE_MUST_SUPPORT_REF_ISSUER_SERIAL)
         {
             rp_wss11_set_must_support_ref_issuer_serial(wss11, env, AXIS2_TRUE);
         }
-        else if (type == ASSERTION_TYPE_MUST_SUPPORT_REF_EXTERNAL_URI)
+        else if(type == ASSERTION_TYPE_MUST_SUPPORT_REF_EXTERNAL_URI)
         {
             rp_wss11_set_must_support_ref_external_uri(wss11, env, AXIS2_TRUE);
         }
-        else if (type == ASSERTION_TYPE_MUST_SUPPORT_REF_EMBEDDED_TOKEN)
+        else if(type == ASSERTION_TYPE_MUST_SUPPORT_REF_EMBEDDED_TOKEN)
         {
-            rp_wss11_set_must_support_ref_embedded_token(wss11, env,
-                                                         AXIS2_TRUE);
+            rp_wss11_set_must_support_ref_embedded_token(wss11, env, AXIS2_TRUE);
         }
-        else if (type == ASSERTION_TYPE_MUST_SUPPORT_REF_THUMBPRINT)
+        else if(type == ASSERTION_TYPE_MUST_SUPPORT_REF_THUMBPRINT)
         {
             rp_wss11_set_must_support_ref_thumbprint(wss11, env, AXIS2_TRUE);
         }
-        else if (type == ASSERTION_TYPE_MUST_SUPPORT_REF_ENCRYPTED_KEY)
+        else if(type == ASSERTION_TYPE_MUST_SUPPORT_REF_ENCRYPTED_KEY)
         {
             rp_wss11_set_must_support_ref_encryptedkey(wss11, env, AXIS2_TRUE);
         }
-        else if (type == ASSERTION_TYPE_REQUIRE_SIGNATURE_CONFIRMATION)
+        else if(type == ASSERTION_TYPE_REQUIRE_SIGNATURE_CONFIRMATION)
         {
-            rp_wss11_set_require_signature_confirmation(wss11, env,
-                                                         AXIS2_TRUE);
+            rp_wss11_set_require_signature_confirmation(wss11, env, AXIS2_TRUE);
         }
         else
             return AXIS2_FAILURE;

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/builder/x509_token_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/builder/x509_token_builder.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/builder/x509_token_builder.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/builder/x509_token_builder.c Tue Aug 18 10:45:16 2009
@@ -24,7 +24,8 @@
 
 /*private functions*/
 
-axis2_status_t AXIS2_CALL x509_token_process_alternatives(
+axis2_status_t AXIS2_CALL
+x509_token_process_alternatives(
     const axutil_env_t *env,
     neethi_all_t *all,
     rp_x509_token_t *x509_token);
@@ -67,39 +68,31 @@
     rp_x509_token_set_inclusion(x509_token, env, inclusion_value);
 
     child_node = axiom_node_get_first_element(node, env);
-    if (!child_node)
+    if(!child_node)
     {
         return NULL;
     }
 
-    if (axiom_node_get_node_type(child_node, env) == AXIOM_ELEMENT)
+    if(axiom_node_get_node_type(child_node, env) == AXIOM_ELEMENT)
     {
-        child_element =
-            (axiom_element_t *) axiom_node_get_data_element(child_node, env);
-        if (child_element)
+        child_element = (axiom_element_t *)axiom_node_get_data_element(child_node, env);
+        if(child_element)
         {
             policy = neethi_engine_get_policy(env, child_node, child_element);
-            if (!policy)
+            if(!policy)
             {
                 return NULL;
             }
-            normalized_policy =
-                neethi_engine_get_normalize(env, AXIS2_FALSE, policy);
+            normalized_policy = neethi_engine_get_normalize(env, AXIS2_FALSE, policy);
             neethi_policy_free(policy, env);
             policy = NULL;
-            alternatives =
-                neethi_policy_get_alternatives(normalized_policy, env);
-            component =
-                (neethi_operator_t *) axutil_array_list_get(alternatives, env,
-                                                            0);
-            all = (neethi_all_t *) neethi_operator_get_value(component, env);
+            alternatives = neethi_policy_get_alternatives(normalized_policy, env);
+            component = (neethi_operator_t *)axutil_array_list_get(alternatives, env, 0);
+            all = (neethi_all_t *)neethi_operator_get_value(component, env);
             x509_token_process_alternatives(env, all, x509_token);
 
-            assertion =
-                neethi_assertion_create_with_args(env,
-                                                  (AXIS2_FREE_VOID_ARG)rp_x509_token_free,
-                                                  x509_token,
-                                                  ASSERTION_TYPE_X509_TOKEN);
+            assertion = neethi_assertion_create_with_args(env,
+                (AXIS2_FREE_VOID_ARG)rp_x509_token_free, x509_token, ASSERTION_TYPE_X509_TOKEN);
 
             neethi_policy_free(normalized_policy, env);
             normalized_policy = NULL;
@@ -128,53 +121,45 @@
 
     arraylist = neethi_all_get_policy_components(all, env);
 
-    for (i = 0; i < axutil_array_list_size(arraylist, env); i++)
+    for(i = 0; i < axutil_array_list_size(arraylist, env); i++)
     {
-        operator =(neethi_operator_t *) axutil_array_list_get(arraylist, env,
-                                                              i);
-        assertion =
-            (neethi_assertion_t *) neethi_operator_get_value(operator, env);
+        operator = (neethi_operator_t *)axutil_array_list_get(arraylist, env, i);
+        assertion = (neethi_assertion_t *)neethi_operator_get_value(operator, env);
         type = neethi_assertion_get_type(assertion, env);
 
         if(type == ASSERTION_TYPE_REQUIRE_DERIVED_KEYS_SC10)
         {
             rp_x509_token_set_derivedkey(x509_token, env, DERIVEKEY_NEEDED);
             rp_x509_token_set_derivedkey_version(x509_token, env, DERIVEKEY_VERSION_SC10);
-        }  
+        }
         else if(type == ASSERTION_TYPE_REQUIRE_DERIVED_KEYS_SC13)
         {
             rp_x509_token_set_derivedkey(x509_token, env, DERIVEKEY_NEEDED);
             rp_x509_token_set_derivedkey_version(x509_token, env, DERIVEKEY_VERSION_SC13);
         }
-        else if (type == ASSERTION_TYPE_REQUIRE_KEY_IDENTIFIRE_REFERENCE)
+        else if(type == ASSERTION_TYPE_REQUIRE_KEY_IDENTIFIRE_REFERENCE)
         {
-            rp_x509_token_set_require_key_identifier_reference(x509_token, env,
-                                                               AXIS2_TRUE);
+            rp_x509_token_set_require_key_identifier_reference(x509_token, env, AXIS2_TRUE);
         }
-        else if (type == ASSERTION_TYPE_REQUIRE_ISSUER_SERIAL_REFERENCE)
+        else if(type == ASSERTION_TYPE_REQUIRE_ISSUER_SERIAL_REFERENCE)
         {
-            rp_x509_token_set_require_issuer_serial_reference(x509_token, env,
-                                                              AXIS2_TRUE);
+            rp_x509_token_set_require_issuer_serial_reference(x509_token, env, AXIS2_TRUE);
         }
-        else if (type == ASSERTION_TYPE_REQUIRE_EMBEDDED_TOKEN_REFERENCE)
+        else if(type == ASSERTION_TYPE_REQUIRE_EMBEDDED_TOKEN_REFERENCE)
         {
-            rp_x509_token_set_require_embedded_token_reference(x509_token, env,
-                                                               AXIS2_TRUE);
+            rp_x509_token_set_require_embedded_token_reference(x509_token, env, AXIS2_TRUE);
         }
-        else if (type == ASSERTION_TYPE_REQUIRE_THUMBPRINT_REFERENCE)
+        else if(type == ASSERTION_TYPE_REQUIRE_THUMBPRINT_REFERENCE)
         {
-            rp_x509_token_set_require_thumb_print_reference(x509_token, env,
-                                                            AXIS2_TRUE);
+            rp_x509_token_set_require_thumb_print_reference(x509_token, env, AXIS2_TRUE);
         }
-        else if (type == ASSERTION_TYPE_WSS_X509_V1_TOKEN_10)
+        else if(type == ASSERTION_TYPE_WSS_X509_V1_TOKEN_10)
         {
-            rp_x509_token_set_token_version_and_type(x509_token, env,
-                                                     RP_WSS_X509_V1_TOKEN_10);
+            rp_x509_token_set_token_version_and_type(x509_token, env, RP_WSS_X509_V1_TOKEN_10);
         }
-        else if (type == ASSERTION_TYPE_WSS_X509_V3_TOKEN_10)
+        else if(type == ASSERTION_TYPE_WSS_X509_V3_TOKEN_10)
         {
-            rp_x509_token_set_token_version_and_type(x509_token, env,
-                                                     RP_WSS_X509_V3_TOKEN_10);
+            rp_x509_token_set_token_version_and_type(x509_token, env, RP_WSS_X509_V3_TOKEN_10);
         }
         else
             return AXIS2_FAILURE;

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/model/algorithmsuite.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/model/algorithmsuite.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/algorithmsuite.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/algorithmsuite.c Tue Aug 18 10:45:16 2009
@@ -51,11 +51,10 @@
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    algorithmsuite = (rp_algorithmsuite_t *) AXIS2_MALLOC(env->allocator,
-                                                          sizeof
-                                                          (rp_algorithmsuite_t));
+    algorithmsuite = (rp_algorithmsuite_t *)AXIS2_MALLOC(env->allocator,
+        sizeof(rp_algorithmsuite_t));
 
-    if (algorithmsuite == NULL)
+    if(algorithmsuite == NULL)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
@@ -76,7 +75,8 @@
     algorithmsuite->signature_key_derivation = NULL;
     algorithmsuite->encryption_key_derivation_keylength = 192;
     algorithmsuite->signature_key_derivation_keylength = 192;
-    algorithmsuite->min_symmetric_keylength = 0;;
+    algorithmsuite->min_symmetric_keylength = 0;
+    ;
     algorithmsuite->c14n = RP_EX_C14N;
     algorithmsuite->soap_normalization = NULL;
     algorithmsuite->str_transformation = NULL;
@@ -90,9 +90,9 @@
     rp_algorithmsuite_t *algorithmsuite,
     const axutil_env_t *env)
 {
-    if (algorithmsuite)
+    if(algorithmsuite)
     {
-        if (--(algorithmsuite->ref) > 0)
+        if(--(algorithmsuite->ref) > 0)
         {
             return;
         }
@@ -110,7 +110,7 @@
     rp_algorithmsuite_t *algorithmsuite,
     const axutil_env_t *env)
 {
-    if (!algorithmsuite)
+    if(!algorithmsuite)
         return NULL;
     else
         return algorithmsuite->algosuite_string;
@@ -127,7 +127,7 @@
 
     algorithmsuite->algosuite_string = algosuite_string;
 
-    if (axutil_strcmp(algosuite_string, RP_ALGO_SUITE_BASIC256) == 0)
+    if(axutil_strcmp(algosuite_string, RP_ALGO_SUITE_BASIC256) == 0)
     {
         algorithmsuite->digest = RP_SHA1;
         algorithmsuite->encryption = RP_AES256;
@@ -141,7 +141,7 @@
 
         return AXIS2_SUCCESS;
     }
-    else if (axutil_strcmp(algosuite_string, RP_ALGO_SUITE_BASIC192) == 0)
+    else if(axutil_strcmp(algosuite_string, RP_ALGO_SUITE_BASIC192) == 0)
     {
         algorithmsuite->digest = RP_SHA1;
         algorithmsuite->encryption = RP_AES192;
@@ -155,7 +155,7 @@
 
         return AXIS2_SUCCESS;
     }
-    else if (axutil_strcmp(algosuite_string, RP_ALGO_SUITE_BASIC128) == 0)
+    else if(axutil_strcmp(algosuite_string, RP_ALGO_SUITE_BASIC128) == 0)
     {
         algorithmsuite->digest = RP_SHA1;
         algorithmsuite->encryption = RP_AES128;
@@ -169,7 +169,7 @@
 
         return AXIS2_SUCCESS;
     }
-    else if (axutil_strcmp(algosuite_string, RP_ALGO_SUITE_TRIPLE_DES) == 0)
+    else if(axutil_strcmp(algosuite_string, RP_ALGO_SUITE_TRIPLE_DES) == 0)
     {
         algorithmsuite->digest = RP_SHA1;
         algorithmsuite->encryption = RP_TRIPLE_DES;
@@ -183,7 +183,7 @@
 
         return AXIS2_SUCCESS;
     }
-    else if (axutil_strcmp(algosuite_string, RP_ALGO_SUITE_BASIC256_RSA15) == 0)
+    else if(axutil_strcmp(algosuite_string, RP_ALGO_SUITE_BASIC256_RSA15) == 0)
     {
         algorithmsuite->digest = RP_SHA1;
         algorithmsuite->encryption = RP_AES256;
@@ -197,7 +197,7 @@
 
         return AXIS2_SUCCESS;
     }
-    else if (axutil_strcmp(algosuite_string, RP_ALGO_SUITE_BASIC192_RSA15) == 0)
+    else if(axutil_strcmp(algosuite_string, RP_ALGO_SUITE_BASIC192_RSA15) == 0)
     {
         algorithmsuite->digest = RP_SHA1;
         algorithmsuite->encryption = RP_AES192;
@@ -211,7 +211,7 @@
 
         return AXIS2_SUCCESS;
     }
-    else if (axutil_strcmp(algosuite_string, RP_ALGO_SUITE_BASIC128_RSA15) == 0)
+    else if(axutil_strcmp(algosuite_string, RP_ALGO_SUITE_BASIC128_RSA15) == 0)
     {
         algorithmsuite->digest = RP_SHA1;
         algorithmsuite->encryption = RP_AES128;
@@ -225,8 +225,7 @@
 
         return AXIS2_SUCCESS;
     }
-    else if (axutil_strcmp(algosuite_string, RP_ALGO_SUITE_TRIPLE_DES_RSA15) ==
-             0)
+    else if(axutil_strcmp(algosuite_string, RP_ALGO_SUITE_TRIPLE_DES_RSA15) == 0)
     {
         algorithmsuite->digest = RP_SHA1;
         algorithmsuite->encryption = RP_TRIPLE_DES;
@@ -240,8 +239,7 @@
 
         return AXIS2_SUCCESS;
     }
-    else if (axutil_strcmp(algosuite_string, RP_ALGO_SUITE_BASIC256_SHA256) ==
-             0)
+    else if(axutil_strcmp(algosuite_string, RP_ALGO_SUITE_BASIC256_SHA256) == 0)
     {
         algorithmsuite->digest = RP_SHA256;
         algorithmsuite->encryption = RP_AES256;
@@ -255,8 +253,7 @@
 
         return AXIS2_SUCCESS;
     }
-    else if (axutil_strcmp(algosuite_string, RP_ALGO_SUITE_BASIC192_SHA256) ==
-             0)
+    else if(axutil_strcmp(algosuite_string, RP_ALGO_SUITE_BASIC192_SHA256) == 0)
     {
         algorithmsuite->digest = RP_SHA256;
         algorithmsuite->encryption = RP_AES192;
@@ -270,8 +267,7 @@
 
         return AXIS2_SUCCESS;
     }
-    else if (axutil_strcmp(algosuite_string, RP_ALGO_SUITE_BASIC128_SHA256) ==
-             0)
+    else if(axutil_strcmp(algosuite_string, RP_ALGO_SUITE_BASIC128_SHA256) == 0)
     {
         algorithmsuite->digest = RP_SHA256;
         algorithmsuite->encryption = RP_AES128;
@@ -285,8 +281,7 @@
 
         return AXIS2_SUCCESS;
     }
-    else if (axutil_strcmp(algosuite_string, RP_ALGO_SUITE_TRIPLE_DES_SHA256) ==
-             0)
+    else if(axutil_strcmp(algosuite_string, RP_ALGO_SUITE_TRIPLE_DES_SHA256) == 0)
     {
         algorithmsuite->digest = RP_SHA256;
         algorithmsuite->encryption = RP_TRIPLE_DES;
@@ -300,8 +295,7 @@
 
         return AXIS2_SUCCESS;
     }
-    else if (axutil_strcmp
-             (algosuite_string, RP_ALGO_SUITE_BASIC256_SHA256_RSA15) == 0)
+    else if(axutil_strcmp(algosuite_string, RP_ALGO_SUITE_BASIC256_SHA256_RSA15) == 0)
     {
         algorithmsuite->digest = RP_SHA256;
         algorithmsuite->encryption = RP_AES256;
@@ -315,8 +309,7 @@
 
         return AXIS2_SUCCESS;
     }
-    else if (axutil_strcmp
-             (algosuite_string, RP_ALGO_SUITE_BASIC192_SHA256_RSA15) == 0)
+    else if(axutil_strcmp(algosuite_string, RP_ALGO_SUITE_BASIC192_SHA256_RSA15) == 0)
     {
         algorithmsuite->digest = RP_SHA256;
         algorithmsuite->encryption = RP_AES192;
@@ -330,8 +323,7 @@
 
         return AXIS2_SUCCESS;
     }
-    else if (axutil_strcmp
-             (algosuite_string, RP_ALGO_SUITE_BASIC128_SHA256_RSA15) == 0)
+    else if(axutil_strcmp(algosuite_string, RP_ALGO_SUITE_BASIC128_SHA256_RSA15) == 0)
     {
         algorithmsuite->digest = RP_SHA256;
         algorithmsuite->encryption = RP_AES128;
@@ -345,8 +337,7 @@
 
         return AXIS2_SUCCESS;
     }
-    else if (axutil_strcmp
-             (algosuite_string, RP_ALGO_SUITE_TRIPLE_DES_SHA256_RSA15) == 0)
+    else if(axutil_strcmp(algosuite_string, RP_ALGO_SUITE_TRIPLE_DES_SHA256_RSA15) == 0)
     {
         algorithmsuite->digest = RP_SHA256;
         algorithmsuite->encryption = RP_TRIPLE_DES;

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/model/asymmetric_binding.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/model/asymmetric_binding.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/asymmetric_binding.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/asymmetric_binding.c Tue Aug 18 10:45:16 2009
@@ -19,8 +19,7 @@
 
 struct rp_asymmetric_binding_t
 {
-    rp_symmetric_asymmetric_binding_commons_t
-        *symmetric_asymmetric_binding_commons;
+    rp_symmetric_asymmetric_binding_commons_t *symmetric_asymmetric_binding_commons;
     rp_property_t *initiator_token;
     rp_property_t *recipient_token;
     int ref;
@@ -34,12 +33,10 @@
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    asymmetric_binding =
-        (rp_asymmetric_binding_t *) AXIS2_MALLOC(env->allocator,
-                                                 sizeof
-                                                 (rp_asymmetric_binding_t));
+    asymmetric_binding = (rp_asymmetric_binding_t *)AXIS2_MALLOC(env->allocator,
+        sizeof(rp_asymmetric_binding_t));
 
-    if (asymmetric_binding == NULL)
+    if(asymmetric_binding == NULL)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
@@ -59,27 +56,26 @@
     rp_asymmetric_binding_t *asymmetric_binding,
     const axutil_env_t *env)
 {
-    if (asymmetric_binding)
+    if(asymmetric_binding)
     {
 
-        if (--(asymmetric_binding->ref) > 0)
+        if(--(asymmetric_binding->ref) > 0)
         {
             return;
         }
 
-        if (asymmetric_binding->symmetric_asymmetric_binding_commons)
+        if(asymmetric_binding->symmetric_asymmetric_binding_commons)
         {
-            rp_symmetric_asymmetric_binding_commons_free(asymmetric_binding->
-                                                         symmetric_asymmetric_binding_commons,
-                                                         env);
+            rp_symmetric_asymmetric_binding_commons_free(
+                asymmetric_binding-> symmetric_asymmetric_binding_commons, env);
             asymmetric_binding->symmetric_asymmetric_binding_commons = NULL;
         }
-        if (asymmetric_binding->initiator_token)
+        if(asymmetric_binding->initiator_token)
         {
             rp_property_free(asymmetric_binding->initiator_token, env);
             asymmetric_binding->initiator_token = NULL;
         }
-        if (asymmetric_binding->recipient_token)
+        if(asymmetric_binding->recipient_token)
         {
             rp_property_free(asymmetric_binding->recipient_token, env);
             asymmetric_binding->recipient_token = NULL;
@@ -104,14 +100,11 @@
 rp_asymmetric_binding_set_symmetric_asymmetric_binding_commons(
     rp_asymmetric_binding_t *asymmetric_binding,
     const axutil_env_t *env,
-    rp_symmetric_asymmetric_binding_commons_t *
-    symmetric_asymmetric_binding_commons)
+    rp_symmetric_asymmetric_binding_commons_t * symmetric_asymmetric_binding_commons)
 {
-    AXIS2_PARAM_CHECK(env->error, symmetric_asymmetric_binding_commons,
-                      AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, symmetric_asymmetric_binding_commons, AXIS2_FAILURE);
 
-    asymmetric_binding->symmetric_asymmetric_binding_commons
-        = symmetric_asymmetric_binding_commons;
+    asymmetric_binding->symmetric_asymmetric_binding_commons = symmetric_asymmetric_binding_commons;
     return AXIS2_SUCCESS;
 }
 

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/model/binding_commons.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/model/binding_commons.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/binding_commons.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/binding_commons.c Tue Aug 18 10:45:16 2009
@@ -36,11 +36,10 @@
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    binding_commons = (rp_binding_commons_t *) AXIS2_MALLOC(env->allocator,
-                                                            sizeof
-                                                            (rp_binding_commons_t));
+    binding_commons = (rp_binding_commons_t *)AXIS2_MALLOC(env->allocator,
+        sizeof(rp_binding_commons_t));
 
-    if (binding_commons == NULL)
+    if(binding_commons == NULL)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Out of memory");
@@ -63,37 +62,34 @@
     rp_binding_commons_t *binding_commons,
     const axutil_env_t *env)
 {
-    if (binding_commons)
+    if(binding_commons)
     {
-        if (binding_commons->algorithmsuite)
+        if(binding_commons->algorithmsuite)
         {
             rp_algorithmsuite_free(binding_commons->algorithmsuite, env);
             binding_commons->algorithmsuite = NULL;
         }
-        if (binding_commons->layout)
+        if(binding_commons->layout)
         {
             rp_layout_free(binding_commons->layout, env);
             binding_commons->layout = NULL;
         }
-        if (binding_commons->signed_supporting_tokens)
+        if(binding_commons->signed_supporting_tokens)
         {
-            rp_supporting_tokens_free(binding_commons->signed_supporting_tokens,
-                                      env);
+            rp_supporting_tokens_free(binding_commons->signed_supporting_tokens, env);
             binding_commons->signed_supporting_tokens = NULL;
         }
-        if (binding_commons->signed_endorsing_supporting_tokens)
+        if(binding_commons->signed_endorsing_supporting_tokens)
         {
-            rp_supporting_tokens_free(binding_commons->
-                                      signed_endorsing_supporting_tokens, env);
+            rp_supporting_tokens_free(binding_commons-> signed_endorsing_supporting_tokens, env);
             binding_commons->signed_endorsing_supporting_tokens = NULL;
         }
-        if (binding_commons->endorsing_supporting_tokens)
+        if(binding_commons->endorsing_supporting_tokens)
         {
-            rp_supporting_tokens_free(binding_commons->
-                                      endorsing_supporting_tokens, env);
+            rp_supporting_tokens_free(binding_commons-> endorsing_supporting_tokens, env);
             binding_commons->endorsing_supporting_tokens = NULL;
         }
-        if (binding_commons->supporting_tokens)
+        if(binding_commons->supporting_tokens)
         {
             rp_supporting_tokens_free(binding_commons->supporting_tokens, env);
             binding_commons->supporting_tokens = NULL;
@@ -204,11 +200,9 @@
     const axutil_env_t *env,
     rp_supporting_tokens_t *signed_endorsing_supporting_tokens)
 {
-    AXIS2_PARAM_CHECK(env->error, signed_endorsing_supporting_tokens,
-                      AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, signed_endorsing_supporting_tokens, AXIS2_FAILURE);
 
-    binding_commons->signed_endorsing_supporting_tokens =
-        signed_endorsing_supporting_tokens;
+    binding_commons->signed_endorsing_supporting_tokens = signed_endorsing_supporting_tokens;
     return AXIS2_SUCCESS;
 }
 

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/model/element.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/model/element.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/element.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/element.c Tue Aug 18 10:45:16 2009
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -32,10 +31,9 @@
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    element = (rp_element_t *) AXIS2_MALLOC(env->allocator,
-                                            sizeof(rp_element_t));
+    element = (rp_element_t *)AXIS2_MALLOC(env->allocator, sizeof(rp_element_t));
 
-    if (element == NULL)
+    if(element == NULL)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -54,7 +52,7 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    if (element)
+    if(element)
     {
         AXIS2_FREE(env->allocator, element);
         element = NULL;

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/model/header.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/model/header.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/header.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/header.c Tue Aug 18 10:45:16 2009
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -32,9 +31,9 @@
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    header = (rp_header_t *) AXIS2_MALLOC(env->allocator, sizeof(rp_header_t));
+    header = (rp_header_t *)AXIS2_MALLOC(env->allocator, sizeof(rp_header_t));
 
-    if (header == NULL)
+    if(header == NULL)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -53,14 +52,14 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    if (header)
+    if(header)
     {
-        if (header->name)
+        if(header->name)
         {
             AXIS2_FREE(env->allocator, header->name);
             header->name = NULL;
         }
-        if (header->nspace)
+        if(header->nspace)
         {
             AXIS2_FREE(env->allocator, header->nspace);
             header->nspace = NULL;

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/model/https_token.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/model/https_token.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/https_token.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/https_token.c Tue Aug 18 10:45:16 2009
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -34,10 +33,9 @@
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    https_token = (rp_https_token_t *) AXIS2_MALLOC(env->allocator,
-                                                    sizeof(rp_https_token_t));
+    https_token = (rp_https_token_t *)AXIS2_MALLOC(env->allocator, sizeof(rp_https_token_t));
 
-    if (https_token == NULL)
+    if(https_token == NULL)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -58,9 +56,9 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    if (https_token)
+    if(https_token)
     {
-        if (--(https_token->ref) > 0)
+        if(--(https_token->ref) > 0)
         {
             return;
         }
@@ -139,7 +137,7 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, require_client_certificate, AXIS2_FAILURE)
-        https_token->require_client_certificate = require_client_certificate;
+    https_token->require_client_certificate = require_client_certificate;
 
     return AXIS2_SUCCESS;
 }

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/model/issued_token.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/model/issued_token.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/issued_token.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/issued_token.c Tue Aug 18 10:45:16 2009
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -18,194 +17,195 @@
 
 #include <rp_issued_token.h>
 
-struct rp_issued_token {
-	axis2_char_t *inclusion;
-	axiom_node_t *issuer_epr;
-	axiom_node_t *requested_sec_token_template;
-	axis2_bool_t derivedkeys;
-	axis2_bool_t require_external_reference;
-	axis2_bool_t require_internal_reference;
-	int ref;
+struct rp_issued_token
+{
+    axis2_char_t *inclusion;
+    axiom_node_t *issuer_epr;
+    axiom_node_t *requested_sec_token_template;
+    axis2_bool_t derivedkeys;
+    axis2_bool_t require_external_reference;
+    axis2_bool_t require_internal_reference;
+    int ref;
 };
 
 AXIS2_EXTERN rp_issued_token_t * AXIS2_CALL
 rp_issued_token_create(
-		const axutil_env_t *env)
+    const axutil_env_t *env)
 {
-	rp_issued_token_t *issued_token = NULL;
-	
-	issued_token = (rp_issued_token_t*)AXIS2_MALLOC(env->allocator, sizeof(rp_issued_token_t));
-	
-	if (issued_token == NULL)
-	{
-		AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-	    return NULL;
-	}
-	
-	issued_token->inclusion = NULL;
-	issued_token->issuer_epr = NULL;
-	issued_token->requested_sec_token_template = NULL;
-	issued_token->derivedkeys = AXIS2_FALSE;
-	issued_token->require_external_reference = AXIS2_FALSE;
-	issued_token->require_internal_reference = AXIS2_FALSE;
-	issued_token->ref = 0;
-	
-	return issued_token;	
+    rp_issued_token_t *issued_token = NULL;
+
+    issued_token = (rp_issued_token_t*)AXIS2_MALLOC(env->allocator, sizeof(rp_issued_token_t));
+
+    if(issued_token == NULL)
+    {
+        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        return NULL;
+    }
+
+    issued_token->inclusion = NULL;
+    issued_token->issuer_epr = NULL;
+    issued_token->requested_sec_token_template = NULL;
+    issued_token->derivedkeys = AXIS2_FALSE;
+    issued_token->require_external_reference = AXIS2_FALSE;
+    issued_token->require_internal_reference = AXIS2_FALSE;
+    issued_token->ref = 0;
+
+    return issued_token;
 }
 
 AXIS2_EXTERN void AXIS2_CALL
 rp_issued_token_free(
-		rp_issued_token_t *issued_token,
-		const axutil_env_t *env)
+    rp_issued_token_t *issued_token,
+    const axutil_env_t *env)
 {
-	if(issued_token)
-	{
-		if(--(issued_token->ref) > 0)
-		{
-			return;
-		}
-		
-		AXIS2_FREE(env->allocator, issued_token);
-		issued_token = NULL;
-	}
-	return;
+    if(issued_token)
+    {
+        if(--(issued_token->ref) > 0)
+        {
+            return;
+        }
+
+        AXIS2_FREE(env->allocator, issued_token);
+        issued_token = NULL;
+    }
+    return;
 }
 
 AXIS2_EXTERN axis2_char_t * AXIS2_CALL
 rp_issued_token_get_inclusion(
-		rp_issued_token_t *issued_token,
-		const axutil_env_t *env)
+    rp_issued_token_t *issued_token,
+    const axutil_env_t *env)
 {
-	return issued_token->inclusion;
+    return issued_token->inclusion;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 rp_issued_token_set_inclusion(
-		rp_issued_token_t *issued_token,
-		const axutil_env_t *env,
-		axis2_char_t *inclusion)
-{
-	if(inclusion)
-	{
-		issued_token->inclusion = inclusion;
-		return AXIS2_SUCCESS;		
-	}
-	
-	return AXIS2_FAILURE;
+    rp_issued_token_t *issued_token,
+    const axutil_env_t *env,
+    axis2_char_t *inclusion)
+{
+    if(inclusion)
+    {
+        issued_token->inclusion = inclusion;
+        return AXIS2_SUCCESS;
+    }
+
+    return AXIS2_FAILURE;
 }
 
 AXIS2_EXTERN axiom_node_t * AXIS2_CALL
 rp_issued_token_get_issuer_epr(
-		rp_issued_token_t *issued_token,
-		const axutil_env_t *env)
+    rp_issued_token_t *issued_token,
+    const axutil_env_t *env)
 {
-	return issued_token->issuer_epr;
+    return issued_token->issuer_epr;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 rp_issued_token_set_issuer_epr(
-		rp_issued_token_t *issued_token,
-		const axutil_env_t *env,
-		axiom_node_t *issuer_epr)
-{
-	if(issuer_epr)
-	{
-		issued_token->issuer_epr = issuer_epr;
-		return AXIS2_SUCCESS;
-	}
-	
-	return AXIS2_FAILURE;
+    rp_issued_token_t *issued_token,
+    const axutil_env_t *env,
+    axiom_node_t *issuer_epr)
+{
+    if(issuer_epr)
+    {
+        issued_token->issuer_epr = issuer_epr;
+        return AXIS2_SUCCESS;
+    }
+
+    return AXIS2_FAILURE;
 }
 
 AXIS2_EXTERN axiom_node_t * AXIS2_CALL
 rp_issued_token_get_requested_sec_token_template(
-		rp_issued_token_t *issued_token,
-		const axutil_env_t *env)
+    rp_issued_token_t *issued_token,
+    const axutil_env_t *env)
 {
-	return issued_token->requested_sec_token_template;
+    return issued_token->requested_sec_token_template;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 rp_issued_token_set_requested_sec_token_template(
-		rp_issued_token_t *issued_token,
-		const axutil_env_t *env,
-		axiom_node_t *req_sec_token_template)
-{
-	if(req_sec_token_template)
-	{
-		issued_token->requested_sec_token_template = req_sec_token_template;
-		return AXIS2_SUCCESS;
-	}
-	
-	return AXIS2_FAILURE;
+    rp_issued_token_t *issued_token,
+    const axutil_env_t *env,
+    axiom_node_t *req_sec_token_template)
+{
+    if(req_sec_token_template)
+    {
+        issued_token->requested_sec_token_template = req_sec_token_template;
+        return AXIS2_SUCCESS;
+    }
+
+    return AXIS2_FAILURE;
 }
 
 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
 rp_issued_token_get_derivedkeys(
-		rp_issued_token_t *issued_token,
-		const axutil_env_t *env)
+    rp_issued_token_t *issued_token,
+    const axutil_env_t *env)
 {
-	return issued_token->derivedkeys;
+    return issued_token->derivedkeys;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 rp_issued_token_set_derivedkeys(
-		rp_issued_token_t *issued_token,
-		const axutil_env_t *env,
-		axis2_bool_t derivedkeys)
-{
-	AXIS2_PARAM_CHECK(env->error, derivedkeys, AXIS2_FAILURE);
-	issued_token->derivedkeys = derivedkeys;
-	
-	return AXIS2_SUCCESS;
+    rp_issued_token_t *issued_token,
+    const axutil_env_t *env,
+    axis2_bool_t derivedkeys)
+{
+    AXIS2_PARAM_CHECK(env->error, derivedkeys, AXIS2_FAILURE);
+    issued_token->derivedkeys = derivedkeys;
+
+    return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
 rp_issued_token_get_require_external_reference(
-		rp_issued_token_t *issued_token,
-		const axutil_env_t *env)
+    rp_issued_token_t *issued_token,
+    const axutil_env_t *env)
 {
-	return issued_token->require_external_reference;
+    return issued_token->require_external_reference;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 rp_issued_token_set_require_exernal_reference(
-		rp_issued_token_t *issued_token,
-		const axutil_env_t *env,
-		axis2_bool_t require_external_reference)
-{
-	AXIS2_PARAM_CHECK(env->error, require_external_reference, AXIS2_FAILURE);
-	issued_token->require_external_reference = require_external_reference;
-	
-	return AXIS2_SUCCESS;
+    rp_issued_token_t *issued_token,
+    const axutil_env_t *env,
+    axis2_bool_t require_external_reference)
+{
+    AXIS2_PARAM_CHECK(env->error, require_external_reference, AXIS2_FAILURE);
+    issued_token->require_external_reference = require_external_reference;
+
+    return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
 rp_issued_token_get_require_internal_reference(
-		rp_issued_token_t *issued_token,
-		const axutil_env_t *env)
+    rp_issued_token_t *issued_token,
+    const axutil_env_t *env)
 {
-	return issued_token->require_internal_reference;
+    return issued_token->require_internal_reference;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 rp_issued_token_set_require_internal_reference(
-		rp_issued_token_t *issued_token,
-		const axutil_env_t *env,
-		axis2_bool_t require_internal_reference)
-{
-	AXIS2_PARAM_CHECK(env->error, require_internal_reference, AXIS2_FAILURE);
-	issued_token->require_internal_reference = require_internal_reference;
-	
-	return AXIS2_SUCCESS;
+    rp_issued_token_t *issued_token,
+    const axutil_env_t *env,
+    axis2_bool_t require_internal_reference)
+{
+    AXIS2_PARAM_CHECK(env->error, require_internal_reference, AXIS2_FAILURE);
+    issued_token->require_internal_reference = require_internal_reference;
+
+    return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 rp_issued_token_increment_ref(
-		rp_issued_token_t *issued_token,
-		const axutil_env_t *env)
+    rp_issued_token_t *issued_token,
+    const axutil_env_t *env)
 {
-	issued_token->ref++;
-	return AXIS2_SUCCESS;
+    issued_token->ref++;
+    return AXIS2_SUCCESS;
 }
 

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/model/layout.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/model/layout.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/layout.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/layout.c Tue Aug 18 10:45:16 2009
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -32,9 +31,9 @@
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    layout = (rp_layout_t *) AXIS2_MALLOC(env->allocator, sizeof(rp_layout_t));
+    layout = (rp_layout_t *)AXIS2_MALLOC(env->allocator, sizeof(rp_layout_t));
 
-    if (layout == NULL)
+    if(layout == NULL)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -52,9 +51,9 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    if (layout)
+    if(layout)
     {
-        if (--(layout->ref) > 0)
+        if(--(layout->ref) > 0)
         {
             return;
         }

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/model/property.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/model/property.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/property.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/property.c Tue Aug 18 10:45:16 2009
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -39,10 +38,9 @@
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    property = (rp_property_t *) AXIS2_MALLOC(env->allocator,
-                                              sizeof(rp_property_t));
+    property = (rp_property_t *)AXIS2_MALLOC(env->allocator, sizeof(rp_property_t));
 
-    if (property == NULL)
+    if(property == NULL)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -61,109 +59,100 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    if (property)
+    if(property)
     {
-        if (--(property->ref) > 0)
+        if(--(property->ref) > 0)
         {
             return;
         }
 
-        if (property->value)
+        if(property->value)
         {
-            switch (property->type)
+            switch(property->type)
             {
-            case RP_PROPERTY_USERNAME_TOKEN:
-                rp_username_token_free((rp_username_token_t *) property->value,
-                                       env);
-                property->value = NULL;
-                break;
-
-            case RP_PROPERTY_X509_TOKEN:
-                rp_x509_token_free((rp_x509_token_t *) property->value, env);
-                property->value = NULL;
-                break;
-                
-            case RP_PROPERTY_ISSUED_TOKEN:
-                rp_issued_token_free((rp_issued_token_t *)property->value, env);
-                property->value = NULL;
-                break;
-
-            case RP_PROPERTY_SAML_TOKEN:
-                rp_saml_token_free((rp_saml_token_t *)property->value, env);
-                property->value = NULL;
-            break;
-
-            case RP_PROPERTY_SECURITY_CONTEXT_TOKEN:
-                rp_security_context_token_free((rp_security_context_token_t *)
-                                               property->value, env);
-                property->value = NULL;
-                break;
-
-            case RP_PROPERTY_HTTPS_TOKEN:
-                rp_https_token_free((rp_https_token_t *) property->value, env);
-                property->value = NULL;
-                break;
-
-            case RP_PROPERTY_SYMMETRIC_BINDING:
-                rp_symmetric_binding_free((rp_symmetric_binding_t *) property->
-                                          value, env);
-                property->value = NULL;
-                break;
-
-            case RP_PROPERTY_ASYMMETRIC_BINDING:
-                rp_asymmetric_binding_free((rp_asymmetric_binding_t *)
-                                           property->value, env);
-                property->value = NULL;
-                break;
-
-            case RP_PROPERTY_TRANSPORT_BINDING:
-                rp_transport_binding_free((rp_transport_binding_t *) property->
-                                          value, env);
-                property->value = NULL;
-                break;
-
-            case RP_PROPERTY_SIGNED_SUPPORTING_TOKEN:
-                rp_supporting_tokens_free((rp_supporting_tokens_t *) property->
-                                          value, env);
-                property->value = NULL;
-                break;
-
-            case RP_PROPERTY_SIGNED_ENDORSING_SUPPORTING_TOKEN:
-                rp_supporting_tokens_free((rp_supporting_tokens_t *) property->
-                                          value, env);
-                property->value = NULL;
-                break;
-
-            case RP_PROPERTY_SUPPORTING_SUPPORTING_TOKEN:
-                rp_supporting_tokens_free((rp_supporting_tokens_t *) property->
-                                          value, env);
-                property->value = NULL;
-                break;
-
-            case RP_PROPERTY_ENDORSING_SUPPORTING_TOKEN:
-                rp_supporting_tokens_free((rp_supporting_tokens_t *) property->
-                                          value, env);
-                property->value = NULL;
-                break;
-
-            case RP_PROPERTY_SUPPORTING_TOKEN:
-                rp_supporting_tokens_free((rp_supporting_tokens_t *) property->
-                                          value, env);
-                property->value = NULL;
-                break;
-
-            case RP_PROPERTY_WSS10:
-                rp_wss10_free((rp_wss10_t *) property->value, env);
-                property->value = NULL;
-                break;
-
-            case RP_PROPERTY_WSS11:
-                rp_wss11_free((rp_wss11_t *) property->value, env);
-                property->value = NULL;
-                break;
+                case RP_PROPERTY_USERNAME_TOKEN:
+                    rp_username_token_free((rp_username_token_t *)property->value, env);
+                    property->value = NULL;
+                    break;
+
+                case RP_PROPERTY_X509_TOKEN:
+                    rp_x509_token_free((rp_x509_token_t *)property->value, env);
+                    property->value = NULL;
+                    break;
+
+                case RP_PROPERTY_ISSUED_TOKEN:
+                    rp_issued_token_free((rp_issued_token_t *)property->value, env);
+                    property->value = NULL;
+                    break;
+
+                case RP_PROPERTY_SAML_TOKEN:
+                    rp_saml_token_free((rp_saml_token_t *)property->value, env);
+                    property->value = NULL;
+                    break;
+
+                case RP_PROPERTY_SECURITY_CONTEXT_TOKEN:
+                    rp_security_context_token_free((rp_security_context_token_t *)property->value,
+                        env);
+                    property->value = NULL;
+                    break;
+
+                case RP_PROPERTY_HTTPS_TOKEN:
+                    rp_https_token_free((rp_https_token_t *)property->value, env);
+                    property->value = NULL;
+                    break;
+
+                case RP_PROPERTY_SYMMETRIC_BINDING:
+                    rp_symmetric_binding_free((rp_symmetric_binding_t *)property-> value, env);
+                    property->value = NULL;
+                    break;
+
+                case RP_PROPERTY_ASYMMETRIC_BINDING:
+                    rp_asymmetric_binding_free((rp_asymmetric_binding_t *)property->value, env);
+                    property->value = NULL;
+                    break;
+
+                case RP_PROPERTY_TRANSPORT_BINDING:
+                    rp_transport_binding_free((rp_transport_binding_t *)property-> value, env);
+                    property->value = NULL;
+                    break;
+
+                case RP_PROPERTY_SIGNED_SUPPORTING_TOKEN:
+                    rp_supporting_tokens_free((rp_supporting_tokens_t *)property-> value, env);
+                    property->value = NULL;
+                    break;
+
+                case RP_PROPERTY_SIGNED_ENDORSING_SUPPORTING_TOKEN:
+                    rp_supporting_tokens_free((rp_supporting_tokens_t *)property-> value, env);
+                    property->value = NULL;
+                    break;
+
+                case RP_PROPERTY_SUPPORTING_SUPPORTING_TOKEN:
+                    rp_supporting_tokens_free((rp_supporting_tokens_t *)property-> value, env);
+                    property->value = NULL;
+                    break;
+
+                case RP_PROPERTY_ENDORSING_SUPPORTING_TOKEN:
+                    rp_supporting_tokens_free((rp_supporting_tokens_t *)property-> value, env);
+                    property->value = NULL;
+                    break;
+
+                case RP_PROPERTY_SUPPORTING_TOKEN:
+                    rp_supporting_tokens_free((rp_supporting_tokens_t *)property-> value, env);
+                    property->value = NULL;
+                    break;
+
+                case RP_PROPERTY_WSS10:
+                    rp_wss10_free((rp_wss10_t *)property->value, env);
+                    property->value = NULL;
+                    break;
+
+                case RP_PROPERTY_WSS11:
+                    rp_wss11_free((rp_wss11_t *)property->value, env);
+                    property->value = NULL;
+                    break;
 
-            case RP_PROPERTY_UNKNOWN:
-                break;
+                case RP_PROPERTY_UNKNOWN:
+                    break;
             }
         }
         AXIS2_FREE(env->allocator, property);
@@ -195,68 +184,61 @@
 
     property->type = type;
 
-    if (type == RP_PROPERTY_X509_TOKEN)
+    if(type == RP_PROPERTY_X509_TOKEN)
     {
-        rp_x509_token_increment_ref((rp_x509_token_t *) value, env);
+        rp_x509_token_increment_ref((rp_x509_token_t *)value, env);
     }
-    else if (type == RP_PROPERTY_SECURITY_CONTEXT_TOKEN)
+    else if(type == RP_PROPERTY_SECURITY_CONTEXT_TOKEN)
     {
         rp_security_context_token_increment_ref((rp_security_context_token_t *)value, env);
     }
-    else if (type == RP_PROPERTY_WSS10)
+    else if(type == RP_PROPERTY_WSS10)
     {
-        rp_wss10_increment_ref((rp_wss10_t *) value, env);
+        rp_wss10_increment_ref((rp_wss10_t *)value, env);
     }
-    else if (type == RP_PROPERTY_WSS11)
+    else if(type == RP_PROPERTY_WSS11)
     {
-        rp_wss11_increment_ref((rp_wss11_t *) value, env);
+        rp_wss11_increment_ref((rp_wss11_t *)value, env);
     }
-    else if (type == RP_PROPERTY_USERNAME_TOKEN)
+    else if(type == RP_PROPERTY_USERNAME_TOKEN)
     {
-        rp_username_token_increment_ref((rp_username_token_t *) value, env);
+        rp_username_token_increment_ref((rp_username_token_t *)value, env);
     }
 
-    else if (type == RP_PROPERTY_HTTPS_TOKEN)
+    else if(type == RP_PROPERTY_HTTPS_TOKEN)
     {
-       rp_https_token_increment_ref((rp_https_token_t *) value, env);
-    }    
+        rp_https_token_increment_ref((rp_https_token_t *)value, env);
+    }
 
-    else if (type == RP_PROPERTY_SIGNED_SUPPORTING_TOKEN)
+    else if(type == RP_PROPERTY_SIGNED_SUPPORTING_TOKEN)
     {
-        rp_supporting_tokens_increment_ref((rp_supporting_tokens_t *) value,
-                                           env);
+        rp_supporting_tokens_increment_ref((rp_supporting_tokens_t *)value, env);
     }
-    else if (type == RP_PROPERTY_SUPPORTING_SUPPORTING_TOKEN)
+    else if(type == RP_PROPERTY_SUPPORTING_SUPPORTING_TOKEN)
     {
-        rp_supporting_tokens_increment_ref((rp_supporting_tokens_t *) value,
-                                           env);
+        rp_supporting_tokens_increment_ref((rp_supporting_tokens_t *)value, env);
     }
-    else if (type == RP_PROPERTY_SIGNED_ENDORSING_SUPPORTING_TOKEN)
+    else if(type == RP_PROPERTY_SIGNED_ENDORSING_SUPPORTING_TOKEN)
     {
-        rp_supporting_tokens_increment_ref((rp_supporting_tokens_t *) value,
-                                           env);
+        rp_supporting_tokens_increment_ref((rp_supporting_tokens_t *)value, env);
     }
-    else if (type == RP_PROPERTY_ENDORSING_SUPPORTING_TOKEN)
+    else if(type == RP_PROPERTY_ENDORSING_SUPPORTING_TOKEN)
     {
-        rp_supporting_tokens_increment_ref((rp_supporting_tokens_t *) value,
-                                           env);
+        rp_supporting_tokens_increment_ref((rp_supporting_tokens_t *)value, env);
     }
-    else if (type == RP_PROPERTY_ASYMMETRIC_BINDING)
+    else if(type == RP_PROPERTY_ASYMMETRIC_BINDING)
     {
-        rp_asymmetric_binding_increment_ref((rp_asymmetric_binding_t *) value,
-                                            env);
+        rp_asymmetric_binding_increment_ref((rp_asymmetric_binding_t *)value, env);
     }
-    else if (type == RP_PROPERTY_TRANSPORT_BINDING)
+    else if(type == RP_PROPERTY_TRANSPORT_BINDING)
     {
-        rp_transport_binding_increment_ref((rp_transport_binding_t *) value,
-                                           env);
+        rp_transport_binding_increment_ref((rp_transport_binding_t *)value, env);
     }
-    else if (type == RP_PROPERTY_SYMMETRIC_BINDING)
+    else if(type == RP_PROPERTY_SYMMETRIC_BINDING)
     {
-        rp_symmetric_binding_increment_ref((rp_symmetric_binding_t *) value,
-                                           env);
+        rp_symmetric_binding_increment_ref((rp_symmetric_binding_t *)value, env);
     }
-    property->value = (void *) value;
+    property->value = (void *)value;
 
     return AXIS2_SUCCESS;
 

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/model/rampart_config.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/model/rampart_config.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/rampart_config.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/rampart_config.c Tue Aug 18 10:45:16 2009
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -33,7 +32,7 @@
     axis2_char_t *receiver_certificate_file;
     axis2_char_t *certificate_file;
     axis2_char_t *private_key_file;
-	axis2_char_t *pkcs12_file;
+    axis2_char_t *pkcs12_file;
     axis2_char_t *rd_val;
     int ref;
 };
@@ -46,11 +45,10 @@
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    rampart_config = (rp_rampart_config_t *) AXIS2_MALLOC(env->allocator,
-                                                          sizeof
-                                                          (rp_rampart_config_t));
+    rampart_config = (rp_rampart_config_t *)AXIS2_MALLOC(env->allocator,
+        sizeof(rp_rampart_config_t));
 
-    if (rampart_config == NULL)
+    if(rampart_config == NULL)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -68,7 +66,7 @@
     rampart_config->time_to_live = NULL;
     rampart_config->clock_skew_buffer = NULL;
     rampart_config->need_millisecond_precision = NULL;
-	rampart_config->pkcs12_file = NULL;
+    rampart_config->pkcs12_file = NULL;
     rampart_config->rd_val = NULL;
     rampart_config->ref = 0;
 
@@ -82,9 +80,9 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    if (rampart_config)
+    if(rampart_config)
     {
-        if (--(rampart_config->ref) > 0)
+        if(--(rampart_config->ref) > 0)
         {
             return;
         }
@@ -388,30 +386,30 @@
 
 AXIS2_EXTERN axis2_char_t *AXIS2_CALL
 rp_rampart_config_get_pkcs12_file(
-	rp_rampart_config_t * rampart_config,
-	const axutil_env_t * env)
+    rp_rampart_config_t * rampart_config,
+    const axutil_env_t * env)
 {
-	return rampart_config->pkcs12_file;
+    return rampart_config->pkcs12_file;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 rp_rampart_config_set_pkcs12_file(
-	rp_rampart_config_t * rampart_config,
-	const axutil_env_t *env,
-	axis2_char_t * pkcs12_file)
-{
-	if(rampart_config)
-	{
-		if(pkcs12_file)
-		{
-			rampart_config->pkcs12_file = pkcs12_file;
-			return AXIS2_SUCCESS;
-		}
+    rp_rampart_config_t * rampart_config,
+    const axutil_env_t *env,
+    axis2_char_t * pkcs12_file)
+{
+    if(rampart_config)
+    {
+        if(pkcs12_file)
+        {
+            rampart_config->pkcs12_file = pkcs12_file;
+            return AXIS2_SUCCESS;
+        }
 
-		return AXIS2_FAILURE;
-	}
+        return AXIS2_FAILURE;
+    }
 
-	return AXIS2_FAILURE;
+    return AXIS2_FAILURE;
 }
 
 AXIS2_EXTERN axis2_char_t *AXIS2_CALL

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/model/saml_token.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/model/saml_token.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/saml_token.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/saml_token.c Tue Aug 18 10:45:16 2009
@@ -31,22 +31,22 @@
     const axutil_env_t *env)
 {
     rp_saml_token_t * saml_token;
-    
+
     saml_token = (rp_saml_token_t*)AXIS2_MALLOC(env->allocator, sizeof(rp_saml_token_t));
-    
-    if (saml_token == NULL)
+
+    if(saml_token == NULL)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
-    
+
     saml_token->inclusion = NULL;
     saml_token->derivedkeys = AXIS2_FALSE;
     saml_token->require_key_identifier_reference = AXIS2_FALSE;
     saml_token->token_version_and_type = NULL;
     saml_token->ref = 0;
-    
-    return saml_token;    
+
+    return saml_token;
 }
 
 AXIS2_EXTERN void AXIS2_CALL
@@ -60,52 +60,52 @@
         {
             return;
         }
-        
+
         AXIS2_FREE(env->allocator, saml_token);
         saml_token = NULL;
     }
-    
+
     return;
 }
 
 AXIS2_EXTERN axis2_char_t * AXIS2_CALL
 rp_saml_token_get_inclusion(
-        rp_saml_token_t *saml_token,
-        const axutil_env_t *env)
+    rp_saml_token_t *saml_token,
+    const axutil_env_t *env)
 {
     return saml_token->inclusion;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 rp_saml_token_set_inclusion(
-        rp_saml_token_t *saml_token,
-        const axutil_env_t *env,
-        axis2_char_t * inclusion)
+    rp_saml_token_t *saml_token,
+    const axutil_env_t *env,
+    axis2_char_t * inclusion)
 {
     AXIS2_PARAM_CHECK(env->error, inclusion, AXIS2_FAILURE);
     saml_token->inclusion = inclusion;
-    
+
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
 rp_saml_token_get_derivedkeys(
-		rp_saml_token_t *saml_token,
-		const axutil_env_t *env)
+    rp_saml_token_t *saml_token,
+    const axutil_env_t *env)
 {
-	return saml_token->derivedkeys;
+    return saml_token->derivedkeys;
 }
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 rp_saml_token_set_derivedkeys(
-		rp_saml_token_t *saml_token,
-		const axutil_env_t *env,
-		axis2_bool_t derivedkeys)
-{
-	AXIS2_PARAM_CHECK(env->error, derivedkeys, AXIS2_FAILURE);
-	saml_token->derivedkeys = derivedkeys;
-	
-	return AXIS2_SUCCESS;
+    rp_saml_token_t *saml_token,
+    const axutil_env_t *env,
+    axis2_bool_t derivedkeys)
+{
+    AXIS2_PARAM_CHECK(env->error, derivedkeys, AXIS2_FAILURE);
+    saml_token->derivedkeys = derivedkeys;
+
+    return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
@@ -122,10 +122,8 @@
     const axutil_env_t * env,
     axis2_bool_t require_key_identifier_reference)
 {
-    AXIS2_PARAM_CHECK(env->error, require_key_identifier_reference,
-                      AXIS2_FAILURE);
-    saml_token->require_key_identifier_reference =
-        require_key_identifier_reference;
+    AXIS2_PARAM_CHECK(env->error, require_key_identifier_reference, AXIS2_FAILURE);
+    saml_token->require_key_identifier_reference = require_key_identifier_reference;
 
     return AXIS2_SUCCESS;
 }
@@ -160,4 +158,3 @@
     return AXIS2_SUCCESS;
 }
 
-

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=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/secpolicy.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/secpolicy.c Tue Aug 18 10:45:16 2009
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -45,10 +44,9 @@
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    secpolicy = (rp_secpolicy_t *) AXIS2_MALLOC(env->allocator,
-                                                sizeof(rp_secpolicy_t));
+    secpolicy = (rp_secpolicy_t *)AXIS2_MALLOC(env->allocator, sizeof(rp_secpolicy_t));
 
-    if (secpolicy == NULL)
+    if(secpolicy == NULL)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -78,14 +76,14 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    if (secpolicy)
+    if(secpolicy)
     {
-        if (secpolicy->binding)
+        if(secpolicy->binding)
         {
             rp_property_free(secpolicy->binding, env);
             secpolicy->binding = NULL;
         }
-        if (secpolicy->wss)
+        if(secpolicy->wss)
         {
             rp_property_free(secpolicy->wss, env);
             secpolicy->wss = NULL;
@@ -94,61 +92,58 @@
         {
             rp_trust10_free(secpolicy->trust10, env);
             secpolicy->trust10 = NULL;
-        }    
-        if (secpolicy->supporting_tokens)
+        }
+        if(secpolicy->supporting_tokens)
         {
             rp_supporting_tokens_free(secpolicy->supporting_tokens, env);
             secpolicy->supporting_tokens = NULL;
         }
-        if (secpolicy->signed_supporting_tokens)
+        if(secpolicy->signed_supporting_tokens)
         {
             rp_supporting_tokens_free(secpolicy->signed_supporting_tokens, env);
             secpolicy->signed_supporting_tokens = NULL;
         }
-        if (secpolicy->endorsing_supporting_tokens)
+        if(secpolicy->endorsing_supporting_tokens)
         {
-            rp_supporting_tokens_free(secpolicy->endorsing_supporting_tokens,
-                                      env);
+            rp_supporting_tokens_free(secpolicy->endorsing_supporting_tokens, env);
             secpolicy->endorsing_supporting_tokens = NULL;
         }
-        if (secpolicy->signed_endorsing_supporting_tokens)
+        if(secpolicy->signed_endorsing_supporting_tokens)
         {
-            rp_supporting_tokens_free(secpolicy->
-                                      signed_endorsing_supporting_tokens, env);
+            rp_supporting_tokens_free(secpolicy-> signed_endorsing_supporting_tokens, env);
             secpolicy->signed_endorsing_supporting_tokens = NULL;
         }
-        if (secpolicy->signed_parts)
+        if(secpolicy->signed_parts)
         {
             rp_signed_encrypted_parts_free(secpolicy->signed_parts, env);
             secpolicy->signed_parts = NULL;
         }
-        if (secpolicy->encrypted_parts)
+        if(secpolicy->encrypted_parts)
         {
             rp_signed_encrypted_parts_free(secpolicy->encrypted_parts, env);
             secpolicy->encrypted_parts = NULL;
         }
-        if (secpolicy->signed_elements)
+        if(secpolicy->signed_elements)
         {
             rp_signed_encrypted_elements_free(secpolicy->signed_elements, env);
             secpolicy->signed_elements = NULL;
         }
-        if (secpolicy->encrypted_elements)
+        if(secpolicy->encrypted_elements)
         {
-            rp_signed_encrypted_elements_free(secpolicy->encrypted_elements,
-                                              env);
+            rp_signed_encrypted_elements_free(secpolicy->encrypted_elements, env);
             secpolicy->encrypted_elements = NULL;
         }
-        if (secpolicy->signed_items)
+        if(secpolicy->signed_items)
         {
             rp_signed_encrypted_items_free(secpolicy->signed_items, env);
             secpolicy->signed_items = NULL;
         }
-        if (secpolicy->encrypted_items)
+        if(secpolicy->encrypted_items)
         {
             rp_signed_encrypted_items_free(secpolicy->encrypted_items, env);
             secpolicy->encrypted_items = NULL;
         }
-        if (secpolicy->rampart_config)
+        if(secpolicy->rampart_config)
         {
             rp_rampart_config_free(secpolicy->rampart_config, env);
             secpolicy->rampart_config = NULL;
@@ -262,12 +257,10 @@
     rp_supporting_tokens_t * signed_endorsing_supporting_tokens)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    AXIS2_PARAM_CHECK(env->error, signed_endorsing_supporting_tokens,
-                      AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK(env->error, signed_endorsing_supporting_tokens, AXIS2_FAILURE);
 
     rp_supporting_tokens_increment_ref(signed_endorsing_supporting_tokens, env);
-    secpolicy->signed_endorsing_supporting_tokens =
-        signed_endorsing_supporting_tokens;
+    secpolicy->signed_endorsing_supporting_tokens = signed_endorsing_supporting_tokens;
     return AXIS2_SUCCESS;
 }
 

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/model/security_context_token.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/model/security_context_token.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/security_context_token.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/security_context_token.c Tue Aug 18 10:45:16 2009
@@ -33,12 +33,12 @@
 {
     rp_security_context_token_t *security_context_token = NULL;
 
-    security_context_token = (rp_security_context_token_t *) 
-        AXIS2_MALLOC(env->allocator, sizeof(rp_security_context_token_t));
+    security_context_token = (rp_security_context_token_t *)AXIS2_MALLOC(env->allocator,
+        sizeof(rp_security_context_token_t));
 
     if(!security_context_token)
     {
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
             "[neethi] Security context token assertion creation failed. Insufficient memory");
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
@@ -53,7 +53,7 @@
     security_context_token->token = rp_token_create(env);
     if(!security_context_token->token)
     {
-        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, 
+        AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
             "[neethi] Security context token assertion creation failed.");
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         rp_security_context_token_free(security_context_token, env);
@@ -68,9 +68,9 @@
     rp_security_context_token_t * security_context_token,
     const axutil_env_t * env)
 {
-    if (security_context_token)
+    if(security_context_token)
     {
-        if (--(security_context_token->ref) > 0)
+        if(--(security_context_token->ref) > 0)
         {
             return;
         }
@@ -177,8 +177,8 @@
 
 AXIS2_EXTERN axis2_char_t *AXIS2_CALL
 rp_security_context_token_get_issuer(
-     rp_security_context_token_t *security_context_token, 
-     const axutil_env_t *env)
+    rp_security_context_token_t *security_context_token,
+    const axutil_env_t *env)
 {
     return rp_token_get_issuer(security_context_token->token, env);
 }
@@ -194,8 +194,8 @@
 
 AXIS2_EXTERN neethi_policy_t *AXIS2_CALL
 rp_security_context_token_get_bootstrap_policy(
-     rp_security_context_token_t *security_context_token, 
-     const axutil_env_t *env)
+    rp_security_context_token_t *security_context_token,
+    const axutil_env_t *env)
 {
     return security_context_token->bootstrap_policy;
 }
@@ -212,8 +212,8 @@
 
 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
 rp_security_context_token_get_is_secure_conversation_token(
-     rp_security_context_token_t *security_context_token, 
-     const axutil_env_t *env)
+    rp_security_context_token_t *security_context_token,
+    const axutil_env_t *env)
 {
     return security_context_token->is_secure_conversation_token;
 }

Modified: webservices/axis2/trunk/c/neethi/src/secpolicy/model/signed_encrypted_elements.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/neethi/src/secpolicy/model/signed_encrypted_elements.c?rev=805352&r1=805351&r2=805352&view=diff
==============================================================================
--- webservices/axis2/trunk/c/neethi/src/secpolicy/model/signed_encrypted_elements.c (original)
+++ webservices/axis2/trunk/c/neethi/src/secpolicy/model/signed_encrypted_elements.c Tue Aug 18 10:45:16 2009
@@ -1,4 +1,3 @@
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -35,21 +34,18 @@
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    signed_encrypted_elements =
-        (rp_signed_encrypted_elements_t *) AXIS2_MALLOC(env->allocator,
-                                                        sizeof
-                                                        (rp_signed_encrypted_elements_t));
+    signed_encrypted_elements = (rp_signed_encrypted_elements_t *)AXIS2_MALLOC(env->allocator,
+        sizeof(rp_signed_encrypted_elements_t));
 
-    if (signed_encrypted_elements == NULL)
+    if(signed_encrypted_elements == NULL)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
     signed_encrypted_elements->xpath_expressions = NULL;
 
-    signed_encrypted_elements->xpath_expressions =
-        axutil_array_list_create(env, 0);
-    if (!(signed_encrypted_elements->xpath_expressions))
+    signed_encrypted_elements->xpath_expressions = axutil_array_list_create(env, 0);
+    if(!(signed_encrypted_elements->xpath_expressions))
     {
         rp_signed_encrypted_elements_free(signed_encrypted_elements, env);
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -70,32 +66,28 @@
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    if (signed_encrypted_elements)
+    if(signed_encrypted_elements)
     {
-        if (--(signed_encrypted_elements->ref) > 0)
+        if(--(signed_encrypted_elements->ref) > 0)
         {
             return;
         }
 
-        if (signed_encrypted_elements->xpath_expressions)
+        if(signed_encrypted_elements->xpath_expressions)
         {
             int i = 0;
-            for (i = 0;
-                 i <
-                 axutil_array_list_size(signed_encrypted_elements->
-                                        xpath_expressions, env); i++)
+            for(i = 0; i < axutil_array_list_size(signed_encrypted_elements-> xpath_expressions,
+                env); i++)
             {
                 axis2_char_t *expression = NULL;
-                expression = (axis2_char_t *)
-                    axutil_array_list_get(signed_encrypted_elements->
-                                          xpath_expressions, env, i);
-                if (expression)
+                expression = (axis2_char_t *)axutil_array_list_get(
+                    signed_encrypted_elements-> xpath_expressions, env, i);
+                if(expression)
                     AXIS2_FREE(env->allocator, expression);
 
                 expression = NULL;
             }
-            axutil_array_list_free(signed_encrypted_elements->xpath_expressions,
-                                   env);
+            axutil_array_list_free(signed_encrypted_elements->xpath_expressions, env);
             signed_encrypted_elements->xpath_expressions = NULL;
 
         }
@@ -149,8 +141,7 @@
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, expression, AXIS2_FAILURE);
 
-    axutil_array_list_add(signed_encrypted_elements->xpath_expressions, env,
-                          expression);
+    axutil_array_list_add(signed_encrypted_elements->xpath_expressions, env, expression);
     return AXIS2_SUCCESS;
 }
 



Mime
View raw message