You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by pi...@apache.org on 2007/09/06 12:49:17 UTC

svn commit: r573215 [5/22] - in /webservices/rampart/tags/c/0.90: ./ build/ build/linux/ build/win32/ include/ samples/ samples/authn_provider/ samples/callback/ samples/callback/htpasswd_callback/ samples/client/ samples/client/sec_echo/ samples/clien...

Added: webservices/rampart/tags/c/0.90/include/rampart_context.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/rampart_context.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/rampart_context.h (added)
+++ webservices/rampart/tags/c/0.90/include/rampart_context.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,497 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef RAMPART_CONTEXT_H
+#define RAMPART_CONTEXT_H
+
+/** @defgroup rampart_context
+ * @ingroup rampart_context
+ * @{
+ */
+
+#include <rp_includes.h>
+#include <rp_secpolicy.h>
+#include <rampart_authn_provider.h>
+#include <rampart_util.h>
+#include <axutil_property.h>
+#include <rampart_constants.h>
+#include <rampart_callback.h>
+#include <rampart_authn_provider.h>
+#include <axis2_key_type.h>
+#include <axis2_msg_ctx.h>
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    typedef axis2_char_t *(AXIS2_CALL*
+                           password_callback_fn)(const axutil_env_t *env,
+                                                 const axis2_char_t *username,
+                                                 void *ctx);
+
+    typedef axis2_status_t (AXIS2_CALL*
+                            rampart_is_replayed_fn)(const axutil_env_t *env,
+                                            axis2_msg_ctx_t* msg_ctx);
+
+    typedef rampart_authn_provider_status_t (AXIS2_CALL*
+            auth_password_func)(const axutil_env_t* env,
+                                const axis2_char_t *username,
+                                const axis2_char_t *password);
+
+    typedef rampart_authn_provider_status_t (AXIS2_CALL*
+            auth_digest_func)(const axutil_env_t* env,
+                              const axis2_char_t *username,
+                              const axis2_char_t *nonce,
+                              const axis2_char_t *created,
+                              const char *digest);
+
+    typedef struct rampart_context_t rampart_context_t;
+
+
+    /**
+    * Create a rampart_context.rampart_context is the wrapper
+    * of secpolicy and the main configuration for rampart.
+    * @env pointer to environment struct
+    * @return ramaprt_context_t* on successful creation.Else NULL; 
+    */
+
+    AXIS2_EXTERN rampart_context_t *AXIS2_CALL
+    rampart_context_create(const axutil_env_t *env);
+
+
+    /**
+    * Frees a rampart_context.
+    * @rampart_context the rampart_context
+    * @env pointer to environment struct
+    * @return AXIS2_SUCCESS on success else AXIS2_FAILURE. 
+    */
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_free(rampart_context_t *rampart_context,
+                         const axutil_env_t *env);
+
+
+    /****************************************************************/
+
+    /**
+    * Sets the policy node which is an om_node containing policy.This om_node
+    * can be build outside rampart. 
+    * @rampart_context the rampart_context
+    * @env pointer to environment struct
+    * @policy_node is an axiom_node.
+    * @return AXIS2_SUCCESS on success else AXIS2_FAILURE. 
+    */
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_set_policy_node(rampart_context_t *rampart_context,
+                                    const axutil_env_t *env,
+                                    axiom_node_t *policy_node);
+
+    /**
+    * Sets private key of sender as a buffer.This can be
+    * set from outside rampart.  
+    * @rampart_context the rampart_context
+    * @env pointer to environment struct
+    * @prv_key is a void buffer.
+    * @return AXIS2_SUCCESS on success else AXIS2_FAILURE. 
+    */
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_set_prv_key(rampart_context_t *rampart_context,
+                                const axutil_env_t *env,
+                                void *prv_key);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_set_prv_key_type(rampart_context_t *rampart_context,
+                                     const axutil_env_t *env,
+                                     axis2_key_type_t type);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_set_certificate(rampart_context_t *rampart_context,
+                                    const axutil_env_t *env,
+                                    void *certificate);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_set_certificate_type(rampart_context_t *rampart_context,
+                                         const axutil_env_t *env,
+                                         axis2_key_type_t type);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_set_receiver_certificate(rampart_context_t *rampart_context,
+            const axutil_env_t *env,
+            void *receiver_certificate);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_set_receiver_certificate_type(rampart_context_t *rampart_context,
+            const axutil_env_t *env,
+            axis2_key_type_t type);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_set_user(rampart_context_t *rampart_context,
+                             const axutil_env_t *env,
+                             axis2_char_t *user);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_set_password(rampart_context_t *rampart_context,
+                                 const axutil_env_t *env,
+                                 axis2_char_t *password);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_set_prv_key_password(rampart_context_t *rampart_context,
+                                         const axutil_env_t *env,
+                                         axis2_char_t *prv_key_password);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_set_pwcb_function(rampart_context_t *rampart_context,
+                                      const axutil_env_t *env,
+                                      password_callback_fn pwcb_function,
+                                      void *ctx);
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_set_replay_detect_function(rampart_context_t *rampart_context,
+                                  const axutil_env_t *env,
+                                  rampart_is_replayed_fn is_replayed_function);
+
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_set_password_type(rampart_context_t *rampart_context,
+                                      const axutil_env_t *env,
+                                      axis2_char_t *password_type);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_set_ttl(rampart_context_t *rampart_context,
+                            const axutil_env_t *env,
+                            int ttl);
+
+    /**********************************************************8*/
+
+    /*Getters of the above set functions*/
+
+    AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+    rampart_context_get_policy_node(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN void *AXIS2_CALL
+    rampart_context_get_prv_key(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_key_type_t AXIS2_CALL
+    rampart_context_get_prv_key_type(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN void *AXIS2_CALL
+    rampart_context_get_certificate(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_key_type_t AXIS2_CALL
+    rampart_context_get_certificate_type(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN void *AXIS2_CALL
+    rampart_context_get_receiver_certificate(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_key_type_t AXIS2_CALL
+    rampart_context_get_receiver_certificate_type(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rampart_context_get_user(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rampart_context_get_password(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rampart_context_get_prv_key_password(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN password_callback_fn AXIS2_CALL
+    rampart_context_get_pwcb_function(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN rampart_is_replayed_fn AXIS2_CALL
+    rampart_context_get_replay_detect_function(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+ 
+    AXIS2_EXTERN void* AXIS2_CALL
+    rampart_context_get_ctx(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN int AXIS2_CALL
+    rampart_context_get_ttl(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rampart_context_get_password_type(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    /*End of Getters */
+
+    /*Rampart specific functions */
+    AXIS2_EXTERN rp_secpolicy_t *AXIS2_CALL
+    rampart_context_get_secpolicy(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_set_secpolicy(rampart_context_t *rampart_context,
+                                  const axutil_env_t *env,
+                                  rp_secpolicy_t *secpolicy);
+
+    AXIS2_EXTERN rampart_callback_t *AXIS2_CALL
+    rampart_context_get_password_callback(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_set_password_callback(rampart_context_t *rampart_context,
+                                          const axutil_env_t *env,
+                                          rampart_callback_t *password_callback_module);
+
+    AXIS2_EXTERN auth_password_func AXIS2_CALL
+    rampart_context_get_auth_password_function(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_set_auth_password_function(rampart_context_t *rampart_context,
+            const axutil_env_t *env,
+            auth_password_func authenticate_with_password);
+
+    AXIS2_EXTERN auth_digest_func AXIS2_CALL
+    rampart_context_get_auth_digest_function(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_set_auth_digest_function(rampart_context_t *rampart_context,
+            const axutil_env_t *env,
+            auth_digest_func authenticate_with_digest);
+
+    AXIS2_EXTERN rampart_authn_provider_t *AXIS2_CALL
+    rampart_context_get_authn_provider(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_set_authn_provider(rampart_context_t *rampart_context,
+                                       const axutil_env_t *env,
+                                       rampart_authn_provider_t *authn_provider);
+
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+    rampart_context_get_require_timestamp(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+    rampart_context_get_require_ut(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN int AXIS2_CALL
+    rampart_context_get_binding_type(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+    rampart_context_is_include_timestamp(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+    rampart_context_is_include_username_token(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rampart_context_get_password_callback_class(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rampart_context_get_authn_module_name(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+    rampart_context_is_encrypt_before_sign(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_get_nodes_to_encrypt(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env,
+        axiom_soap_envelope_t *soap_envelope,
+        axutil_array_list_t *nodes_to_encrypt);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_get_nodes_to_sign(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env,
+        axiom_soap_envelope_t *soap_envelope,
+        axutil_array_list_t *nodes_to_sign);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_get_elements_to_encrypt(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env,
+        axiom_soap_envelope_t *soap_envelope,
+        axutil_array_list_t *nodes_to_encrypt);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_get_elements_to_sign(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env,
+        axiom_soap_envelope_t *soap_envelope,
+        axutil_array_list_t *nodes_to_sign);
+
+    AXIS2_EXTERN rp_property_t *AXIS2_CALL
+    rampart_context_get_token(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env,
+        axis2_bool_t for_encryption,
+        axis2_bool_t server_side);
+
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+    rampart_context_check_is_derived_keys(
+        const axutil_env_t *env,
+        rp_property_t *token);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rampart_context_get_enc_sym_algo(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rampart_context_get_enc_asym_algo(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rampart_context_get_asym_sig_algo(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rampart_context_get_digest_mtd(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rampart_context_get_encryption_user(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+    rampart_context_is_token_include(
+        rampart_context_t *rampart_context,
+        rp_property_t *token,
+        int token_type,
+        axis2_bool_t server_side,
+        const axutil_env_t *env);
+    /*
+        AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+        rampart_context_get_enc_key_identifier(
+                rampart_context_t *rampart_context,
+                rp_property_t *token,
+                axis2_bool_t server_side,
+                const axutil_env_t *env);
+    */
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rampart_context_get_key_identifier(
+        rampart_context_t *rampart_context,
+        rp_property_t *token,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+    rampart_context_is_token_type_supported(
+        int token_type,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+    rampart_context_is_key_identifier_type_supported(
+        rampart_context_t *rampart_context,
+        rp_property_t *token,
+        axis2_char_t *identifier,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rampart_context_get_layout(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+    rampart_context_check_whether_to_encrypt(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+    rampart_context_check_whether_to_sign(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_set_user_from_file(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_set_password_type_from_file(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rampart_context_get_certificate_file(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rampart_context_get_receiver_certificate_file(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rampart_context_get_private_key_file(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_context_set_ttl_from_file(
+        rampart_context_t *rampart_context,
+        const axutil_env_t *env);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif

Added: webservices/rampart/tags/c/0.90/include/rampart_credentials.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/rampart_credentials.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/rampart_credentials.h (added)
+++ webservices/rampart/tags/c/0.90/include/rampart_credentials.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,108 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef RAMPART_CREDENTIALS_H
+#define RAMPART_CREDENTIALS_H
+
+#include <axis2_defines.h>
+#include <axutil_error.h>
+#include <axutil_env.h>
+#include <axutil_utils.h>
+#include <axis2_msg_ctx.h>
+
+/**
+  * @file rampart_credentials.h
+  * @brief The credentials interface for rampart. To retrieve a username and password pair.
+  */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+    enum rampart_credentials_status{
+        RAMPART_CREDENTIALS_PW_FOUND = 0,
+        RAMPART_CREDENTIALS_PW_NOT_FOUND,
+        RAMPART_CREDENTIALS_USER_FOUND,
+        RAMPART_CREDENTIALS_USER_NOT_FOUND,
+        RAMPART_CREDENTIALS_GENERAL_ERROR
+    } rampart_credentials_status;
+
+    typedef enum rampart_credentials_status rampart_credentials_status_t;
+
+    /**
+     * Struct to get username/password pair
+     * @defgroup rampart_credentials rampart credentials
+     * @ingroup rampart_util
+     * @{
+     */
+
+    /**
+     * Type name for struct rampart_credentials_ops 
+     */
+    typedef struct rampart_credentials_ops rampart_credentials_ops_t;
+
+    /**
+     * Type name for struct rampart_credentials
+     */
+
+    typedef struct rampart_credentials rampart_credentials_t;
+
+    /**
+     */
+    struct rampart_credentials_ops
+    {
+
+        /**
+         * Implementation must provide both username and the password.
+         *
+         */
+        rampart_credentials_status_t (AXIS2_CALL*
+                                      rampart_credentials_username_get)(
+                                          rampart_credentials_t *credentials,
+                                          const axutil_env_t* env,
+                                          axis2_msg_ctx_t *msg_ctx,
+                                          axis2_char_t **username,
+                                          axis2_char_t **password
+                                      );
+
+        axis2_status_t (AXIS2_CALL*
+                        free)(rampart_credentials_t *credentials,
+                              const axutil_env_t* env);
+
+    };
+
+    struct rampart_credentials
+    {
+        rampart_credentials_ops_t *ops;
+    };
+
+    /*************************** Function macros **********************************/
+#define RAMPART_CREDENTIALS_FREE(credentials, env) \
+      ((credentials)->ops->free (credentials, env))
+
+#define RAMPART_CREDENTIALS_USERNAME_GET(credentials, env, msg_ctx, username, password) \
+      ((credentials)->ops->rampart_credentials_username_get(credentials, env, msg_ctx, username, password))
+
+
+
+    /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif                          /* RAMPART_CREDENTIALS_H */
+

Added: webservices/rampart/tags/c/0.90/include/rampart_crypto_util.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/rampart_crypto_util.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/rampart_crypto_util.h (added)
+++ webservices/rampart/tags/c/0.90/include/rampart_crypto_util.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,58 @@
+/*
+ *   Copyright 2003-2004 The Apache Software Foundation.
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ */
+
+
+#include <axutil_utils_defines.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+
+/**
+  * @file rampart_crypto_util.h
+  * @brief Crypto related utility module
+  */
+#ifndef RAMPART_CRYPTO_UTIL
+#define RAMPART_CRYPTO_UTIL
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    /**
+      * @defgroup Rampart_Crypto_Util
+      * @ingroup Rampart_Util
+      */
+
+
+    /**
+    * Calculate the hash of concatenated string of followings
+    * @param nonce
+    * @param created 
+    * @param password 
+    * @return calculated hash
+    */
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rampart_crypto_sha1(const axutil_env_t *env,
+                        const axis2_char_t *nonce,
+                        const axis2_char_t *created,
+                        const axis2_char_t *password);
+
+
+    /* @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* !RAMPART_CRYPTO_H */

Added: webservices/rampart/tags/c/0.90/include/rampart_encryption.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/rampart_encryption.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/rampart_encryption.h (added)
+++ webservices/rampart/tags/c/0.90/include/rampart_encryption.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,56 @@
+/*
+ *   Copyright 2003-2004 The Apache Software Foundation.
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ */
+
+#include <axutil_utils_defines.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axiom_soap.h>
+#include <axis2_msg_ctx.h>
+#include <oxs_asym_ctx.h>
+#include <oxs_xml_encryption.h>
+#include <rampart_context.h>
+/**
+  * @file rampart_encryption.h
+  * @brief encrypts a SOAP message 
+  */
+#ifndef RAMPART_ENCRYPTION_H
+#define RAMPART_ENCRYPTION_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    /**
+    * @param env pointer to environment struct
+    * @param msg_ctx message context
+    * @param soap_envelope the SOAP envelope
+    * @param sec_node The security element
+    * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_enc_encrypt_message(const axutil_env_t *env,
+                                axis2_msg_ctx_t *msg_ctx,
+                                rampart_context_t *rampart_context,
+                                axiom_soap_envelope_t *soap_envelope,
+                                axiom_node_t *sec_node);
+
+
+    /* @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* !RAMPART_ENCRYPTION_H */

Added: webservices/rampart/tags/c/0.90/include/rampart_engine.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/rampart_engine.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/rampart_engine.h (added)
+++ webservices/rampart/tags/c/0.90/include/rampart_engine.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef RAMPART_ENGINE_H
+#define RAMPART_ENGINE_H
+
+/** @defgroup rampart_engine
+ * @ingroup rampart_engine
+ * @{
+ */
+
+#include <rp_includes.h>
+#include <rampart_context.h>
+#include <rp_secpolicy.h>
+#include <rampart_authn_provider.h>
+#include <rampart_util.h>
+#include <axutil_property.h>
+#include <rampart_constants.h>
+#include <rampart_callback.h>
+#include <rp_policy_creator.h>
+#include <rampart_handler_util.h>
+#include <axis2_msg_ctx.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    /**
+     * Initializes the rampart engine. This will perform the configuration loading for the rampart module.
+     * @param env pointer to environment struct
+     * @param msg_ctx message context
+     * @param is_inflow if the initialization is in IN-FLOW of the message this should be set to TRUE
+     * @return a rampart context nurished with configurations.
+     */
+    AXIS2_EXTERN rampart_context_t* AXIS2_CALL
+    rampart_engine_init(const axutil_env_t *env,
+                        axis2_msg_ctx_t *msg_ctx,
+                        axis2_bool_t is_inflow);
+    /**
+     * 
+     *
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_engine_shutdown(const axutil_env_t *env,
+                            rampart_context_t *rampart_context);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif

Added: webservices/rampart/tags/c/0.90/include/rampart_handler_util.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/rampart_handler_util.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/rampart_handler_util.h (added)
+++ webservices/rampart/tags/c/0.90/include/rampart_handler_util.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,144 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#include <axis2_handler_desc.h>
+#include <axutil_array_list.h>
+#include <axiom_soap_const.h>
+#include <axiom_soap_envelope.h>
+#include <axiom_soap_header.h>
+#include <axiom_soap_header_block.h>
+#include <axis2_op.h>
+#include <axis2_msg_ctx.h>
+#include <axis2_msg_info_headers.h>
+#include <axutil_property.h>
+#include <rampart_constants.h>
+#include <rampart_util.h>
+#include <axis2_conf_ctx.h>
+
+
+#ifndef RAMPART_HANDLER_UTIL_H
+#define RAMPART_HANDLER_UTIL_H
+
+/**
+  * @file rampart_handler_util.h
+  * @brief Utilities related to handlers 
+  */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+    /**
+     * Get properties from the axis2 context
+     * @param env pointer to environment struct
+     * @param ctx axis2 context
+     * @param key the property name
+     * @return parameter
+     */
+
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    rampart_get_property_from_ctx( const axutil_env_t *env,
+                                   axis2_ctx_t *ctx,
+                                   const axis2_char_t *key);
+
+    /**
+    * Get parameter for the given parameter name
+    * @param env pointer to environment struct    
+    * @param msg_ctx message context
+    * @param parameter the parameter name
+    * @return parameter 
+    */
+
+    AXIS2_EXTERN axutil_param_t* AXIS2_CALL
+    rampart_get_security_param( const axutil_env_t *env,
+                                axis2_msg_ctx_t *msg_ctx,
+                                axis2_char_t *parameter);
+
+
+
+
+    /**
+    * Get the security token from the header block
+    * @param env pointer to environment struct
+    * @param msg_ctx message context
+    * @param soap heamsg_ctxder
+    * @return soap_header security element node
+    */
+    AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+    rampart_get_security_token(const axutil_env_t *env,
+                               axis2_msg_ctx_t *msg_ctx,
+                               axiom_soap_header_t *soap_header);
+
+    /**
+    * Creates a SOAP envelope based on params described below
+    * @param env pointer to environment struct
+    * @param sub_code the text of the Subcode element of a SOAP fault message
+    * @param reason_text the text in soapenv:Reason element
+    * @param detail_node_text the text in the soapenv:Detail element
+    * @param msg_ctx the msg_ctx 
+    * @return soap_header security element node
+    */
+    AXIS2_EXTERN void AXIS2_CALL
+    rampart_create_fault_envelope(const axutil_env_t *env,
+                                  const axis2_char_t *sub_code,
+                                  const axis2_char_t *reason_text,
+                                  const axis2_char_t *detail_node_text,
+                                  axis2_msg_ctx_t *msg_ctx);
+
+    /**
+     * Validates a security header elements 
+     * @param env pointer to environment struct  
+     * @param msg_ctx the msg_ctx 
+     * @param  sec_node the reference to the security node
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_validate_security_token(const axutil_env_t *env,
+                                    axis2_msg_ctx_t *msg_ctx,
+                                    axiom_node_t *sec_node);
+    /**
+     * Get rampart configurations from the message context
+     * @param env pointer to environment struct
+     * @param msg_ctx message context
+     * @param param_name name of the parameter of the configuration
+     * @return the loaded configuration params
+     */
+    AXIS2_EXTERN void *AXIS2_CALL
+    rampart_get_rampart_configuration(const axutil_env_t *env,
+                                      axis2_msg_ctx_t *msg_ctx,
+                                      axis2_char_t *param_name);
+    /**
+     * Check wether rampart is engaged or not
+     * @param env pointer to environment struct
+     * @param msg_ctx message context
+     * @return if engaged returns AXIS2_TRUE, else returns AXIS2_FALSE
+     */
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+    rampart_is_rampart_engaged(const axutil_env_t *env,
+                               axis2_msg_ctx_t *msg_ctx);
+
+
+
+    /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /*RAMPART_HANDLER_UTIL_H*/

Added: webservices/rampart/tags/c/0.90/include/rampart_mod.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/rampart_mod.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/rampart_mod.h (added)
+++ webservices/rampart/tags/c/0.90/include/rampart_mod.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef RAMPART_MOD_H
+#define RAMPART_MOD_H
+
+/**
+ * @file rampart_mod.h
+ * @brief Axis2 rampart module interface
+ */
+
+#include <axis2_handler.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    /**
+     * Creates In handler
+     * @param env pointer to environment struct
+     * @param qname 
+     * @return Created In handler
+     */
+    AXIS2_EXTERN axis2_handler_t* AXIS2_CALL
+    rampart_in_handler_create(const axutil_env_t *env,
+                              axutil_string_t *name);
+
+    /**
+     * Creates Out handler
+     * @param env pointer to environment struct
+     * @param qname 
+     * @return Created Out handler
+     */
+    AXIS2_EXTERN axis2_handler_t* AXIS2_CALL
+    rampart_out_handler_create(const axutil_env_t *env,
+                               axutil_string_t *name);
+
+    /** @} */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* AXIS2_ADDR_MOD_H */

Added: webservices/rampart/tags/c/0.90/include/rampart_rd_record.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/rampart_rd_record.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/rampart_rd_record.h (added)
+++ webservices/rampart/tags/c/0.90/include/rampart_rd_record.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef RAMPART_RD_RECORD_H
+#define RAMPART_RD_RECORD_H
+
+/** @defgroup rampart_context
+ * @ingroup rampart_context
+ * @{
+ */
+
+#include <rampart_util.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+ typedef struct rampart_rd_record_t rampart_rd_record_t;
+/*Create function*/
+AXIS2_EXTERN rampart_rd_record_t *AXIS2_CALL
+rampart_rd_record_create(const axutil_env_t *env);
+
+/*Free*/
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+rampart_rd_record_free(rampart_rd_record_t *rd_record,
+                  const axutil_env_t *env);
+
+
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+rampart_rd_record_get_id(
+    const rampart_rd_record_t *rd_record,
+    const axutil_env_t *env);
+
+AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+rampart_rd_record_get_timestamp(
+    const rampart_rd_record_t *rd_record,
+    const axutil_env_t *env);
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+rampart_rd_record_set_id(
+    rampart_rd_record_t *rd_record,
+    const axutil_env_t *env,
+    axis2_char_t *id);
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+rampart_rd_record_set_timestamp(
+    rampart_rd_record_t *rd_record,
+    const axutil_env_t *env,
+    axis2_char_t *timestamp);
+
+AXIS2_EXTERN rampart_rd_record_t *AXIS2_CALL
+rampart_rd_record_create(const axutil_env_t *env);
+
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+rampart_rd_record_free(rampart_rd_record_t *rd_record,
+                  const axutil_env_t *env);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif

Added: webservices/rampart/tags/c/0.90/include/rampart_replay_detector.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/rampart_replay_detector.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/rampart_replay_detector.h (added)
+++ webservices/rampart/tags/c/0.90/include/rampart_replay_detector.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,103 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+#ifndef RAMPART_REPLAY_DETECTOR_H
+#define RAMPART_REPLAY_DETECTOR_H
+
+/**
+  * @file rampart_replay_detector.h
+  * @brief The replay_detector module for rampart 
+  */
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_msg_ctx.h>
+#include <axis2_conf_ctx.h>
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    /**
+     * Struct to for replay_detectors
+     * @defgroup rampart_replay_detector rampart replay_detector
+     * @ingroup rampart_util
+     * @{
+     */
+
+    /**
+     * Type name for struct rampart_replay_detector_ops 
+     */
+    typedef struct rampart_replay_detector_ops rampart_replay_detector_ops_t;
+
+    /**
+     * Type name for struct rampart_replay_detector
+     */
+
+    typedef struct rampart_replay_detector rampart_replay_detector_t;
+
+    /**
+     * Only operation get_password is to get the password
+     * User should provide a function pointer to this
+     */
+    struct rampart_replay_detector_ops
+    {
+        axis2_status_t (AXIS2_CALL*
+                       load)(rampart_replay_detector_t *replay_detector,
+                                          const axutil_env_t *env);
+
+        axis2_status_t (AXIS2_CALL*
+                        is_replayed)(rampart_replay_detector_t *rrd,
+                              const axutil_env_t* env,
+                              axis2_msg_ctx_t *msg_ctx);
+
+        axis2_status_t (AXIS2_CALL*
+                        free)(rampart_replay_detector_t *rrd,
+                              const axutil_env_t* env);
+
+    };
+
+    struct rampart_replay_detector
+    {
+        rampart_replay_detector_ops_t *ops;
+    };
+
+    /*The default impl for RRD*/
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_replay_detector_default(const axutil_env_t *env,
+                                axis2_msg_ctx_t* msg_ctx);
+
+    AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
+    rampart_replay_detector_set_default_db(const axutil_env_t *env,
+            axis2_ctx_t *ctx);
+
+    /*************************** Function macros **********************************/
+#define RAMPART_REPLAY_DETECTOR_LOAD(replay_detector, env) \
+      ((replay_detector)->ops->load(replay_detector, env))
+
+#define RAMPART_REPLAY_DETECTOR_IS_REPLAYED(replay_detector, env, msg_ctx) \
+      ((replay_detector)->ops->replay_detector_is_replayed(replay_detector, env, msg_ctx))
+
+#define RAMPART_REPLAY_DETECTOR_FREE(replay_detector, env) \
+        ((replay_detector)->ops->free(replay_detector, env))
+
+    /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif                          /* RAMPART_REPLAY_DETECTOR_H */
+

Added: webservices/rampart/tags/c/0.90/include/rampart_sec_header_builder.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/rampart_sec_header_builder.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/rampart_sec_header_builder.h (added)
+++ webservices/rampart/tags/c/0.90/include/rampart_sec_header_builder.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,55 @@
+/*
+ *   Copyright 2003-2004 The Apache Software Foundation.
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ */
+
+#include <axutil_utils_defines.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axiom_soap.h>
+#include <axis2_msg_ctx.h>
+#include <rampart_context.h>
+#include <oxs_asym_ctx.h>
+#include <oxs_xml_encryption.h>
+/**
+  * @file rampart_sec_header_builder.h
+  * @brief 
+  */
+#ifndef RAMPART_SEC_HEADER_BUILDER_H
+#define RAMPART_SEC_HEADER_BUILDER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    /**
+    * Build a message depending on configurations.
+    * @param env pointer to environment struct
+    * @param msg_ctx message context
+    * @param soap_envelope the SOAP envelope
+    * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_shb_build_message(const axutil_env_t *env,
+                              axis2_msg_ctx_t *msg_ctx,
+                              rampart_context_t *context,
+                              axiom_soap_envelope_t *soap_envelope);
+
+
+    /* @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* !RAMPART_SEC_HEADER_BUILDER_H */

Added: webservices/rampart/tags/c/0.90/include/rampart_sec_header_processor.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/rampart_sec_header_processor.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/rampart_sec_header_processor.h (added)
+++ webservices/rampart/tags/c/0.90/include/rampart_sec_header_processor.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,60 @@
+/*
+ *   Copyright 2003-2004 The Apache Software Foundation.
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ */
+
+#include <axutil_utils_defines.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axiom_soap.h>
+#include <axis2_msg_ctx.h>
+#include <oxs_asym_ctx.h>
+#include <oxs_xml_encryption.h>
+#include <rampart_context.h>
+/**
+  * @file rampart_sec_header_processor.h
+  * @brief Processes a message depending on it's security related claims 
+  */
+#ifndef RAMPART_SEC_HEADER_PROCESSOR_H
+#define RAMPART_SEC_HEADER_PROCESSOR_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    /**
+    * Processes a message depending on it's security related claims.
+    * This is the main module in the infow of a message if rampart is enabled.
+    * Processing is depending on the order of tokens apear in the @sec_node
+    * Also the module will check for the InflowSecurity Settings	
+    * @param env pointer to environment struct
+    * @param msg_ctx message context
+    * @param soap_envelope the SOAP envelope
+    * @param sec_node The security element
+    * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_shp_process_message(const axutil_env_t *env,
+                                axis2_msg_ctx_t *msg_ctx,
+                                rampart_context_t *rampart_context,
+                                axiom_soap_envelope_t *soap_envelope,
+                                axiom_node_t *sec_node);
+
+
+    /* @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* !RAMPART_SEC_HEADER_PROCESSOR_H */

Added: webservices/rampart/tags/c/0.90/include/rampart_sec_processed_result.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/rampart_sec_processed_result.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/rampart_sec_processed_result.h (added)
+++ webservices/rampart/tags/c/0.90/include/rampart_sec_processed_result.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,92 @@
+/*
+ *   Copyright 2003-2004 The Apache Software Foundation.
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ */
+
+
+#include <rampart_constants.h>
+#include <axutil_utils_defines.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+
+/**
+  * @file rampart_sec_processed_result.h
+  * @brief The module to keep  the results after processing the message 
+  */
+#ifndef RAMPART_SEC_PROCESSED_RESULT
+#define RAMPART_SEC_PROCESSED_RESULT
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    /**
+      * @defgroup Rampart_Util
+      * @ingroup Rampart_Util
+      */
+    /**
+    *   Set a security processed result to the message context
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_set_security_processed_result(const axutil_env_t *env,
+                                          axis2_msg_ctx_t *msg_ctx,
+                                          axis2_char_t *key,
+                                          void *value);
+    /**
+    *   Get a security processed result from a message context.
+    *   A service  may use this method to retirieve a particular result by the key
+    *   @env the environment 
+    *   @msg_ctx the message context in which data are extracted
+    *   @key as specified in rampart_constants section SPR
+    *
+    */
+    AXIS2_EXTERN void *AXIS2_CALL
+    rampart_get_security_processed_result(const axutil_env_t *env,
+                                          axis2_msg_ctx_t *msg_ctx,
+                                          axis2_char_t *key);
+
+    /**
+    *   Set a security processed result property to the message context
+    *   @env the environment 
+    *   @msg_ctx the message context in which data are extracted
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_set_security_processed_results_property(const axutil_env_t *env,
+            axis2_msg_ctx_t *msg_ctx);
+
+    /**
+    *   Get the complete set of security processed results
+    *   @env the environment 
+    *   @msg_ctx the message context in which data are extracted
+    */
+    AXIS2_EXTERN axutil_hash_t* AXIS2_CALL
+    rampart_get_all_security_processed_results(const axutil_env_t *env,
+            axis2_msg_ctx_t *msg_ctx);
+
+    /**
+     * Prints all ke/val pairs in the security processed results
+     *   @env the environment 
+     *   @msg_ctx the message context in which data are extracted
+     *
+     */
+    AXIS2_EXTERN void AXIS2_CALL
+    rampart_print_security_processed_results_set(const axutil_env_t *env,
+            axis2_msg_ctx_t *msg_ctx);
+
+    /* @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* !RAMPART_SEC_PROCESSED_RESULT */

Added: webservices/rampart/tags/c/0.90/include/rampart_signature.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/rampart_signature.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/rampart_signature.h (added)
+++ webservices/rampart/tags/c/0.90/include/rampart_signature.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,48 @@
+/*
+ *   Copyright 2003-2004 The Apache Software Foundation.
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ */
+
+#include <axutil_utils_defines.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axiom_soap.h>
+#include <axis2_msg_ctx.h>
+#include <rampart_context.h>
+/**
+  * @file rampart_signature.h
+  * @brief sign a SOAP message 
+  */
+#ifndef RAMPART_SIGNATURE_H
+#define RAMPART_SIGNATURE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_sig_sign_message(const axutil_env_t *env,
+                             axis2_msg_ctx_t *msg_ctx,
+                             rampart_context_t *rampart_context,
+                             axiom_soap_envelope_t *soap_envelope,
+                             axiom_node_t *sec_node);
+
+
+
+    /* @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* !RAMPART_SIGNATURE_H */

Added: webservices/rampart/tags/c/0.90/include/rampart_timestamp_token.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/rampart_timestamp_token.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/rampart_timestamp_token.h (added)
+++ webservices/rampart/tags/c/0.90/include/rampart_timestamp_token.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef RAMPART_TIMESTAMP_TOKEN_H
+#define RAMPART_TIMESTAMP_TOKEN_H
+
+/**
+  * @file rampart_timestamp.h
+  * @brief Timestamp token 
+  */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#define RAMPART_TIMESTAMP_TOKEN_DEFAULT_TIME_TO_LIVE 300
+
+#include <axutil_env.h>
+#include <rampart_constants.h>
+
+    /**
+     * Builds timestamp token.
+     * @param env pointer to environment struct
+     * @param ctx axis2 context
+     * @param sec_node security node
+     * @param sec_ns_obj Security namespace object
+     * @param ttl Time to live. The time difference btwn Created and Expired
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+     */
+
+    axis2_status_t AXIS2_CALL
+    rampart_timestamp_token_build(
+        const axutil_env_t *env,
+        axiom_node_t *sec_node,
+        const  axiom_namespace_t *sec_ns_obj,
+        int ttl);
+    /**
+     * Validates time stamp token. Validation is based in expiration time of the
+     * Expired element.
+     * @param env pointer to environment struct
+     * @param ts_node Timestamp node
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+    */
+    axis2_status_t AXIS2_CALL
+    rampart_timestamp_token_validate(
+        const axutil_env_t *env,
+        axis2_msg_ctx_t *msg_ctx,
+        axiom_node_t *ts_node );
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /*RAMPART_TIMESTAMP_TOKEN_H*/

Added: webservices/rampart/tags/c/0.90/include/rampart_token_builder.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/rampart_token_builder.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/rampart_token_builder.h (added)
+++ webservices/rampart/tags/c/0.90/include/rampart_token_builder.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,124 @@
+/*
+ *   Copyright 2003-2004 The Apache Software Foundation.
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ */
+
+
+
+#include <axutil_utils_defines.h>
+#include <axis2_defines.h>
+#include <axutil_date_time.h>
+#include <axutil_env.h>
+#include <axutil_property.h>
+#include <axis2_msg_ctx.h>
+#include <rampart_authn_provider.h>
+#include <rampart_credentials.h>
+#include <rampart_callback.h>
+#include <oxs_x509_cert.h>
+/**
+  * @file rampart_token_builder.h
+  * @brief Reference Token builfing/of rampart
+  */
+#ifndef RAMPART_TOKEN_BUILDER_H
+#define RAMPART_TOKEN_BUILDER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    typedef enum {
+        RTBP_UNKNOWN = 0,
+        RTBP_EMBEDDED,
+        RTBP_KEY_IDENTIFIER,
+        RTBP_X509DATA_ISSUER_SERIAL,
+        RTBP_X509DATA_X509CERTIFICATE
+    } rampart_token_build_pattern_t;
+
+    /**
+     * Build a SecurityTokenReference element according to the pattern specified in @pattern.
+     * The token will be attached to the node @parent and relavent data will be extracted from 
+     * certificate @cert.
+     * Note that this method will internally call other token building methods specified in this header
+     * depending on the @pattern. 
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_token_build_security_token_reference(const axutil_env_t *env,
+            axiom_node_t *parent,
+            oxs_x509_cert_t *cert,
+            rampart_token_build_pattern_t pattern);
+
+    /**
+     * Build an Embedded token with data available in the certificate.
+     *        <SecurityTokenReference>
+     *            <Embedded>
+     *                <BinarySecurityToken>UYISDjsdaousdWEqswOIUsd</BinarySecurityToken>
+     *            </Embedded>
+     *        </SecurityTokenReference>
+     */
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_token_build_embedded(const axutil_env_t *env,
+                                 axiom_node_t *parent,
+                                 oxs_x509_cert_t *cert);
+    /**
+     * Build a KeyIndentifer token with data available in the certificate.
+     *        <SecurityTokenReference>
+     *            <KeyIdentifier>WEqswOIUsd</KeyIdentifier>
+     *        </SecurityTokenReference>
+     * 
+     */
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_token_build_key_identifier(const axutil_env_t *env,
+                                       axiom_node_t *parent,
+                                       oxs_x509_cert_t *cert);
+
+    /**
+     * Build an X509IssuerSerial token with data available in the certificate.
+     *        <SecurityTokenReference>
+     *            <x509Data>
+     *                <X509IssuerSerial>
+     *                    <X509IssuerName>C=US, O=VeriSign, Inc.,</X509IssuerName>
+     *                    <X509SerialNumber>93243297328</X509SerialNumber>
+     *                </X509IssuerSerial>
+     *            </x509Data>
+     *        </SecurityTokenReference>
+     */
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_token_build_x509_data_x509_certificate(const axutil_env_t *env,
+            axiom_node_t *parent,
+            oxs_x509_cert_t *cert);
+    /*
+     * Build an X509Certificate token with data available in the certificate.
+     *        <SecurityTokenReference>
+     *          <ds:X509Data>
+     *              <ds:X509Certificate>
+     *                  MIICzjCCAjegAwIBAgIJANyD+jwekxGuMA......
+     *              </ds:X509Certificate>
+     *          <ds:X509Data>
+     *          </SecurityTokenReference>
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_token_build_x509_data_issuer_serial(const axutil_env_t *env,
+            axiom_node_t *parent,
+            oxs_x509_cert_t *cert);
+    /* @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* !RAMPART_TOKEN_BUILDER_H */
+
+

Added: webservices/rampart/tags/c/0.90/include/rampart_token_processor.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/rampart_token_processor.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/rampart_token_processor.h (added)
+++ webservices/rampart/tags/c/0.90/include/rampart_token_processor.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,71 @@
+/*
+ *   Copyright 2003-2004 The Apache Software Foundation.
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ */
+
+
+
+#include <axutil_utils_defines.h>
+#include <axis2_defines.h>
+#include <axutil_date_time.h>
+#include <axutil_env.h>
+#include <axutil_property.h>
+#include <axis2_msg_ctx.h>
+#include <rampart_authn_provider.h>
+#include <rampart_credentials.h>
+#include <rampart_callback.h>
+/**
+  * @file rampart_token_processor.h
+  * @brief Token processing of rampart
+  */
+#ifndef RAMPART_TOKEN_PROCESSOR_H
+#define RAMPART_TOKEN_PROCESSOR_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_token_process_security_token_reference(const axutil_env_t *env,
+            axiom_node_t *st_ref_node,
+            axiom_node_t *scope_node,/*Can be NULL for all other scenarios but the Direct Reference*/
+            oxs_x509_cert_t *cert);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_token_process_direct_ref(const axutil_env_t *env,
+                                     axiom_node_t *ref_node,
+                                     axiom_node_t *scope_node,
+                                     oxs_x509_cert_t *cert);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_token_process_embedded(const axutil_env_t *env,
+                                   axiom_node_t *embed_node,
+                                   oxs_x509_cert_t *cert);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_token_process_key_identifier(const axutil_env_t *env,
+                                         axiom_node_t *ki_node,
+                                         oxs_x509_cert_t *cert);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_token_process_x509_data(const axutil_env_t *env,
+                                    axiom_node_t *x509_data_node,
+                                    oxs_x509_cert_t *cert);
+    /* @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* !RAMPART_TOKEN_PROCESSOR_H */
+
+

Added: webservices/rampart/tags/c/0.90/include/rampart_username_token.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/rampart_username_token.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/rampart_username_token.h (added)
+++ webservices/rampart/tags/c/0.90/include/rampart_username_token.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef RAMPART_USERNAME_TOKEN_H
+#define RAMPART_USERNAME_TOKEN_H
+
+/**
+  * @file rampart_username_token.h
+  * @brief The Usernametoken
+  */
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+
+#include <axutil_env.h>
+#include <rampart_constants.h>
+#include <rampart_crypto_util.h>
+#include <rampart_context.h>
+
+
+    axis2_status_t AXIS2_CALL
+    rampart_username_token_build(
+        const axutil_env_t *env,
+        rampart_context_t *rampart_context,
+        axiom_node_t *sec_node,
+        axiom_namespace_t *sec_ns_obj);
+    /*
+     * Validates the given username token
+     * @param env pointer to environment struct
+     * @param msg_ctx axis2 message context
+     * @param soap_header SOAP Header
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+     */
+    axis2_status_t AXIS2_CALL
+    rampart_username_token_validate(
+        const axutil_env_t *env,
+        axis2_msg_ctx_t *msg_ctx,
+        axiom_node_t *ut_node,
+        rampart_context_t *rampart_context);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /*RAMPART_USERNAME_TOKEN_H*/

Added: webservices/rampart/tags/c/0.90/include/rampart_util.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/rampart_util.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/rampart_util.h (added)
+++ webservices/rampart/tags/c/0.90/include/rampart_util.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,174 @@
+/*
+ *   Copyright 2003-2004 The Apache Software Foundation.
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ */
+
+
+
+#include <axutil_utils_defines.h>
+#include <axis2_defines.h>
+#include <axutil_date_time.h>
+#include <axutil_env.h>
+#include <axutil_property.h>
+#include <axis2_msg_ctx.h>
+#include <rampart_authn_provider.h>
+#include <rampart_credentials.h>
+#include <rampart_callback.h>
+/**
+  * @file rampart_util.h
+  * @brief Utilities of rampart
+  */
+#ifndef RAMPART_UTIL_H
+#define RAMPART_UTIL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    /**
+      * @defgroup Rampart_Util
+      * @ingroup Rampart_Util
+      */
+
+
+    /**
+     * Load a DLL or .SO module
+     * @param env pointer to environment struct
+     * @param module_name name of the module to be loaded
+     * @return the loaded module
+     */
+    AXIS2_EXTERN void* AXIS2_CALL
+    rampart_load_module(const axutil_env_t *env,
+                        axis2_char_t *module_name);
+
+    /**
+     * Load the credentials module
+     * @param env pointer to environment struct
+     * @param cred_module_name name of the credentails module to be loaded
+     * @return the loaded credentails module
+     */
+    AXIS2_EXTERN rampart_credentials_t* AXIS2_CALL
+    rampart_load_credentials_module(const axutil_env_t *env,
+                                    axis2_char_t *cred_module_name);
+
+    /**
+     * Call credentials module
+     * @param env pointer to environment struct
+     * @param cred_module the credentails module
+     * @param ctx the message context
+     * @param username reference to the returned username
+     * @param password reference to the returned password
+     * @return the status of the operation
+     */
+    AXIS2_EXTERN rampart_credentials_status_t AXIS2_CALL
+    rampart_call_credentials(const axutil_env_t *env,
+                             rampart_credentials_t *cred_module,
+                             axis2_msg_ctx_t *ctx,
+                             axis2_char_t **username,
+                             axis2_char_t **password);
+
+    /**
+     * Load authentication module
+     * @param env pointer to environment struct
+     * @param auth_module_name name of the authentication module
+     * @return creatd athenticaiton module
+     */
+    AXIS2_EXTERN rampart_authn_provider_t* AXIS2_CALL
+    rampart_load_auth_module(const axutil_env_t *env,
+                             axis2_char_t *auth_module_name);
+
+    /**
+     * Call auth module
+     * @param env pointer to environment struct
+     * @param authp the authentication module
+     * @param  username the username in the UsernameToken
+     * @param  password the password in the UsernameToken
+     * @param  nonce the nonce in the UsernameToken
+     * @param  created the created time in the UsernameToken
+     * @param password_type  the type of the password. either plain text of digest
+     * @param msg_ctx the message context
+     */
+    AXIS2_EXTERN rampart_authn_provider_status_t AXIS2_CALL
+    rampart_authenticate_un_pw(const axutil_env_t *env,
+                               rampart_authn_provider_t *authp,
+                               const axis2_char_t *username,
+                               const axis2_char_t *password,
+                               const axis2_char_t *nonce,/*Can be NULL if plain text*/
+                               const axis2_char_t *created,/*Can be NULL if plain text*/
+                               const axis2_char_t *password_type,
+                               axis2_msg_ctx_t *msg_ctx);
+
+    /**
+     * Load the password callback module
+     * @param env pointer to environment struct
+     * @callback_module_name the name of the callback module
+     * @return the loaded callback module
+     */
+    AXIS2_EXTERN rampart_callback_t* AXIS2_CALL
+    rampart_load_pwcb_module(const axutil_env_t *env,
+                             axis2_char_t *callback_module_name);
+
+    /**
+       *@env the environment
+       *@callback_module_name the file name of the callback module (.so or .DLL)
+       *@username the name of the user to get the password
+       *@ctx The axis2 context
+       *@return the password for the user or NULL if failed
+       */
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    rampart_callback_password(const axutil_env_t *env,
+                              rampart_callback_t *callback_module,
+                              const axis2_char_t *username);
+
+    /**
+      * Generates the nonce. Nonce is a base64 encoded random string.
+      * @param env pointer to environment struct
+      * @return generated nonce
+      */
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rampart_generate_nonce(const axutil_env_t *env);
+
+    /**
+      * Generates the nonce. Nonce is a base64 encoded random string.
+      * @param ttl Time to live. The time difference between created and expired in mili seconds.
+      * @return generated nonce
+      **/
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    rampart_generate_time(const axutil_env_t *env, int ttl);
+
+    /**
+     * Check if @dt1 < @dt2. if not returns a false
+     * @param env pointer to environment struct
+     * @param dt1 date time 1
+     * @param dt2 date time 2
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_compare_date_time(const axutil_env_t *env, axis2_char_t *dt1, axis2_char_t *dt2);
+
+    /**
+     * Print or log information (Only use for debugging)
+     * @param env pointer to environment struct
+     * @param info the information to be printed
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rampart_print_info(const axutil_env_t *env, axis2_char_t* info);
+
+    /* @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* !RAMPART_UTIL_H */
+
+

Added: webservices/rampart/tags/c/0.90/include/rp_algorithmsuite.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/rp_algorithmsuite.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/rp_algorithmsuite.h (added)
+++ webservices/rampart/tags/c/0.90/include/rp_algorithmsuite.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,175 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef RP_ALGORITHMSUITE_H
+#define RP_ALGORITHMSUITE_H
+
+/** @defgroup rp_algoruthmsuite
+ * @ingroup rp_algorithmsuite
+ * @{
+ */
+
+#include <rp_includes.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    typedef struct rp_algorithmsuite_t rp_algorithmsuite_t;
+
+    AXIS2_EXTERN rp_algorithmsuite_t *AXIS2_CALL
+    rp_algorithmsuite_create(const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_algorithmsuite_free(rp_algorithmsuite_t *algorithmsuite,
+                           const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rp_algorithmsuite_get_algosuite_string(rp_algorithmsuite_t *algorithmsuite,
+                                           const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_algorithmsuite_set_algosuite(rp_algorithmsuite_t *algorithmsuite,
+                                    const axutil_env_t *env,
+                                    axis2_char_t *algosuite_string);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rp_algorithmsuite_get_symmetric_signature(rp_algorithmsuite_t *algorithmsuite,
+            const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_algorithmsuite_set_symmetric_signature(rp_algorithmsuite_t *algorithmsuite,
+            const axutil_env_t *env,
+            axis2_char_t *symmetric_signature);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rp_algorithmsuite_get_asymmetric_signature(rp_algorithmsuite_t *algorithmsuite,
+            const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_algorithmsuite_set_asymmetric_signature(rp_algorithmsuite_t *algorithmsuite,
+            const axutil_env_t *env,
+            axis2_char_t *asymmetric_signature);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rp_algorithmsuite_get_computed_key(rp_algorithmsuite_t *algorithmsuite,
+                                       const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_algorithmsuite_set_computed_key(rp_algorithmsuite_t *algorithmsuite,
+                                       const axutil_env_t *env,
+                                       axis2_char_t *computed_key);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rp_algorithmsuite_get_digest(rp_algorithmsuite_t *algorithmsuite,
+                                 const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rp_algorithmsuite_get_encryption(rp_algorithmsuite_t *algorithmsuite,
+                                     const axutil_env_t *env);
+
+    AXIS2_EXTERN int AXIS2_CALL
+    rp_algorithmsuite_get_max_symmetric_keylength(rp_algorithmsuite_t *algorithmsuite,
+            const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_algorithmsuite_set_max_symmetric_keylength(rp_algorithmsuite_t *algorithmsuite,
+            const axutil_env_t *env,
+            int max_symmetric_keylength);
+
+    AXIS2_EXTERN int AXIS2_CALL
+    rp_algorithmsuite_get_min_symmetric_keylength(rp_algorithmsuite_t *algorithmsuite,
+            const axutil_env_t *env);
+
+    AXIS2_EXTERN int AXIS2_CALL
+    rp_algorithmsuite_get_max_asymmetric_keylength(rp_algorithmsuite_t *algorithmsuite,
+            const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_algorithmsuite_set_max_asymmetric_keylength(rp_algorithmsuite_t *algorithmsuite,
+            const axutil_env_t *env,
+            int max_asymmetric_keylength);
+
+    AXIS2_EXTERN int AXIS2_CALL
+    rp_algorithmsuite_get_min_asymmetric_keylength(rp_algorithmsuite_t *algorithmsuite,
+            const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_algorithmsuite_set_min_asymmetric_keylength(rp_algorithmsuite_t *algorithmsuite,
+            const axutil_env_t *env,
+            int min_asymmetric_keylength);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rp_algorithmsuite_get_symmetrickeywrap(rp_algorithmsuite_t *algorithmsuite,
+                                           const axutil_env_t *env);
+
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rp_algorithmsuite_get_asymmetrickeywrap(rp_algorithmsuite_t *algorithmsuite,
+                                            const axutil_env_t *env);
+
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rp_algorithmsuite_get_signature_key_derivation(rp_algorithmsuite_t *algorithmsuite,
+            const axutil_env_t *env);
+
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rp_algorithmsuite_get_encryption_key_derivation(rp_algorithmsuite_t *algorithmsuite,
+            const axutil_env_t *env);
+
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rp_algorithmsuite_get_soap_normalization(rp_algorithmsuite_t *algorithmsuite,
+            const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_algorithmsuite_set_soap_normalization(rp_algorithmsuite_t *algorithmsuite,
+            const axutil_env_t *env,
+            axis2_char_t *soap_normalization);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rp_algorithmsuite_get_str_transformation(rp_algorithmsuite_t *algorithmsuite,
+            const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_algorithmsuite_set_str_transformation(rp_algorithmsuite_t *algorithmsuite,
+            const axutil_env_t *env,
+            axis2_char_t *str_transformation);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rp_algorithmsuite_get_c14n(rp_algorithmsuite_t *algorithmsuite,
+                               const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_algorithmsuite_set_c14n(rp_algorithmsuite_t *algorithmsuite,
+                               const axutil_env_t *env,
+                               axis2_char_t *c14n);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    rp_algorithmsuite_get_xpath(rp_algorithmsuite_t *algorithmsuite,
+                                const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_algorithmsuite_set_xpath(rp_algorithmsuite_t *algorithmsuite,
+                                const axutil_env_t *env,
+                                axis2_char_t *xpath);
+
+#ifdef __cplusplus
+}
+#endif
+#endif

Added: webservices/rampart/tags/c/0.90/include/rp_algorithmsuite_builder.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/rp_algorithmsuite_builder.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/rp_algorithmsuite_builder.h (added)
+++ webservices/rampart/tags/c/0.90/include/rp_algorithmsuite_builder.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef RP_ALGORITHMSUITE_BUILDER_H
+#define RP_ALGORITHMSUITE_BUILDER_H
+
+/** @defgroup rp_algorithmsuite_builder
+ * @ingroup rp_algorithmsuite_builder
+ * @{
+ */
+
+#include <rp_includes.h>
+#include <rp_property.h>
+#include <rp_layout.h>
+#include <rp_algorithmsuite.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    AXIS2_EXTERN rp_algorithmsuite_t *AXIS2_CALL
+    rp_algorithmsuite_builder_build(
+        const axutil_env_t *env,
+        axiom_node_t *algorithmsuite);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif

Added: webservices/rampart/tags/c/0.90/include/rp_asymmetric_binding.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/rp_asymmetric_binding.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/rp_asymmetric_binding.h (added)
+++ webservices/rampart/tags/c/0.90/include/rp_asymmetric_binding.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef RP_ASYMMETRIC_BINDING_H
+#define RP_ASYMMETRIC_BINDING_H
+
+/** @defgroup rp_asymmetric_binding
+ * @ingroup rp_asymmetric_binding
+ * @{
+ */
+
+#include <rp_includes.h>
+#include <rp_symmetric_asymmetric_binding_commons.h>
+#include <rp_property.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    typedef struct rp_asymmetric_binding_t rp_asymmetric_binding_t;
+
+    AXIS2_EXTERN rp_asymmetric_binding_t *AXIS2_CALL
+    rp_asymmetric_binding_create(const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_asymmetric_binding_free(
+        rp_asymmetric_binding_t *asymmetric_binding,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN rp_symmetric_asymmetric_binding_commons_t *AXIS2_CALL
+    rp_asymmetric_binding_get_symmetric_asymmetric_binding_commons(
+        rp_asymmetric_binding_t *asymmetric_binding,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    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);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_asymmetric_binding_set_initiator_token(
+        rp_asymmetric_binding_t *asymmetric_binding,
+        const axutil_env_t *env,
+        rp_property_t *initiator_token);
+
+    AXIS2_EXTERN rp_property_t *AXIS2_CALL
+    rp_asymmetric_binding_get_initiator_token(
+        rp_asymmetric_binding_t *asymmetric_binding,
+        const axutil_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_asymmetric_binding_set_recipient_token(
+        rp_asymmetric_binding_t *asymmetric_binding,
+        const axutil_env_t *env,
+        rp_property_t *recipient_token);
+
+    AXIS2_EXTERN rp_property_t *AXIS2_CALL
+    rp_asymmetric_binding_get_recipient_token(
+        rp_asymmetric_binding_t *asymmetric_binding,
+        const axutil_env_t *env);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
+

Added: webservices/rampart/tags/c/0.90/include/rp_asymmetric_binding_builder.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/rp_asymmetric_binding_builder.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/rp_asymmetric_binding_builder.h (added)
+++ webservices/rampart/tags/c/0.90/include/rp_asymmetric_binding_builder.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef RP_ASYMMETRIC_BINDING_BUILDER_H
+#define RP_ASYMMETRIC_BINDING_BUILDER_H
+
+/** @defgroup rp_asymmetric_binding_builder
+ * @ingroup rp_asymmetric_binding_builder
+ * @{
+ */
+
+#include <rp_includes.h>
+#include <rp_property.h>
+#include <rp_asymmetric_binding.h>
+#include <rp_symmetric_asymmetric_commons_builder.h>
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    AXIS2_EXTERN rp_asymmetric_binding_t *AXIS2_CALL
+    rp_asymmetric_binding_builder_build(
+        const axutil_env_t *env,
+        axiom_node_t *asymmetric);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    rp_asymmetric_binding_builder_set_token_type(
+        const axutil_env_t *env,
+        rp_asymmetric_binding_t *asymmetric_binding,
+        axiom_node_t *node,
+        axiom_element_t *element,
+        axis2_char_t *local_name);
+
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+    rp_asymmetric_binding_builder_istoken(
+        const axutil_env_t *env,
+        axis2_char_t *local_name);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif