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 [2/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/openssl_cipher_ctx.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/openssl_cipher_ctx.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/openssl_cipher_ctx.h (added)
+++ webservices/rampart/tags/c/0.90/include/openssl_cipher_ctx.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,119 @@
+/*
+ *   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 <axis2_defines.h>
+#include <axutil_env.h>
+#include <openssl/evp.h>
+#include <oxs_key.h>
+/**
+  * @file openssl_cipher_ctx.h
+  * @brief The cipher context in which the data to be hidden
+  */
+#ifndef OPENSSL_CIPHER_CTX_H
+#define OPENSSL_CIPHER_CTX_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    /** Type name for struct openssl_cipher_ctx */
+    typedef struct openssl_cipher_ctx_t openssl_cipher_ctx_t;
+
+    /**
+     * Free function
+     * @param ctx to the openssl cipher ctx struct
+     * @param env pointer to environment struct
+     * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+     */
+    axis2_status_t AXIS2_CALL
+    openssl_cipher_ctx_free(
+        openssl_cipher_ctx_t *ctx,
+        const axutil_env_t *env);
+    /**
+     * Given the ctx return the CIPHER
+     * @param ctx to the openssl cipher ctx struct
+     * @param env pointer to environment struct
+     * @return RVP_CIPHER the cipher 
+     */
+    const EVP_CIPHER* AXIS2_CALL
+    openssl_cipher_ctx_get_cipher(
+        openssl_cipher_ctx_t *ctx,
+        const axutil_env_t *env);
+    /**
+     * Given the ctx return key
+     * @param ctx to the openssl cipher ctx struct
+     * @param env pointer to environment struct
+     * @return key 
+     */
+    oxs_key_t *AXIS2_CALL
+    openssl_cipher_ctx_get_key(
+        openssl_cipher_ctx_t *ctx,
+        const axutil_env_t *env);
+    /**
+     * Given the ctx return iv
+     * @param ctx to the openssl cipher ctx struct
+     * @param env pointer to environment struct
+     * @return iv 
+     */
+    axis2_char_t *AXIS2_CALL
+    openssl_cipher_ctx_get_iv(
+        openssl_cipher_ctx_t *ctx,
+        const axutil_env_t *env);
+    /**
+     * Given the ctx return the padding
+     * @param ctx to the openssl cipher ctx struct
+     * @param env pointer to environment struct
+     * @return padding
+     */
+    axis2_char_t *AXIS2_CALL
+    openssl_cipher_ctx_get_pad(
+        openssl_cipher_ctx_t *ctx,
+        const axutil_env_t *env);
+
+    axis2_status_t AXIS2_CALL
+    openssl_cipher_ctx_set_cipher(
+        openssl_cipher_ctx_t *ctx,
+        const axutil_env_t *env,
+        const EVP_CIPHER*);
+
+    axis2_status_t AXIS2_CALL
+    openssl_cipher_ctx_set_key(
+        openssl_cipher_ctx_t *ctx,
+        const axutil_env_t *env,
+        oxs_key_t *key);
+
+    axis2_status_t AXIS2_CALL
+    openssl_cipher_ctx_set_iv(
+        openssl_cipher_ctx_t *ctx,
+        const axutil_env_t *env,
+        axis2_char_t *iv);
+
+    axis2_status_t AXIS2_CALL
+    openssl_cipher_ctx_set_pad(
+        openssl_cipher_ctx_t *ctx,
+        const axutil_env_t *env,
+        axis2_char_t *pad);
+
+
+    /*Create function*/
+    AXIS2_EXTERN openssl_cipher_ctx_t *AXIS2_CALL
+    openssl_cipher_ctx_create(const axutil_env_t *env);
+
+    /* @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* OPENSSL_CIPHER_CTX_H */

Added: webservices/rampart/tags/c/0.90/include/openssl_cipher_property.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/openssl_cipher_property.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/openssl_cipher_property.h (added)
+++ webservices/rampart/tags/c/0.90/include/openssl_cipher_property.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,121 @@
+/*
+ *   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<openssl/evp.h>
+#include<oxs_buffer.h>
+
+/**
+  * @file openssl_cipher_property.h 
+  * @brief Bean class for cipher properties
+  */
+#ifndef OPENSSL_CIPHER_PROPERTY_H
+#define OPENSSL_CIPHER_PROPERTY_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+    /** Type name for struct  openssl_cipher_property */
+    typedef struct openssl_cipher_property_t openssl_cipher_property_t;
+
+
+    EVP_CIPHER * AXIS2_CALL
+    openssl_cipher_property_get_cipher(
+        const openssl_cipher_property_t *cprop,
+        const axutil_env_t *env);
+
+    axis2_char_t * AXIS2_CALL
+    openssl_cipher_property_get_name(
+        const openssl_cipher_property_t *cprop,
+        const axutil_env_t *env);
+
+    axis2_char_t * AXIS2_CALL
+    openssl_cipher_property_get_url(
+        const openssl_cipher_property_t *cprop,
+        const axutil_env_t *env);
+
+    int AXIS2_CALL
+    openssl_cipher_property_get_key_size(
+        const openssl_cipher_property_t *cprop,
+        const axutil_env_t *env);
+
+    int AXIS2_CALL
+    openssl_cipher_property_get_block_size(
+        const openssl_cipher_property_t *cprop,
+        const axutil_env_t *env);
+
+    int AXIS2_CALL
+    openssl_cipher_property_get_iv_size(
+        const openssl_cipher_property_t *cprop,
+        const axutil_env_t *env);
+
+    axis2_status_t AXIS2_CALL
+    openssl_cipher_property_set_cipher(
+        openssl_cipher_property_t *cprop,
+        const axutil_env_t *env,
+        EVP_CIPHER *cipher);
+
+    axis2_status_t AXIS2_CALL
+    openssl_cipher_property_set_name(
+        openssl_cipher_property_t *cprop,
+        const axutil_env_t *env,
+        axis2_char_t *name);
+
+    axis2_status_t AXIS2_CALL
+    openssl_cipher_property_set_url(
+        openssl_cipher_property_t *cprop,
+        const axutil_env_t *env,
+        axis2_char_t *name);
+
+    axis2_status_t AXIS2_CALL
+    openssl_cipher_property_set_key_size(
+        openssl_cipher_property_t *cprop,
+        const axutil_env_t *env,
+        int   key_size);
+
+
+    axis2_status_t AXIS2_CALL
+    openssl_cipher_property_set_block_size(
+        openssl_cipher_property_t *cprop,
+        const axutil_env_t *env,
+        int  block_size);
+
+    axis2_status_t AXIS2_CALL
+    openssl_cipher_property_set_iv_size(
+        openssl_cipher_property_t *cprop,
+        const axutil_env_t *env,
+        int   iv_size);
+
+    axis2_status_t AXIS2_CALL
+    openssl_cipher_property_free(openssl_cipher_property_t * cprop, const axutil_env_t *env);
+
+
+    /**
+    * Create a fresh block cipher property
+    *@return cipher_prop_ptr
+    */
+    AXIS2_EXTERN openssl_cipher_property_t *AXIS2_CALL
+    openssl_cipher_property_create(const axutil_env_t *env);
+
+
+
+    /* @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* OPENSSL_CIPHER_PROPERTY_H */

Added: webservices/rampart/tags/c/0.90/include/openssl_constants.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/openssl_constants.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/openssl_constants.h (added)
+++ webservices/rampart/tags/c/0.90/include/openssl_constants.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,54 @@
+/*
+ *   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 <axis2_util.h>
+
+/**
+  * @file 
+  * @brief 
+  */
+#ifndef OPENSSL_CONSTANTS_H
+#define OPENSSL_CONSTANTS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define OPENSSL_ENCRYPT             1
+#define OPENSSL_DECRYPT             0
+#define OPENSSL_LEAVE_UNCHANGED     -1
+
+    /**Supported Ciphers *************/
+
+#define OPENSSL_EVP_des_ede3_cbc     "EVP_des_ede3_cbc"
+#define OPENSSL_EVP_aes_128_cbc      "EVP_aes_128_cbc"
+#define OPENSSL_EVP_aes_192_cbc      "EVP_aes_192_cbc"
+#define OPENSSL_EVP_aes_256_cbc      "EVP_aes_256_cbc"
+
+#define OPENSSL_RSA_ENCRYPTION      "rsaEncryption"
+#define OPENSSL_RSA_PKCS1_PADDING    "RSA_PKCS1_PADDING"
+#define OPENSSL_RSA_PKCS1_OAEP_PADDING     "RSA_PKCS1_OAEP_PADDING"
+
+#define OPENSSL_DEFAULT_IV8          "01234567"
+#define OPENSSL_DEFAULT_IV16         "0123456701234567"
+#define OPENSSL_DEFAULT_IV24         "012345670123456701234567"
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* OPENSSL_CONSTANTS_H */

Added: webservices/rampart/tags/c/0.90/include/openssl_crypt.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/openssl_crypt.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/openssl_crypt.h (added)
+++ webservices/rampart/tags/c/0.90/include/openssl_crypt.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,64 @@
+/*
+ *   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 <openssl/evp.h>
+#include <openssl_cipher_ctx.h>
+#include <openssl_constants.h>
+#include <axis2_util.h>
+
+/**
+  * @file 
+  * @brief 
+  */
+#ifndef OPENSSL_CRYPT_H
+#define OPENSSL_CRYPT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    /** @defgroup
+     * @ingroup
+     * @{
+     */
+
+    /**
+     * Encrypt or decrypts data in the @input_buf and place the result in the @output_buf.
+     * This function works for block ciphers AES-128, AES-192, AES-256 and 3-DES
+     * The key and the cipher name must be specified in the cipher context.
+     * @env pointer to environment struct
+     * @oc_ctx  openssl block cipher context
+     * @input_buf the input buffer to en/decrypt
+     * @output_buf the output buffer to place en/decrypted result
+     * @encrypt For encryption encrypt=OPENSSL_ENCRYPT and for decryption encrypt=OPENSSL_DECRYPT
+     * @return the length of the en/decrypted result OR -1 if failed
+     */
+
+    AXIS2_EXTERN int AXIS2_CALL
+    openssl_bc_crypt(const axutil_env_t *env,
+                     openssl_cipher_ctx_t *oc_ctx,
+                     oxs_buffer_t *input_buf,
+                     oxs_buffer_t *output_buf,
+                     int encrypt);
+
+
+
+    /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* OPENSSL_CRYPT_H */

Added: webservices/rampart/tags/c/0.90/include/openssl_digest.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/openssl_digest.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/openssl_digest.h (added)
+++ webservices/rampart/tags/c/0.90/include/openssl_digest.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 <openssl/sha.h>
+
+#include <axutil_utils_defines.h>
+#include <axis2_defines.h>
+#include <axutil_env.h>
+
+/**
+  * @file openssl_digest.h
+  * @brief 
+  */
+#ifndef OPENSSL_DIGEST
+#define OPENSSL_DIGEST
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    /**
+      * @defgroup 
+      * @ingroup 
+      */
+
+
+    /**
+    * Calculate the digest of the input
+    * @return calculated digest
+    */
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    openssl_sha1(const axutil_env_t *env,
+                 axis2_char_t *input,
+                 int length);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    openssl_md5(const axutil_env_t *env,
+                axis2_char_t *input,
+                int length);
+    /* @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* OPENSSL_DIGEST */

Added: webservices/rampart/tags/c/0.90/include/openssl_pem.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/openssl_pem.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/openssl_pem.h (added)
+++ webservices/rampart/tags/c/0.90/include/openssl_pem.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,68 @@
+/*
+ *   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 <openssl/rand.h>
+#include <openssl/evp.h>
+#include <openssl/pem.h>
+#include <openssl/bio.h>
+#include <openssl/rand.h>
+#include <openssl_constants.h>
+#include <openssl_pkey.h>
+#include <axis2_util.h>
+#include <openssl/pkcs12.h>
+#include <oxs_error.h>
+/**
+  * @file openssl_x509.h 
+  * @brief Extracts information from a X509 certificate.
+  */
+#ifndef OPENSSL_PEM_H
+#define OPENSSL_PEM_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    /** @defgroup
+     * @ingroup
+     * @{
+     */
+
+    typedef enum {
+        OPENSSL_PEM_PKEY_TYPE_PRIVATE_KEY = 0,
+        OPENSSL_PEM_PKEY_TYPE_PUBLIC_KEY,
+        OPENSSL_PEM_PKEY_TYPE_UNKNOWN
+    } openssl_pem_pkey_type_t;
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    openssl_pem_buf_read_pkey(const axutil_env_t *env,
+                              axis2_char_t *b64_encoded_buf,
+                              axis2_char_t *password,
+                              openssl_pem_pkey_type_t type,
+                              EVP_PKEY **pkey);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    openssl_pem_read_pkey(const axutil_env_t *env,
+                          axis2_char_t *filename,
+                          axis2_char_t *password,
+                          openssl_pem_pkey_type_t type,
+                          EVP_PKEY **pkey);
+
+    /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* OPENSSL_PEM_H */

Added: webservices/rampart/tags/c/0.90/include/openssl_pkcs12.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/openssl_pkcs12.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/openssl_pkcs12.h (added)
+++ webservices/rampart/tags/c/0.90/include/openssl_pkcs12.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,69 @@
+/*
+ *   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 <openssl/rand.h>
+#include <openssl/evp.h>
+#include <openssl/pem.h>
+#include <openssl/bio.h>
+#include <openssl/rand.h>
+#include <openssl_constants.h>
+#include <openssl_pkey.h>
+#include <axis2_util.h>
+#include <openssl/pkcs12.h>
+
+/**
+  * @file 
+  * @brief 
+  */
+#ifndef OPENSSL_PKCS12_H
+#define OPENSSL_PKCS12_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    /** @defgroup
+     * @ingroup
+     * @{
+     */
+
+    /*Load*/
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    openssl_pkcs12_load(const axutil_env_t *env,
+                        axis2_char_t *filename,
+                        PKCS12 **p12);
+
+    /*Parse*/
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    openssl_pkcs12_parse(const axutil_env_t *env,
+                         axis2_char_t *password ,
+                         PKCS12 *p12,
+                         EVP_PKEY **prvkey,
+                         X509 **cert,
+                         STACK_OF(X509) **ca);
+
+    /*Free*/
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    openssl_pkcs12_free(const axutil_env_t *env,
+                        PKCS12 *p12);
+
+
+    /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* OPENSSL_PKCS12_H */

Added: webservices/rampart/tags/c/0.90/include/openssl_pkey.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/openssl_pkey.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/openssl_pkey.h (added)
+++ webservices/rampart/tags/c/0.90/include/openssl_pkey.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,130 @@
+/*
+ *   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 <openssl/rand.h>
+#include <openssl/evp.h>
+#include <openssl/pem.h>
+#include <openssl/bio.h>
+#include <openssl/rand.h>
+#include <openssl_constants.h>
+#include <axis2_util.h>
+
+/**
+  * @file openssl_pkey 
+  * @brief holds either a public key or a private key. 
+  * The type is determined by the type attribute
+  */
+#ifndef OPENSSL_PKEY_H
+#define OPENSSL_PKEY_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    /** @defgroup
+     * @ingroup
+     * @{
+     */
+
+#define OPENSSL_PKEY_TYPE_UNKNOWN        0
+#define OPENSSL_PKEY_TYPE_PUBLIC_KEY     1
+#define OPENSSL_PKEY_TYPE_PRIVATE_KEY    2
+
+
+    /** Type name for struct openssl_pkey */
+    typedef struct openssl_pkey_t openssl_pkey_t;
+
+
+
+    EVP_PKEY *AXIS2_CALL
+    openssl_pkey_get_key(
+        const openssl_pkey_t *pkey,
+        const axutil_env_t *env
+    );
+
+    axis2_char_t *AXIS2_CALL
+    openssl_pkey_get_name(
+        const openssl_pkey_t *pkey,
+        const axutil_env_t *env
+    );
+
+    int AXIS2_CALL
+    openssl_pkey_get_size(
+        const openssl_pkey_t *pkey,
+        const axutil_env_t *env
+    );
+
+    int AXIS2_CALL
+    openssl_pkey_get_type(
+        const openssl_pkey_t *pkey,
+        const axutil_env_t *env
+    );
+
+
+    axis2_status_t AXIS2_CALL
+    openssl_pkey_set_key(
+        openssl_pkey_t *pkey,
+        const axutil_env_t *env,
+        EVP_PKEY *key
+    );
+
+    axis2_status_t AXIS2_CALL
+    openssl_pkey_set_name(
+        openssl_pkey_t *pkey,
+        const axutil_env_t *env,
+        axis2_char_t *name
+    );
+
+    axis2_status_t AXIS2_CALL
+    openssl_pkey_set_type(
+        openssl_pkey_t *pkey,
+        const axutil_env_t *env,
+        int type
+    );
+
+    axis2_status_t AXIS2_CALL
+    openssl_pkey_load(
+        openssl_pkey_t *pkey,
+        const axutil_env_t *env,
+        axis2_char_t *filename,
+        axis2_char_t *password
+    );
+
+    axis2_status_t AXIS2_CALL
+    openssl_pkey_populate(
+        openssl_pkey_t *pkey,
+        const axutil_env_t *env,
+        EVP_PKEY *key,
+        axis2_char_t *name,
+        int type
+    );
+
+    axis2_status_t AXIS2_CALL
+    openssl_pkey_free(
+        openssl_pkey_t *pkey,
+        const axutil_env_t *env
+    );
+
+    /*Create function*/
+    AXIS2_EXTERN openssl_pkey_t *AXIS2_CALL
+    openssl_pkey_create(const axutil_env_t *env);
+
+    /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* OPENSSL_PKEY_H */

Added: webservices/rampart/tags/c/0.90/include/openssl_rsa.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/openssl_rsa.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/openssl_rsa.h (added)
+++ webservices/rampart/tags/c/0.90/include/openssl_rsa.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,117 @@
+/*
+ *   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 <openssl/rand.h>
+#include <openssl/evp.h>
+#include <openssl/pem.h>
+#include <openssl/bio.h>
+#include <openssl/rand.h>
+#include <openssl_constants.h>
+#include <openssl_pkey.h>
+#include <axis2_util.h>
+#include <oxs_buffer.h>
+
+/**
+  * @file openssl_rsa.h 
+  * @brief For RSA encryption. 
+  */
+#ifndef OPENSSL_RSA_H
+#define OPENSSL_RSA_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    /** @defgroup
+     * @ingroup
+     * @{
+     */
+
+    /**
+      * Decrypts data using a private key specified in @pkey
+      * @rsa pointer to openssl_rsa struct
+      * @env pointer to environment struct
+      * @pkey private key for decryption
+      * @in input data
+      * @out output data
+      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+      **/
+    int AXIS2_CALL
+    openssl_rsa_prv_decrypt(
+        const axutil_env_t *env,
+        const openssl_pkey_t *pkey,
+        const axis2_char_t *padding,
+        oxs_buffer_t *in,
+        oxs_buffer_t *out);
+
+    /**
+      * Encrypts data using a public key specified in @pkey
+      * @rsa pointer to openssl_rsa struct
+      * @env pointer to environment struct
+      * @pkey public key for encryption
+      * @in input data
+      * @out output data
+      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+      **/
+    int AXIS2_CALL
+    openssl_rsa_pub_encrypt(
+        const axutil_env_t *env,
+        const openssl_pkey_t *pkey,
+        const axis2_char_t *padding,
+        oxs_buffer_t *in,
+        oxs_buffer_t *out);
+
+    /**
+      * Sign data using a private key specified in @pkey
+      * @rsa pointer to openssl_rsa struct
+      * @env pointer to environment struct
+      * @pkey private key for decryption
+      * @in input data
+      * @out output data
+      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+      **/
+    int AXIS2_CALL
+    openssl_rsa_prv_encrypt(
+        const axutil_env_t *env,
+        const openssl_pkey_t *pkey,
+        const axis2_char_t *padding,
+        oxs_buffer_t *in,
+        oxs_buffer_t *out);
+
+    /**
+      * Verifies data using a public key specified in @pkey
+      * @rsa pointer to openssl_rsa struct
+      * @env pointer to environment struct
+      * @pkey public key for encryption
+      * @in input data
+      * @out output data
+      * @return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+      **/
+    int AXIS2_CALL
+    openssl_rsa_pub_decrypt(
+        const axutil_env_t *env,
+        const openssl_pkey_t *pkey,
+        const axis2_char_t *padding,
+        oxs_buffer_t *in,
+        oxs_buffer_t *out);
+
+
+    /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* OPENSSL_RSA_H */

Added: webservices/rampart/tags/c/0.90/include/openssl_sign.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/openssl_sign.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/openssl_sign.h (added)
+++ webservices/rampart/tags/c/0.90/include/openssl_sign.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,62 @@
+/*
+ *   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 <openssl/evp.h>
+#include <openssl_cipher_ctx.h>
+#include <openssl_constants.h>
+#include <oxs_sign_ctx.h>
+#include <axis2_util.h>
+
+/**
+  * @file openssl_sign.h 
+  * @brief 
+  */
+#ifndef OPENSSL_SIGN_H
+#define OPENSSL_SIGN_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    /** @defgroup
+     * @ingroup
+     * @{
+     */
+    /**
+     * Signs a content a @input_buf using the private key @prvkey
+     * The result would be placed in the @output_buf
+     */
+    AXIS2_EXTERN int AXIS2_CALL
+    openssl_sig_sign(const axutil_env_t *env,
+                     openssl_pkey_t *prvkey,
+                     oxs_buffer_t *input_buf,
+                     oxs_buffer_t *output_buf);
+    /**
+     * Verifies a signature placed in @sig_buf with 
+     * the content placed in the @input_buf 
+     * using the public key @pubkey
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    openssl_sig_verify(const axutil_env_t *env,
+                       openssl_pkey_t *pubkey,
+                       oxs_buffer_t *input_buf,
+                       oxs_buffer_t *sig_buf);
+    /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* OPENSSL_SIGN_H */

Added: webservices/rampart/tags/c/0.90/include/openssl_util.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/openssl_util.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/openssl_util.h (added)
+++ webservices/rampart/tags/c/0.90/include/openssl_util.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,51 @@
+/*
+ *   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<openssl/evp.h>
+#include<oxs_buffer.h>
+#include<openssl_cipher_property.h>
+
+/**
+  * @file openssl_util.h 
+  * @brief General utility routines for openssl related functions.
+  */
+#ifndef OPENSSL_UTIL_H
+#define OPENSSL_UTIL_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    /*Generate a random sgtring.*/
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    generate_random_data(const axutil_env_t *env, oxs_buffer_t *buffer, int size);
+
+    /*Get the cipher property for a given cipher name
+      @see openssl_cipher_property.h*/
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    openssl_populate_cipher_property(const axutil_env_t *env, openssl_cipher_property_t *cprop);
+
+    /*Get a cipher for a given name*/
+    AXIS2_EXTERN EVP_CIPHER*  AXIS2_CALL
+    openssl_get_evp_cipher_by_name(const axutil_env_t *env, axis2_char_t *cipher_name);
+
+
+    /* @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* OPENSSL_UTIL_H */

Added: webservices/rampart/tags/c/0.90/include/openssl_x509.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/openssl_x509.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/openssl_x509.h (added)
+++ webservices/rampart/tags/c/0.90/include/openssl_x509.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,123 @@
+/*
+ *   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 <openssl/rand.h>
+#include <openssl/evp.h>
+#include <openssl/pem.h>
+#include <openssl/bio.h>
+#include <openssl/rand.h>
+#include <openssl_constants.h>
+#include <openssl_pkey.h>
+#include <axis2_util.h>
+#include <openssl/pkcs12.h>
+#include <oxs_error.h>
+/**
+  * @file openssl_x509.h 
+  * @brief Extracts information from a X509 certificate.
+  */
+#ifndef OPENSSL_X509_H
+#define OPENSSL_X509_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    /** @defgroup
+     * @ingroup
+     * @{
+     */
+
+    typedef enum {
+        OPENSSL_X509_FORMAT_PEM = 0,
+        OPENSSL_X509_FORMAT_DER,
+        OPENSSL_X509_FORMAT_PKCS12
+    } openssl_x509_format_t;
+
+    typedef enum {
+        OPENSSL_X509_INFO_SUBJECT = 0,
+        OPENSSL_X509_INFO_ISSUER ,
+        OPENSSL_X509_INFO_VALID_FROM ,
+        OPENSSL_X509_INFO_VALID_TO ,
+        OPENSSL_X509_INFO_FINGER ,
+        OPENSSL_X509_INFO_SIGNATURE ,
+        OPENSSL_X509_INFO_VERSION ,
+        OPENSSL_X509_INFO_PUBKEY ,
+        OPENSSL_X509_INFO_PUBKEY_ALGO ,
+        OPENSSL_X509_INFO_DATA_CERT
+    } openssl_x509_info_type_t;
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    openssl_x509_load_from_buffer(const axutil_env_t *env,
+                                  axis2_char_t *b64_encoded_buf,
+                                  X509 **cert);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    openssl_x509_load_from_pem(const axutil_env_t *env,
+                               axis2_char_t *filename,
+                               X509 **cert);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    openssl_x509_load_from_pkcs12(const axutil_env_t *env,
+                                  axis2_char_t *filename,
+                                  axis2_char_t *password,
+                                  X509 **cert,
+                                  EVP_PKEY **pkey,
+                                  STACK_OF(X509) **ca);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    openssl_x509_load_certificate(const axutil_env_t *env,
+                                  openssl_x509_format_t format,
+                                  axis2_char_t *filename,
+                                  axis2_char_t *password,
+                                  X509 **cert);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    openssl_x509_get_cert_data(const axutil_env_t *env,
+                               X509 *cert);
+
+
+    AXIS2_EXTERN int AXIS2_CALL
+    openssl_x509_get_serial(const axutil_env_t *env,
+                            X509 *cert);
+
+    AXIS2_EXTERN unsigned long AXIS2_CALL
+    openssl_x509_get_subject_name_hash(const axutil_env_t *env,
+                                       X509 *cert);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    openssl_x509_get_pubkey(const axutil_env_t *env,
+                            X509 *cert,
+                            EVP_PKEY **pubkey);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    openssl_x509_get_subject_key_identifier(const axutil_env_t *env,
+                                            X509 *cert);
+
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    openssl_x509_get_info(const axutil_env_t *env,
+                          openssl_x509_info_type_t type,
+                          X509 *cert);
+
+    AXIS2_EXTERN void AXIS2_CALL
+    openssl_x509_print(const axutil_env_t *env,
+                       X509 *cert);
+
+    /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* OPENSSL_X509_H */

Added: webservices/rampart/tags/c/0.90/include/oxs_asym_ctx.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/oxs_asym_ctx.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/oxs_asym_ctx.h (added)
+++ webservices/rampart/tags/c/0.90/include/oxs_asym_ctx.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,272 @@
+/*
+ * 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 OXS_ASYM_CTX_H
+#define OXS_ASYM_CTX_H
+
+
+/**
+  * @file oxs_asym_ctx.h
+  * @brief Keeps information relavent for asymmetric encryption. 
+  */
+
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axiom_node.h>
+#include <oxs_x509_cert.h>
+#include <openssl_pkey.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    /** @defgroup oxs_asym_ctx Message Context
+     * @ingroup 
+     * @{
+     */
+
+    typedef enum  {
+        OXS_ASYM_CTX_FORMAT_UNKNOWN=0,
+        OXS_ASYM_CTX_FORMAT_PEM,
+        OXS_ASYM_CTX_FORMAT_PKCS12
+    }oxs_asym_ctx_format_t;
+
+    typedef enum  {
+        OXS_ASYM_CTX_OPERATION_PUB_ENCRYPT=0,
+        OXS_ASYM_CTX_OPERATION_PRV_DECRYPT,
+        OXS_ASYM_CTX_OPERATION_PUB_DECRYPT,
+        OXS_ASYM_CTX_OPERATION_PRV_ENCRYPT
+    }oxs_asym_ctx_operation_t;
+
+    typedef struct oxs_asym_ctx_t oxs_asym_ctx_t;
+
+    /*Create function*/
+    AXIS2_EXTERN oxs_asym_ctx_t *AXIS2_CALL
+    oxs_asym_ctx_create(const axutil_env_t *env);
+
+    /*Free*/
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    oxs_asym_ctx_free(oxs_asym_ctx_t *ctx,
+                      const axutil_env_t *env);
+
+
+    /**********************Getter functions******************************************/
+
+    /**
+    * Free function for the asymmetric context struct
+    *@ctx pointer to the OMXMLSec asymmetric context struct
+    *@env pointer to environment struct
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE	
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    oxs_asym_ctx_free(oxs_asym_ctx_t *ctx,
+                      const axutil_env_t *env);
+
+    /**
+    *Returns the filename. This is usually the filename of the certificate or the PKCS12 file
+    *@ctx pointer to the OMXMLSec asymmetric context struct
+    *@env pointer to environment struct
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE	
+    */
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    oxs_asym_ctx_get_file_name(const oxs_asym_ctx_t *ctx,
+                               const axutil_env_t *env);
+
+    /**
+    *@ctx pointer to the OMXMLSec asymmetric context struct
+    *@env pointer to environment struct
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE	
+    */
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    oxs_asym_ctx_get_pem_buf(const oxs_asym_ctx_t *ctx,
+                             const axutil_env_t *env);
+    /**
+    *Returns the password. Usually the password for the keystore. But alternatively may kepe the
+    *password for the private key in a PEM file.
+    *@ctx pointer to the OMXMLSec asymmetric context struct
+    *@env pointer to environment struct
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE	
+    */
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    oxs_asym_ctx_get_password(const oxs_asym_ctx_t *ctx,
+                              const axutil_env_t *env);
+
+    /**
+    *Get the format. Can be either PEM or PKCS12
+    *@ctx pointer to the OMXMLSec asymmetric context struct
+    *@env pointer to environment struct
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE	
+    */
+    AXIS2_EXTERN oxs_asym_ctx_format_t AXIS2_CALL
+    oxs_asym_ctx_get_format(const oxs_asym_ctx_t *ctx,
+                            const axutil_env_t *env);
+
+    /**
+    *Get the algorithm used to encrypt
+    *@ctx pointer to the OMXMLSec asymmetric context struct
+    *@env pointer to environment struct
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE	
+    */
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    oxs_asym_ctx_get_algorithm(const oxs_asym_ctx_t *ctx,
+                               const axutil_env_t *env);
+
+    /**
+    *Get the SecurityTokenReference pattern. For ex: IssuerSerial
+    *@ctx pointer to the OMXMLSec asymmetric context struct
+    *@env pointer to environment struct
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE	
+    */
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    oxs_asym_ctx_get_st_ref_pattern(const oxs_asym_ctx_t *ctx,
+                                    const axutil_env_t *env);
+
+    /**
+    *Get the operation. For ex: Public Key encrypt, Private Key Decrypt
+    *@ctx pointer to the OMXMLSec asymmetric context struct
+    *@env pointer to environment struct
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE	
+    */
+    AXIS2_EXTERN oxs_asym_ctx_operation_t AXIS2_CALL
+    oxs_asym_ctx_get_operation(const oxs_asym_ctx_t *ctx,
+                               const axutil_env_t *env);
+
+    /**
+    *Get the private key used
+    *@ctx pointer to the OMXMLSec asymmetric context struct
+    *@env pointer to environment struct
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE	
+    */
+    AXIS2_EXTERN openssl_pkey_t* AXIS2_CALL
+    oxs_asym_ctx_get_private_key(const oxs_asym_ctx_t *ctx,
+                                 const axutil_env_t *env);
+
+    /**
+    * Get the x509 crtificate used.
+    *@ctx pointer to the OMXMLSec asymmetric context struct
+    *@env pointer to environment struct
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE	
+    */
+    AXIS2_EXTERN oxs_x509_cert_t* AXIS2_CALL
+    oxs_asym_ctx_get_certificate(const oxs_asym_ctx_t *ctx,
+                                 const axutil_env_t *env);
+
+    /**
+    * Set the file name. May be a PKCS12 file or a X509 certificate in PEM format.
+    *@ctx pointer to the OMXMLSec asymmetric context struct
+    *@env pointer to environment struct
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE	
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    oxs_asym_ctx_set_file_name(oxs_asym_ctx_t *ctx,
+                               const axutil_env_t *env,
+                               axis2_char_t *file_name);
+    /**
+    *Set the base46 encoded certificate/key.
+    *@ctx pointer to the OMXMLSec asymmetric context struct
+    *@env pointer to environment struct
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE	
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    oxs_asym_ctx_set_pem_buf(oxs_asym_ctx_t *ctx,
+                             const axutil_env_t *env,
+                             axis2_char_t *pem_buf);
+    /**
+    * Set the password. Usually the password for the keystore. But alternatively may kepe the
+    *password for the private key in a PEM file.
+    *@ctx pointer to the OMXMLSec asymmetric context struct
+    *@env pointer to environment struct
+    *@password the password
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE	
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    oxs_asym_ctx_set_password(oxs_asym_ctx_t *ctx,
+                              const axutil_env_t *env,
+                              axis2_char_t *password);
+    /**
+    * Sets the format. Can be either PEM or PKCS12
+    *@ctx pointer to the OMXMLSec asymmetric context struct
+    *@env pointer to environment struct
+    *@format Can be either PEM or PKCS12
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE	
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    oxs_asym_ctx_set_format(oxs_asym_ctx_t *ctx,
+                            const axutil_env_t *env,
+                            oxs_asym_ctx_format_t format);
+    /**
+    * Sets the algorithm   used to encrypt
+    *@ctx pointer to the OMXMLSec asymmetric context struct
+    *@env pointer to environment struct
+    *@algorithm  used to encrypt
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE	
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    oxs_asym_ctx_set_algorithm(oxs_asym_ctx_t *ctx,
+                               const axutil_env_t *env,
+                               axis2_char_t *algorithm);
+    /**
+    * Set the SecurityTokenReference pattern. For ex: IssuerSerial
+    *@ctx pointer to the OMXMLSec asymmetric context struct
+    *@env pointer to environment struct
+    *@st_ref_pattern SecurityTokenReference pattern. For ex: IssuerSerial
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE	
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    oxs_asym_ctx_set_st_ref_pattern(oxs_asym_ctx_t *ctx,
+                                    const axutil_env_t *env,
+                                    axis2_char_t *st_ref_pattern);
+    /**
+    * Sets the operation. For ex: Public Key encrypt, Private Key Decrypt
+    *@ctx pointer to the OMXMLSec asymmetric context struct
+    *@env pointer to environment struct
+    *@operation the operation. For ex: Public Key encrypt, Private Key Decrypt
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE	
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    oxs_asym_ctx_set_operation(oxs_asym_ctx_t *ctx,
+                               const axutil_env_t *env,
+                               oxs_asym_ctx_operation_t operation);
+    /**
+    * Sets the x509 crtificate used.
+    *@ctx pointer to the OMXMLSec asymmetric context struct
+    *@env pointer to environment struct
+    *@certificate the x509 crtificate used.
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE	
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    oxs_asym_ctx_set_certificate(oxs_asym_ctx_t *ctx,
+                                 const axutil_env_t *env,
+                                 oxs_x509_cert_t *certificate);
+    /**
+    * Sets private key used
+    *@ctx pointer to the OMXMLSec asymmetric context struct
+    *@env pointer to environment struct
+    *@private_key private key used
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE	
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    oxs_asym_ctx_set_private_key(oxs_asym_ctx_t *asym_ctx,
+                                 const axutil_env_t *env,
+                                 openssl_pkey_t *private_key);
+    /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif                          /* OXS_ASYM_CTX_H */

Added: webservices/rampart/tags/c/0.90/include/oxs_axiom.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/oxs_axiom.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/oxs_axiom.h (added)
+++ webservices/rampart/tags/c/0.90/include/oxs_axiom.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,99 @@
+/*
+ * 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 OXS_AXIOM_H
+#define OXS_AXIOM_H
+
+
+/**
+  * @file oxs_axiom.h
+  * @brief Utility functions related to AXIOM. A place for common code.
+  */
+
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_util.h>
+#include <axiom_node.h>
+#include <axiom_util.h>
+#include <axiom_document.h>
+#include <axiom.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    oxs_axiom_add_attribute(const axutil_env_t *env,
+                            axiom_node_t* node,
+                            axis2_char_t* attribute_ns,
+                            axis2_char_t* attribute_ns_uri,
+                            axis2_char_t* attribute,
+                            axis2_char_t* value);
+
+    AXIS2_EXTERN int AXIS2_CALL
+    oxs_axiom_get_number_of_children_with_qname(const axutil_env_t *env,
+            axiom_node_t* parent,
+            axis2_char_t* local_name,
+            axis2_char_t* ns_uri,
+            axis2_char_t* prefix);
+
+    /**
+     * Traverse thru the node and its children. Check if the localname is equal to the given name
+     * */
+    AXIS2_EXTERN axiom_node_t* AXIS2_CALL
+    oxs_axiom_get_node_by_local_name(const axutil_env_t *env,
+                                     axiom_node_t *node,
+                                     axis2_char_t *local_name);
+
+    AXIS2_EXTERN axiom_node_t* AXIS2_CALL
+    oxs_axiom_get_node_by_id(const axutil_env_t *env,
+                             axiom_node_t *node,
+                             axis2_char_t *attr,
+                             axis2_char_t *val);
+
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    oxs_axiom_get_attribute_value_of_node_by_name(const axutil_env_t *env,
+            axiom_node_t *node,
+            axis2_char_t *attribute_name);
+
+
+    AXIS2_EXTERN axiom_node_t* AXIS2_CALL
+    oxs_axiom_get_first_child_node_by_name(const axutil_env_t *env,
+                                           axiom_node_t* parent,
+                                           axis2_char_t* local_name,
+                                           axis2_char_t* ns_uri,
+                                           axis2_char_t* prefix);
+
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    oxs_axiom_get_node_content(const axutil_env_t *env, axiom_node_t* node);
+
+
+    AXIS2_EXTERN axiom_node_t *AXIS2_CALL
+    oxs_axiom_deserialize_node(const axutil_env_t *env,  axis2_char_t* buffer);
+    /**
+    * returns 1 sucess 0 otherwise
+    */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    oxs_axiom_check_node_name(const axutil_env_t *env, axiom_node_t* node, axis2_char_t* name, axis2_char_t* ns);
+
+    /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif                          /* OXS_AXIOM_H */

Added: webservices/rampart/tags/c/0.90/include/oxs_axis2_utils.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/oxs_axis2_utils.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/oxs_axis2_utils.h (added)
+++ webservices/rampart/tags/c/0.90/include/oxs_axis2_utils.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,50 @@
+/*
+ *   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 <axis2_util.h>
+#include <oxs_buffer.h>
+
+/**
+  * @file 
+  * @brief 
+  */
+#ifndef OXS_AXIS_UTILS
+#define OXS_AXIS_UTILS
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+    /** @defgroup
+     * @ingroup
+     * @{
+     */
+#if 0
+    /*Decoded buffer will be returned*/
+    AXIS2_EXTERN oxs_buffer_ptr AXIS2_CALL  oxs_base64_decode(axutil_env_t *env,
+            oxs_buffer_ptr coded_buf);
+
+    /*Encoded input buffer will be returned*/
+    AXIS2_EXTERN oxs_buffer_ptr AXIS2_CALL  oxs_base64_encode(axutil_env_t *env,
+            oxs_buffer_ptr plain_buf);
+#endif
+
+    /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif    /* OXS_AXIS_UTILS */

Added: webservices/rampart/tags/c/0.90/include/oxs_buffer.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/oxs_buffer.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/oxs_buffer.h (added)
+++ webservices/rampart/tags/c/0.90/include/oxs_buffer.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,227 @@
+/*
+ * 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 OXS_BUFFER_H
+#define OXS_BUFFER_H
+
+
+/**
+  * @file oxs_buffer.h
+  * @brief The buffer representation in OMXMLSecurity. 
+  */
+
+#include <axis2_defines.h>
+#include <axutil_env.h>
+#include <axis2_util.h>
+#include <oxs_axiom.h>
+#include <oxs_error.h>
+#include <oxs_constants.h>
+#include <stdio.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    /** @defgroup
+     * @ingroup 
+     * @{
+     */
+
+#define OXS_BUFFER_INITIAL_SIZE 1024
+
+    /**
+    * Allocate mode for the buffer
+    * oxs_alloc_mode_exact : Minimizes the allocated memory size
+    * oxs_alloc_mode_double : Minimizes number of Malloc calls
+    */
+    typedef enum {
+        oxs_alloc_mode_exact = 0,
+        oxs_alloc_mode_double
+    } oxs_AllocMode;
+
+
+    /** Type name for struct  oxs_buffer */
+    typedef struct oxs_buffer oxs_buffer_t;
+
+    /**
+    *Free function of the buffer
+    *@buffer pointer to the OMXMLSec buffer struct
+    *@env pointer to environment struct
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+    */
+    axis2_status_t AXIS2_CALL
+    oxs_buffer_free(
+        oxs_buffer_t *buffer,
+        const axutil_env_t *env
+    );
+    /**
+    *Removes the first (size) charcters from the buffer
+    *@buffer pointer to the OMXMLSec buffer struct
+    *@env pointer to environment struct
+    *@size number of characters to be removed
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+    */
+    axis2_status_t AXIS2_CALL
+    oxs_buffer_remove_head(
+        oxs_buffer_t *buffer,
+        const axutil_env_t *env,
+        int size
+    );
+    /**
+    *Removes the last (size) charcters from the buffer
+    *@buffer pointer to the OMXMLSec buffer struct
+    *@env pointer to environment struct
+    *@size number of characters to be removed		
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+    */
+    axis2_status_t AXIS2_CALL
+    oxs_buffer_remove_tail(
+        oxs_buffer_t *buffer,
+        const axutil_env_t *env,
+        int size
+    );
+    /**
+    *populates the buffer using the @data set the @size as the useful length
+    *@buffer pointer to the OMXMLSec buffer struct
+    *@env pointer to environment struct
+    *@data the data for the buffer
+    *@size the effective length of data
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+    */
+    axis2_status_t AXIS2_CALL
+    oxs_buffer_populate(
+        oxs_buffer_t *buffer,
+        const axutil_env_t *env,
+        unsigned char *data,
+        int size
+    );
+    /**
+    *Append data (to the end)
+    *@buffer pointer to the OMXMLSec buffer struct
+    *@env pointer to environment struct
+    *@data the data for the buffer
+    *@size the effective length of data
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+    */
+    axis2_status_t AXIS2_CALL
+    oxs_buffer_append(
+        oxs_buffer_t *buffer,
+        const axutil_env_t *env,
+        unsigned char *data,
+        int size
+    );
+    /**
+    *Prepends data (to the front of the buffer)
+    *@buffer pointer to the OMXMLSec buffer struct
+    *@env pointer to environment struct
+    *@data the data for the buffer
+    *@size the effective length of data
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+    */
+    axis2_status_t AXIS2_CALL
+    oxs_buffer_prepend(
+        oxs_buffer_t *buffer,
+        const axutil_env_t *env,
+        unsigned char *data,
+        int size
+    );
+    /**
+    *Reads a file specified by @filename
+    *@buffer pointer to the OMXMLSec buffer struct
+    *@env pointer to environment struct
+    *@filename The name of the file
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+    */
+    axis2_status_t AXIS2_CALL
+    oxs_buffer_read_file(
+        oxs_buffer_t *buffer,
+        const axutil_env_t *env,
+        const axis2_char_t *filename
+    );
+    /**
+    *Sets the size
+    *@buffer pointer to the OMXMLSec buffer struct
+    *@env pointer to environment struct
+    *@size the value of the size
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+    */
+    axis2_status_t AXIS2_CALL
+    oxs_buffer_set_size(
+        oxs_buffer_t *buffer,
+        const axutil_env_t *env,
+        int size
+    );
+    /**
+    *Sets the maximum size of the buffer. Usually this will be allocated dynamically
+    *@buffer pointer to the OMXMLSec buffer struct
+    *@env pointer to environment struct
+    *@size the maximum size of the buffer
+    *@return AXIS2_SUCCESS on success, else AXIS2_FAILURE
+    */
+    axis2_status_t AXIS2_CALL
+    oxs_buffer_set_max_size(
+        oxs_buffer_t *buffer,
+        const axutil_env_t *env,
+        int size
+    );
+    /**
+    *Returns data
+    *@buffer pointer to the OMXMLSec buffer struct
+    *@env pointer to environment struct
+    *@return data in the buffer
+    */
+    unsigned char* AXIS2_CALL
+    oxs_buffer_get_data(
+        oxs_buffer_t *buffer,
+        const axutil_env_t *env
+    );
+    /**
+    *Returns the effective length of the buffer
+    *@buffer pointer to the OMXMLSec buffer struct
+    *@env pointer to environment struct
+    *@return the effective length of the buffer as int
+    */
+    int AXIS2_CALL
+    oxs_buffer_get_size(
+        oxs_buffer_t *buffer,
+        const axutil_env_t *env
+    );
+    /**
+    *Returns the maximum size of the buffer
+    *@buffer pointer to the OMXMLSec buffer struct
+    *@env pointer to environment struct
+    *@return the maximum size of the buffer
+    */
+    int AXIS2_CALL
+    oxs_buffer_get_max_size(
+        oxs_buffer_t *buffer,
+        const axutil_env_t *env
+    );
+
+
+
+    AXIS2_EXTERN oxs_buffer_t *AXIS2_CALL
+    oxs_buffer_create(const axutil_env_t *env);
+
+
+    /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif                          /* OXS_BUFFER_H */

Added: webservices/rampart/tags/c/0.90/include/oxs_c14n.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/oxs_c14n.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/oxs_c14n.h (added)
+++ webservices/rampart/tags/c/0.90/include/oxs_c14n.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,91 @@
+/*
+ * 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 OXS_C14N_H
+#define OXS_C14N_H
+
+/** @defgroup oxs_c14n c14n
+ * @ingroup oxs_c14n
+ * XML Canonicalization (XML-C14N).
+ * @{
+ */
+
+/**
+ * @file oxs_c14n.h
+ * @brief
+ */
+
+#include <axis2_const.h>
+#include <axutil_error.h>
+#include <axutil_utils_defines.h>
+#include <axutil_utils.h>
+#include <axutil_env.h>
+#include <axutil_string.h>
+#include <axiom_document.h>
+#include <axutil_array_list.h>
+#include <axutil_stream.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    oxs_c14n_apply_stream_algo(
+        const axutil_env_t *env,
+        const axiom_document_t *doc,
+        axutil_stream_t *stream,
+        const axutil_array_list_t *ns_prefixes,
+        const axiom_node_t *node,
+        const axis2_char_t* algo
+    );
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    oxs_c14n_apply_algo(
+        const axutil_env_t *env,
+        const axiom_document_t *doc,
+        axis2_char_t **outbuf,
+        const axutil_array_list_t *ns_prefixes,
+        const axiom_node_t *node,
+        const axis2_char_t *algo
+    );
+
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    oxs_c14n_apply_stream(
+        const axutil_env_t *env,
+        const axiom_document_t *doc,
+        axis2_bool_t comments,
+        axutil_stream_t *stream,
+        const axis2_bool_t exclusive,
+        const axutil_array_list_t *ns_prefixes,
+        const axiom_node_t *node
+    );
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    oxs_c14n_apply (
+        const axutil_env_t *env,
+        const axiom_document_t *doc,
+        const axis2_bool_t comments,
+        axis2_char_t **outbuf,
+        const axis2_bool_t exclusive,
+        const axutil_array_list_t *ns_prefixes,
+        const axiom_node_t *node
+    );
+
+#ifdef __cplusplus
+}
+#endif
+#endif  /* OXS_C14N_H */

Added: webservices/rampart/tags/c/0.90/include/oxs_cipher.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/oxs_cipher.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/oxs_cipher.h (added)
+++ webservices/rampart/tags/c/0.90/include/oxs_cipher.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,71 @@
+/*
+ * 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 OXS_CIPHER_H
+#define OXS_CIPHER_H
+
+
+/**
+  * @file oxs_cipher.h
+  * @brief Cipher related functions in OMXMLSecurity 
+  */
+
+#include <axis2_defines.h>
+#include <oxs_constants.h>
+#include <openssl_cipher_property.h>
+#include <axutil_env.h>
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    /**
+     * Get the cipher property  for the given url
+     * @env pointer to environment struct
+     * @url 	 the url as a string
+     * @return the property 
+     */
+    AXIS2_EXTERN openssl_cipher_property_t *AXIS2_CALL
+    oxs_get_cipher_property_for_url(const axutil_env_t *env,
+                                    axis2_char_t *url);
+
+    /**
+     * Get the cipher name for the given url
+     * @env pointer to environment struct
+     * @url 	 the url as a string
+     * @return the name as a string	
+     */
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    oxs_get_cipher_name_for_url(const axutil_env_t *env,
+                                axis2_char_t *url);
+
+    /**
+     * Get the cipher url for the given name
+     *@env pointer to environment struct
+     *@name the name as a string
+     *@return the url as a string
+     */
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    oxs_get_cipher_url_for_name(const axutil_env_t *env,
+                                axis2_char_t *name);
+
+    /** @} */
+#ifdef __cplusplus
+}
+#endif
+
+#endif                          /* OXS_CIPHER_H */

Added: webservices/rampart/tags/c/0.90/include/oxs_constants.h
URL: http://svn.apache.org/viewvc/webservices/rampart/tags/c/0.90/include/oxs_constants.h?rev=573215&view=auto
==============================================================================
--- webservices/rampart/tags/c/0.90/include/oxs_constants.h (added)
+++ webservices/rampart/tags/c/0.90/include/oxs_constants.h Thu Sep  6 03:48:44 2007
@@ -0,0 +1,351 @@
+/*
+ * 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 OXS_CONSTANTS_H
+#define OXS_CONSTANTS_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+    /*Default values*/
+    /*Key transfer algo*/
+#define OXS_DEFAULT_KT_ALGO_HREF    OXS_HREF_RSA_PKCS1
+#define OXS_DEFAULT_SYM_ALGO        OXS_HREF_AES_256_CBC
+#define OXS_STR_DEFAULT             OXS_STR_EMBEDDED
+
+
+    /****************************************************************
+       Global prefixes 
+    ****************************************************************/
+#define OXS_XENC "xenc"
+#define OXS_DS "ds"
+#define OXS_WSSE "wsse"
+#define OXS_WSSE_XMLNS "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
+#define OXS_WSU "wsu"
+    /****************************************************************
+        ID Prefixes
+    ****************************************************************/
+#define OXS_ENCDATA_ID "EncDataID"
+#define OXS_ENCKEY_ID "EncKeyID"
+#define OXS_SIG_ID "SigID"
+#define OXS_CERT_ID "CertID"
+#define OXS_EMBEDDED_ID "EmbeddedID"
+
+    /****************************************************************
+       Global namespaces 
+    ****************************************************************/
+#define OXS_DSIG_NS                "http://www.w3.org/2000/09/xmldsig#"
+#define OXS_ENC_NS                 "http://www.w3.org/2001/04/xmlenc#"
+#define OXS_WSSE_NS                "http://schemas.xmlsoap.org/ws/2002/04/secext"
+
+    /****************************************************************
+        DSig Nodes  
+    ****************************************************************/
+#define OXS_NODE_SIGNATURE         "Signature"
+#define OXS_NODE_SIGNEDINFO        "SignedInfo"
+#define OXS_NODE_CANONICALIZATION_METHOD "CanonicalizationMethod"
+#define OXS_NODE_SIGNATURE_METHOD    "SignatureMethod"
+#define OXS_NODE_SIGNATURE_VALUE     "SignatureValue"
+#define OXS_NODE_DIGEST_METHOD       "DigestMethod"
+#define OXS_NODE_DIGEST_VALUE        "DigestValue"
+#define OXS_NODE_OBJECT             "Object"
+#define OXS_NODE_MANIFEST           "Manifest"
+#define OXS_NODE_SIGNATUREPROPERTIES "SignatureProperties"
+
+    /****************************************************************
+       Encryption Nodes 
+    ****************************************************************/
+#define OXS_NODE_ENCRYPTED_DATA             "EncryptedData"
+#define OXS_NODE_ENCRYPTION_METHOD          "EncryptionMethod"
+#define OXS_NODE_ENCRYPTION_PROPERTIES      "EncryptionProperties"
+#define OXS_NODE_ENCRYPTION_PROPERTY        "EncryptionProperty"
+#define OXS_NODE_CIPHER_DATA                "CipherData"
+#define OXS_NODE_CIPHER_VALUE               "CipherValue"
+#define OXS_NODE_CIPHER_REFERENCE           "CipherReference"
+#define OXS_NODE_REFERENCE_LIST             "ReferenceList"
+#define OXS_NODE_DATA_REFERENCE             "DataReference"
+#define OXS_NODE_KEY_REFERENCE              "KeyReference"
+#define OXS_NODE_CARRIED_KEYNAME            "CarriedKeyName"
+#define OXS_TYPE_ENC_CONTENT                "http://www.w3.org/2001/04/xmlenc#Content"
+#define OXS_TYPE_ENC_ELEMENT                "http://www.w3.org/2001/04/xmlenc#Element"
+
+    /****************************************************************
+       KeyInfo Nodes
+    ****************************************************************/
+#define OXS_NODE_KEY_INFO               "KeyInfo"
+#define OXS_NODE_REFERENCE             "Reference"
+#define OXS_NODE_TRANSFORMS            "Transforms"
+#define OXS_NODE_TRANSFORM             "Transform"
+
+    /****************************************************************
+        KeyInfo Nodes
+    ****************************************************************/
+#define OXS_NODE_BINARY_SECURITY_TOKEN     "BinarySecurityToken"
+#define OXS_NODE_KEY_IDENTIFIER     "KeyIdentifier"
+#define OXS_NODE_SECURITY_TOKEN_REFRENCE    "SecurityTokenReference"
+#define OXS_NODE_EMBEDDED    "Embedded"
+
+
+    /****************************************************************
+        Attributes
+    ****************************************************************/
+#define OXS_ATTR_ID            "Id"
+#define OXS_ATTR_URI           "URI"
+#define OXS_ATTR_TYPE          "Type"
+#define OXS_ATTR_MIMETYPE      "MimeType"
+#define OXS_ATTR_ENCODING      "Encoding"
+#define OXS_ATTR_ALGORITHM     "Algorithm"
+#define OXS_ATTR_FILTER        "Filter"
+#define OXS_ATTR_RECIPIENT     "Recipient"
+#define OXS_ATTR_TARGET        "Target"
+#define OXS_ATTR_ENCODING_TYPE  "EncodingType"
+#define OXS_ATTR_VALUE_TYPE     "ValueType"
+
+
+    /****************************************************************
+       AES 
+    ****************************************************************/
+
+#define OXS_NAME_AES_128_CBC        "aes128-cbc"
+#define OXS_HREF_AES_128_CBC        "http://www.w3.org/2001/04/xmlenc#aes128-cbc"
+
+#define OXS_NAME_AES_192_CBC        "aes192-cbc"
+#define OXS_HREF_AES_192_CBC        "http://www.w3.org/2001/04/xmlenc#aes192-cbc"
+
+#define OXS_NAME_AES_256_CBC        "aes256-cbc"
+#define OXS_HREF_AES_256_CBC        "http://www.w3.org/2001/04/xmlenc#aes256-cbc"
+
+#define OXS_NAME_KW_AES_128         "kw-aes128"
+#define OXS_HREF_KW_AES_128         "http://www.w3.org/2001/04/xmlenc#kw-aes128"
+
+#define OXS_NAME_KW_AES_192         "kw-aes192"
+#define OXS_HREF_KW_AES_192         "http://www.w3.org/2001/04/xmlenc#kw-aes192"
+
+#define OXS_NAME_KW_AES_256         "kw-aes256"
+#define OXS_HREF_KW_AES_256         "http://www.w3.org/2001/04/xmlenc#kw-aes256"
+
+    /****************************************************************
+      BASE64 
+    ****************************************************************/
+#define OXS_NAME_BASE64           "base64"
+#define OXS_HREF_BASE64           "http://www.w3.org/2000/09/xmldsig#base64"
+
+
+    /****************************************************************
+     DES 
+    ****************************************************************/
+#define OXS_NAME_DES_KEY_VALUE       "des"
+
+#define OXS_NAME_DES3_CBC           "tripledes-cbc"
+#define OXS_HREF_DES3_CBC           "http://www.w3.org/2001/04/xmlenc#tripledes-cbc"
+
+#define OXS_NAME_KW_DES3            "kw-tripledes"
+#define OXS_HREF_KW_DES3            "http://www.w3.org/2001/04/xmlenc#kw-tripledes"
+
+
+
+    /****************************************************************
+        DSA 
+    ****************************************************************/
+#define OXS_NAME_DSA_KEY_VALUE          "dsa"
+#define OXS_NODE_DSA_KEY_VALUE          "DSAKeyValue"
+#define OXS_HREF_DSA_KEY_VALUE          "http://www.w3.org/2000/09/xmldsig#DSAKeyValue"
+
+#define OXS_NAME_DSA_SHA1          "dsa-sha1"
+#define OXS_HREF_DSA_SHA1          "http://www.w3.org/2000/09/xmldsig#dsa-sha1"
+
+    /****************************************************************
+       EncryptedKey
+    ****************************************************************/
+#define OXS_NAME_ENCRYPTED_KEY         "enc-key"
+#define OXS_NODE_ENCRYPTED_KEY         "EncryptedKey"
+#define OXS_HREF_ENCRYPTED_KEY         "http://www.w3.org/2001/04/xmlenc#EncryptedKey"
+
+    /****************************************************************
+       C14N
+    ****************************************************************/
+
+#define OXS_HREF_XML_C14N                   "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
+#define OXS_HREF_XML_EXC_C14N     "http://www.w3.org/2001/10/xml-exc-c14n#"
+
+#define OXS_HREF_XML_C14N_WITH_COMMENTS         "http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"
+#define OXS_HREF_XML_EXC_C14N_WITH_COMMENTS "http://www.w3.org/2001/10/xml-exc-c14n#WithComments"
+    /****************************************************************
+       Transforms
+    ****************************************************************/
+#define OXS_HREF_TRANSFORM_XML_EXC_C14N     OXS_HREF_XML_EXC_C14N
+#define OXS_HREF_TRANSFORM_STR_TRANSFORM     "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#STR-Transform"
+#define OXS_HREF_TRANSFORM_ENVELOPED_SIGNATURE "http://www.w3.org/2000/09/xmldsig#enveloped-signature"
+
+    /****************************************************************
+        KeyNAME
+    ****************************************************************/
+#define OXS_NAME_KEY_NAME          "key-name"
+#define OXS_NODE_KEY_NAME          "KeyName"
+
+
+    /****************************************************************
+        KeyValue 
+    ****************************************************************/
+#define OXS_NAME_KEY_VALUE         "key-value"
+#define OXS_NODE_KEY_VALUE         "KeyValue"
+
+
+    /****************************************************************
+        MD5 
+    ****************************************************************/
+#define OXS_NAME_MD5              "md5"
+#define OXS_HREF_MD5              "http://www.w3.org/2001/04/xmldsig-more#md5"
+
+    /****************************************************************
+        RetrievalMethod
+    ****************************************************************/
+#define OXS_NAME_RETRIEVAL_METHOD      "retrieval-method"
+#define OXS_NODE_RETRIEVAL_METHOD      "RetrievalMethod"
+
+    /****************************************************************
+        RSA 
+    ****************************************************************/
+#define OXS_NAME_RSAKEY_VALUE          "rsa"
+#define OXS_NODE_RSAKEY_VALUE          "RSAKeyValue"
+#define OXS_HREF_RSAKEY_VALUE          "http://www.w3.org/2000/09/xmldsig#RSAKeyValue"
+
+#define OXS_NAME_RSA_MD5           "rsa-md5"
+#define OXS_HREF_RSA_MD5           "http://www.w3.org/2001/04/xmldsig-more#rsa-md5"
+
+#define OXS_NAME_RSA_RIPEMD160         "rsa-ripemd160"
+#define OXS_HREF_RSA_RIPEMD160         "http://www.w3.org/2001/04/xmldsig-more#rsa-ripemd160"
+
+#define OXS_NAME_RSA_SHA1          "rsa-sha1"
+#define OXS_HREF_RSA_SHA1          "http://www.w3.org/2000/09/xmldsig#rsa-sha1"
+
+#define OXS_NAME_RSA_SHA224        "rsa-sha224"
+#define OXS_HREF_RSA_SHA224        "http://www.w3.org/2001/04/xmldsig-more#rsa-sha224"
+
+#define OXS_NAME_RSA_SHA256        "rsa-sha256"
+#define OXS_HREF_RSA_SHA256        "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
+
+#define OXS_NAME_RSA_SHA384        "rsa-sha384"
+#define OXS_HREF_RSA_SHA384        "http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"
+
+#define OXS_NAME_RSA_SHA512        "rsa-sha512"
+#define OXS_HREF_RSA_SHA512        "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"
+
+#define OXS_NAME_RSA_PKCS1         "rsa-1_5"
+#define OXS_HREF_RSA_PKCS1         "http://www.w3.org/2001/04/xmlenc#rsa-1_5"
+
+#define OXS_NAME_RSA_OAEP          "rsa-oaep-mgf1p"
+#define OXS_HREF_RSA_OAEP          "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
+#define OXS_NODE_RSA_OAEP_PARAMS        "OAEPparams"
+
+
+    /****************************************************************
+        SHA1 
+    ****************************************************************/
+#define OXS_NAME_SHA1             "sha1"
+#define OXS_HREF_SHA1             "http://www.w3.org/2000/09/xmldsig#sha1"
+
+#define OXS_NAME_SHA224           "sha224"
+#define OXS_HREF_SHA224           "http://www.w3.org/2001/04/xmldsig-more#sha224"
+
+#define OXS_NAME_SHA256           "sha256"
+#define OXS_HREF_SHA256           "http://www.w3.org/2001/04/xmlenc#sha256"
+
+#define OXS_NAME_SHA384           "sha384"
+#define OXS_HREF_SHA384           "http://www.w3.org/2001/04/xmldsig-more#sha384"
+
+#define OXS_NAME_SHA512           "sha512"
+#define OXS_HREF_SHA512           "http://www.w3.org/2001/04/xmlenc#sha512"
+
+    /****************************************************************
+        X509 
+    ****************************************************************/
+#define OXS_NAME_X509_DATA         "x509"
+#define OXS_NODE_X509_DATA         "X509Data"
+#define OXS_HREF_X509_DATA         "http://www.w3.org/2000/09/xmldsig#X509Data"
+
+#define OXS_NODE_X509_CERTIFICATE      "X509Certificate"
+#define OXS_NODE_X509_CRL          "X509CRL"
+#define OXS_NODE_X509_SUBJECT_NAME      "X509SubjectName"
+#define OXS_NODE_X509_ISSUER_SERIAL     "X509IssuerSerial"
+#define OXS_NODE_X509_ISSUER_NAME       "X509IssuerName"
+#define OXS_NODE_X509_SERIAL_NUMBER     "X509SerialNumber"
+#define OXS_NODE_X509_SKI          "X509SKI"
+
+#define OXS_NAME_RAW_X509_CERT          "raw-x509-cert"
+#define OXS_HREF_RAW_X509_CERT          "http://www.w3.org/2000/09/xmldsig#rawX509Certificate"
+
+#define OXS_NAME_X509_STORE        "x509-store"
+
+    /****************************************************************
+        SOAP 1.1/1.2
+    ****************************************************************/
+#define OXS_NODE_ENVELOPE         "Envelope"
+#define OXS_NODE_HEADER           "Header"
+#define OXS_NODE_BODY                 "Body"
+#define OXS_NODE_FAULT                "Fault"
+#define OXS_NODE_FAULT_CODE        "faultcode"
+#define OXS_NODE_FAULT_STRING              "faultstring"
+#define OXS_NODE_FAULT_ACTOR               "faultactor"
+#define OXS_NODE_FAULT_DETAIL              "detail"
+#define OXS_NODE_CODE             "Code"
+#define OXS_NODE_REASON           "Reason"
+#define OXS_NODE_NODE             "Node"
+#define OXS_NODE_ROLE             "Role"
+#define OXS_NODE_DETAIL           "Detail"
+#define OXS_NODE_VALUE            "Value"
+#define OXS_NODE_SUBCODE          "Subcode"
+#define OXS_NODE_TEXT             "Text"
+
+
+#define OXS_SOAP_FAULT_CODE_VERSION_MISMATCH     "VersionMismatch"
+#define OXS_SOAP_FAULT_CODE_MUST_UNDERSTAND      "MustUnderstand"
+#define OXS_SOAP_FAULT_CODE_CLIENT          "Client"
+#define OXS_SOAP_FAULT_CODE_SERVER          "Server"
+#define OXS_SOAP_FAULT_CODE_RECEIVER        "Receiver"
+#define OXS_SOAP_FAULT_CODE_SENDER          "Sender"
+#define OXS_SOAP_FAULT_DATA_ENCODNING_UNKNOWN    "DataEncodingUnknown"
+
+    /****************************************************************
+        Ext
+    ****************************************************************/
+#define OXS_ENCODING_BASE64BINARY "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"
+#define OXS_VALUE_X509V3 "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"
+#define OXS_X509_SUBJ_KI "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier"
+
+    /****************************************************************
+        ST References
+    ****************************************************************/
+#define OXS_STR_DIRECT_REFERENCE "DirectReference"
+#define OXS_STR_KEY_IDENTIFIER  OXS_NODE_KEY_IDENTIFIER
+#define OXS_STR_EMBEDDED        OXS_NODE_EMBEDDED
+#define OXS_STR_ISSUER_SERIAL "IssuerSerial"
+#define OXS_STR_THUMB_PRINT "ThumbPrint"
+#define OXS_STR_EXTERNAL_URI "ExternalUri"
+#define OXS_STR_ENCRYPTED_KEY "Encryptedkey"
+
+    /*************************************************************************/
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* OXS_CONSTANTS_H*/