You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ka...@apache.org on 2006/09/08 08:25:46 UTC
svn commit: r441393 - in /webservices/axis2/trunk/c/rampart:
include/openssl_cipher_ctx.h include/openssl_crypt.h src/omxmlsec/ctx.c
src/omxmlsec/enc_engine.c src/omxmlsec/openssl/cipher_ctx.c
src/omxmlsec/openssl/crypt.c src/util/rampart_action.c
Author: kaushalye
Date: Thu Sep 7 23:25:44 2006
New Revision: 441393
URL: http://svn.apache.org/viewvc?view=rev&rev=441393
Log:
Committing changes made in rampart openssl wrappers.
Modified:
webservices/axis2/trunk/c/rampart/include/openssl_cipher_ctx.h
webservices/axis2/trunk/c/rampart/include/openssl_crypt.h
webservices/axis2/trunk/c/rampart/src/omxmlsec/ctx.c
webservices/axis2/trunk/c/rampart/src/omxmlsec/enc_engine.c
webservices/axis2/trunk/c/rampart/src/omxmlsec/openssl/cipher_ctx.c
webservices/axis2/trunk/c/rampart/src/omxmlsec/openssl/crypt.c
webservices/axis2/trunk/c/rampart/src/util/rampart_action.c
Modified: webservices/axis2/trunk/c/rampart/include/openssl_cipher_ctx.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/openssl_cipher_ctx.h?view=diff&rev=441393&r1=441392&r2=441393
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/openssl_cipher_ctx.h (original)
+++ webservices/axis2/trunk/c/rampart/include/openssl_cipher_ctx.h Thu Sep 7 23:25:44 2006
@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
+#include <axis2_defines.h>
+#include <axis2_env.h>
#include<openssl/evp.h>
-#include<oxs_buffer.h>
/**
* @file
@@ -28,52 +28,106 @@
extern "C" {
#endif
-typedef struct _openssl_evp_block_cipher_ctx openssl_evp_block_cipher_ctx, *openssl_evp_block_cipher_ctx_ptr;
-struct _openssl_evp_block_cipher_ctx {
- const EVP_CIPHER* cipher;
- EVP_CIPHER_CTX cipher_ctx;
- int key_initialized;
- int ctx_initialized;
- unsigned char *key;
- unsigned char *iv;
- unsigned char *pad;
-};
+ /** Type name for struct openssl_cipher_ctx_ops */
+ typedef struct openssl_cipher_ctx_ops openssl_cipher_ctx_ops_t;
+ /** Type name for struct openssl_cipher_ctx */
+ typedef struct openssl_cipher_ctx openssl_cipher_ctx_t;
+
+
+ struct openssl_cipher_ctx_ops
+ {
+
+ axis2_status_t (AXIS2_CALL *
+ free)(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env
+ );
+
+ const EVP_CIPHER* (AXIS2_CALL *
+ get_cipher)(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env
+ );
+
+ axis2_char_t *(AXIS2_CALL *
+ get_key)(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env
+ );
+
+ axis2_char_t *(AXIS2_CALL *
+ get_iv)(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env
+ );
+
+ axis2_char_t *(AXIS2_CALL *
+ get_pad)(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env
+ );
+
+ axis2_status_t (AXIS2_CALL *
+ set_cipher)(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env,
+ const EVP_CIPHER* cipher
+ );
+
+ axis2_status_t (AXIS2_CALL *
+ set_key_value)(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env,
+ axis2_char_t *key
+ );
+
+ axis2_status_t (AXIS2_CALL *
+ set_iv)(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env,
+ axis2_char_t *iv
+ );
+
+ axis2_status_t (AXIS2_CALL *
+ set_pad)(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env,
+ axis2_char_t *pad
+ );
+
+ };
+
+ struct openssl_cipher_ctx
+ {
+ /** operations of openssl_cipher_ctx */
+ openssl_cipher_ctx_ops_t *ops;
+ };
+
+ /*Create function*/
+ AXIS2_EXTERN openssl_cipher_ctx_t *AXIS2_CALL
+ openssl_cipher_ctx_create(const axis2_env_t *env);
+
+/**********************Macros******************************************/
+#define OPENSSL_CIPHER_CTX_FREE(ctx, env)\
+ ((ctx)->ops->free(ctx, env))
+
+#define OPENSSL_CIPHER_CTX_GET_CIPHER(ctx, env)\
+ ((ctx)->ops->get_cipher(ctx, env))
+
+#define OPENSSL_CIPHER_CTX_GET_KEY(ctx, env)\
+ ((ctx)->ops->get_key(ctx, env))
+
+#define OPENSSL_CIPHER_CTX_GET_IV(ctx, env)\
+ ((ctx)->ops->get_iv(ctx, env))
+
+#define OPENSSL_CIPHER_CTX_GET_PAD(ctx, env)\
+ ((ctx)->ops->get_pad(ctx, env))
+
+#define OPENSSL_CIPHER_CTX_SET_CIPHER(ctx, env, cipher)\
+ ((ctx)->ops->set_cipher(ctx, env, cipher))
+#define OPENSSL_CIPHER_CTX_SET_IV(ctx, env, iv)\
+ ((ctx)->ops->set_iv(ctx, env, iv))
-/**
-* Create a fresh block cipher context
-*@return openssl_evp_block_cipher_ctx_ptr the created block cipher context
-*/
-AXIS2_EXTERN openssl_evp_block_cipher_ctx_ptr AXIS2_CALL
-openssl_evp_block_cipher_ctx_create(const axis2_env_t *env);
+#define OPENSSL_CIPHER_CTX_SET_KEY(ctx, env, key)\
+ ((ctx)->ops->set_key_value(ctx, env, key))
+
+#define OPENSSL_CIPHER_CTX_SET_PAD(ctx, env, pad)\
+ ((ctx)->ops->set_pad(ctx, env, pad))
-/**
-* Initialize the block cipher context for a given cipher
-*
-*@param openssl_evp_block_cipher_ctx_ptr block cipher context
-*@param in input buffer
-*@param out output buffer
-*@param encrypt 1 to encrypt 0 to decrypt
-*@param cipher_name Name of the cipher Passing NULL will use the default
-*@return openssl_evp_block_cipher_ctx_ptr initialized block cipher context
-*/
-
-AXIS2_EXTERN int AXIS2_CALL
-openssl_evp_block_cipher_ctx_init(const axis2_env_t *env,
- openssl_evp_block_cipher_ctx_ptr bc_ctx,
- int encrypt,
- const unsigned char* cipher_name
- );
-
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
-openssl_evp_block_cipher_ctx_reset(const axis2_env_t *env, openssl_evp_block_cipher_ctx_ptr bc_ctx);
-/*
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
-openssl_evp_block_cipher_ctx_free(const axis2_env_t *env, openssl_evp_block_cipher_ctx_ptr bc_ctx);
-*/
-/*TODO write the free function*/
/* @} */
Modified: webservices/axis2/trunk/c/rampart/include/openssl_crypt.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/include/openssl_crypt.h?view=diff&rev=441393&r1=441392&r2=441393
==============================================================================
--- webservices/axis2/trunk/c/rampart/include/openssl_crypt.h (original)
+++ webservices/axis2/trunk/c/rampart/include/openssl_crypt.h Thu Sep 7 23:25:44 2006
@@ -43,7 +43,8 @@
*@param do_encrypt 1 to encrypt 0 to decrypt
*@return -1 if failed
*/
-AXIS2_EXTERN int AXIS2_CALL openssl_block_cipher_crypt(const axis2_env_t *env, openssl_evp_block_cipher_ctx_ptr bc_ctx,
+AXIS2_EXTERN int AXIS2_CALL openssl_block_cipher_crypt(const axis2_env_t *env,
+ openssl_cipher_ctx_t *oc_ctx,
unsigned char *in_main_buf,
int in_main_len,
unsigned char **out_main_buf,
Modified: webservices/axis2/trunk/c/rampart/src/omxmlsec/ctx.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/omxmlsec/ctx.c?view=diff&rev=441393&r1=441392&r2=441393
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/omxmlsec/ctx.c (original)
+++ webservices/axis2/trunk/c/rampart/src/omxmlsec/ctx.c Thu Sep 7 23:25:44 2006
@@ -352,10 +352,9 @@
/*public functions*/
axis2_status_t AXIS2_CALL
-oxs_ctx_free(
- oxs_ctx_t *ctx,
- const axis2_env_t *env
- )
+oxs_ctx_free(oxs_ctx_t *ctx,
+ const axis2_env_t *env
+ )
{
oxs_ctx_impl_t * ctx_impl= NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
@@ -404,6 +403,10 @@
}
/*TODO free nodes and key*/
+
+ AXIS2_FREE(env->allocator, ctx_impl);
+ ctx_impl = NULL;
+
return AXIS2_SUCCESS;
}
Modified: webservices/axis2/trunk/c/rampart/src/omxmlsec/enc_engine.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/omxmlsec/enc_engine.c?view=diff&rev=441393&r1=441392&r2=441393
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/omxmlsec/enc_engine.c (original)
+++ webservices/axis2/trunk/c/rampart/src/omxmlsec/enc_engine.c Thu Sep 7 23:25:44 2006
@@ -394,13 +394,13 @@
oxs_buffer_ptr result)
{
unsigned char *out_main_buf = NULL;
- openssl_evp_block_cipher_ctx_ptr bc_ctx = NULL;
+ openssl_cipher_ctx_t *oc_ctx = NULL;
axis2_char_t *iv = NULL;
+ axis2_char_t *key = NULL;
axis2_char_t *cipher_name = NULL;
axis2_char_t *encoded_str=NULL;
axis2_char_t *in_data = NULL;
int ret, enclen, encodedlen, decoded_len;
- axis2_char_t *temp = NULL;
openssl_cipher_property_t *cprop = NULL;
oxs_enc_engine_impl_t *enc_engine_impl = NULL;
@@ -414,29 +414,33 @@
/*Create the context*/
- bc_ctx = openssl_evp_block_cipher_ctx_create(env);
- if(!bc_ctx){
+ oc_ctx = openssl_cipher_ctx_create(env);
+ if(!oc_ctx){
oxs_error(ERROR_LOCATION, OXS_ERROR_INVALID_DATA,
- "openssl_evp_block_cipher_ctx_create failed");
+ "openssl_cipher_ctx_create failed");
return AXIS2_FAILURE;
}
/*Get cipher property*/
cprop = oxs_get_cipher_property_for_url(env, OXS_CTX_GET_ENC_MTD_ALGORITHM(enc_ctx, env));
- /*Set the IV*/
- /*iv = OPENSSL_DEFAULT_IV16;*/ /*oxs_iv_generate_for_algo(env, enc_ctx->encmtd_algorithm); */
- iv =(axis2_char_t*)oxs_iv_generate_for_algo(env, OXS_CTX_GET_ENC_MTD_ALGORITHM(enc_ctx, env));
-
- /*Set the key*/
- temp = AXIS2_STRNDUP(OXS_KEY_GET_DATA(OXS_CTX_GET_KEY(enc_ctx, env), env), OPENSSL_CIPHER_PROPERTY_GET_KEY_SIZE(cprop, env), env);
- bc_ctx->key = AXIS2_STRNDUP(OXS_KEY_GET_DATA(OXS_CTX_GET_KEY(enc_ctx, env), env),OPENSSL_CIPHER_PROPERTY_GET_KEY_SIZE(cprop, env), env);
- bc_ctx->key_initialized = 1;
/*Set the IV*/
- bc_ctx->iv = AXIS2_STRNDUP(iv, OPENSSL_CIPHER_PROPERTY_GET_IV_SIZE(cprop, env), env);
+ iv = AXIS2_STRNDUP((axis2_char_t*)oxs_iv_generate_for_algo(env, OXS_CTX_GET_ENC_MTD_ALGORITHM(enc_ctx, env)),
+ OPENSSL_CIPHER_PROPERTY_GET_IV_SIZE(cprop, env),
+ env);
+ ret = OPENSSL_CIPHER_CTX_SET_IV(oc_ctx, env,iv);
+
+ /*Set the key*/
+ key = AXIS2_STRNDUP((axis2_char_t*)OXS_KEY_GET_DATA(OXS_CTX_GET_KEY(enc_ctx,
+ env),
+ env),
+ OPENSSL_CIPHER_PROPERTY_GET_KEY_SIZE(cprop, env),
+ env);
+
+ ret = OPENSSL_CIPHER_CTX_SET_KEY(oc_ctx, env, key);
- /*TODO: Get the cipher name */
+ /*Set the cipher*/
cipher_name = (axis2_char_t*)OPENSSL_CIPHER_PROPERTY_GET_NAME(cprop, env);
if(!cipher_name){
oxs_error(ERROR_LOCATION, OXS_ERROR_INVALID_DATA,
@@ -445,32 +449,16 @@
return AXIS2_FAILURE;
}
- /*Initialize block cipher ctx*/
- if(OXS_CTX_GET_OPERATION(enc_ctx, env) == OXS_CTX_OPERATION_ENCRYPT){
- ret = openssl_evp_block_cipher_ctx_init(env, bc_ctx,
- OPENSSL_ENCRYPT, (const unsigned char*)cipher_name);
- if(ret == AXIS2_FAILURE ){
- oxs_error(ERROR_LOCATION, OXS_ERROR_INVALID_DATA,
- "openssl_evp_block_cipher_ctx_init failed");
- }
- }else if(OXS_CTX_GET_OPERATION(enc_ctx, env) == OXS_CTX_OPERATION_DECRYPT){
- ret = openssl_evp_block_cipher_ctx_init(env, bc_ctx,
- OPENSSL_DECRYPT, (const unsigned char*)cipher_name);
- if(ret == AXIS2_FAILURE ){
- oxs_error(ERROR_LOCATION, OXS_ERROR_INVALID_DATA,
- "openssl_evp_block_cipher_ctx_init failed");
- }
- }else{
- oxs_error(ERROR_LOCATION, OXS_ERROR_INVALID_DATA,
- "Invalid operation type %d", OXS_CTX_GET_OPERATION(enc_ctx, env));
- return AXIS2_FAILURE;
- }
+ ret = OPENSSL_CIPHER_CTX_SET_CIPHER(oc_ctx,
+ env,
+ (EVP_CIPHER*)openssl_get_evp_cipher_by_name(env, (axis2_char_t*)cipher_name));
+
/****************Encryption or decryption happens here ************/
/*If this is to encrypt we simply pass the data to crypto function*/
if(OXS_CTX_GET_OPERATION(enc_ctx, env) == OXS_CTX_OPERATION_ENCRYPT){
- enclen = openssl_block_cipher_crypt(env, bc_ctx,
+ enclen = openssl_block_cipher_crypt(env, oc_ctx,
input->data, strlen((char*)input->data), &out_main_buf, OPENSSL_ENCRYPT);
/*If this is to decrypt, then we need to base64decode first*/
@@ -482,7 +470,7 @@
oxs_error(ERROR_LOCATION, OXS_ERROR_INVALID_DATA,
"base64 decoding failed");
}
- enclen = openssl_block_cipher_crypt(env, bc_ctx,
+ enclen = openssl_block_cipher_crypt(env, oc_ctx,
(unsigned char*)in_data, decoded_len, &out_main_buf, OPENSSL_DECRYPT);
}else{
oxs_error(ERROR_LOCATION, OXS_ERROR_INVALID_DATA,
Modified: webservices/axis2/trunk/c/rampart/src/omxmlsec/openssl/cipher_ctx.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/omxmlsec/openssl/cipher_ctx.c?view=diff&rev=441393&r1=441392&r2=441393
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/omxmlsec/openssl/cipher_ctx.c (original)
+++ webservices/axis2/trunk/c/rampart/src/omxmlsec/openssl/cipher_ctx.c Thu Sep 7 23:25:44 2006
@@ -25,80 +25,298 @@
#include <openssl_util.h>
-AXIS2_EXTERN openssl_evp_block_cipher_ctx_ptr AXIS2_CALL
-openssl_evp_block_cipher_ctx_create(const axis2_env_t *env)
+typedef struct openssl_cipher_ctx_impl{
+ openssl_cipher_ctx_t ctx;
+
+ const EVP_CIPHER* cipher;
+ axis2_char_t *key;
+ axis2_char_t *iv;
+ axis2_char_t *pad;
+}
+openssl_cipher_ctx_impl_t;
+
+/** Interface to implementation conversion macro */
+#define AXIS2_INTF_TO_IMPL(openssl_cipher_ctx) ((openssl_cipher_ctx_impl_t *)openssl_cipher_ctx)
+
+/******************* function headers ******************************/
+/* private functions */
+static void
+openssl_cipher_ctx_init_ops(
+ openssl_cipher_ctx_t *ctx);
+
+/*public functions*/
+
+axis2_status_t AXIS2_CALL
+openssl_cipher_ctx_free(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env
+ );
+
+const EVP_CIPHER* AXIS2_CALL
+openssl_cipher_ctx_get_cipher(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env
+ );
+
+axis2_char_t *AXIS2_CALL
+openssl_cipher_ctx_get_key(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env
+ );
+
+axis2_char_t *AXIS2_CALL
+openssl_cipher_ctx_get_iv(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env
+ );
+
+axis2_char_t *AXIS2_CALL
+openssl_cipher_ctx_get_pad(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env
+ );
+
+axis2_status_t AXIS2_CALL
+openssl_cipher_ctx_set_cipher(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env,
+ const EVP_CIPHER*
+ );
+
+axis2_status_t AXIS2_CALL
+openssl_cipher_ctx_set_key(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env,
+ axis2_char_t *key
+ );
+
+axis2_status_t AXIS2_CALL
+openssl_cipher_ctx_set_iv(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env,
+ axis2_char_t *iv
+ );
+
+axis2_status_t AXIS2_CALL
+openssl_cipher_ctx_set_pad(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env,
+ axis2_char_t *pad
+ );
+
+
+
+/******************* end of function headers ******************************/
+AXIS2_EXTERN openssl_cipher_ctx_t *AXIS2_CALL
+openssl_cipher_ctx_create(const axis2_env_t *env)
+{
+ openssl_cipher_ctx_impl_t *ctx_impl= NULL;
+ AXIS2_ENV_CHECK(env, NULL);
+
+ ctx_impl = AXIS2_MALLOC(env->allocator,sizeof(openssl_cipher_ctx_impl_t));
+ if (!ctx_impl)
+ {
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ return NULL;
+ }
+
+ ctx_impl->cipher = NULL;
+ ctx_impl->key = NULL;
+ ctx_impl->iv = NULL;
+ ctx_impl->pad = NULL;
+
+
+
+ ctx_impl->ctx.ops = AXIS2_MALLOC(env->allocator,sizeof(openssl_cipher_ctx_ops_t));
+ if (!ctx_impl->ctx.ops)
+ {
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+ openssl_cipher_ctx_free(&(ctx_impl->ctx), env);
+ return NULL;
+ }
+
+ openssl_cipher_ctx_init_ops(&(ctx_impl->ctx));
+
+ return &(ctx_impl->ctx);
+}
+
+/* private functions */
+static void
+openssl_cipher_ctx_init_ops(
+ openssl_cipher_ctx_t *ctx)
+{
+ ctx->ops->free = openssl_cipher_ctx_free ;
+ ctx->ops->get_cipher = openssl_cipher_ctx_get_cipher ;
+ ctx->ops->get_key = openssl_cipher_ctx_get_key ;
+ ctx->ops->get_iv = openssl_cipher_ctx_get_iv ;
+ ctx->ops->get_pad = openssl_cipher_ctx_get_pad ;
+ ctx->ops->set_cipher = openssl_cipher_ctx_set_cipher ;
+ ctx->ops->set_key_value = openssl_cipher_ctx_set_key ;
+ ctx->ops->set_iv = openssl_cipher_ctx_set_iv ;
+ ctx->ops->set_pad = openssl_cipher_ctx_set_pad ;
+}
+
+/* public functions*/
+axis2_status_t AXIS2_CALL
+openssl_cipher_ctx_free(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env
+ )
{
- openssl_evp_block_cipher_ctx_ptr bc_ctx = NULL;
- bc_ctx = (openssl_evp_block_cipher_ctx_ptr)AXIS2_MALLOC(env->allocator,sizeof(openssl_evp_block_cipher_ctx));
- openssl_evp_block_cipher_ctx_reset(env, bc_ctx);
- return bc_ctx;
-}
-
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
-openssl_evp_block_cipher_ctx_reset(const axis2_env_t *env, openssl_evp_block_cipher_ctx_ptr bc_ctx)
-{
- bc_ctx->cipher = NULL;
- bc_ctx->key_initialized = -1;
- bc_ctx->ctx_initialized = -1;
- bc_ctx->key = NULL;
- bc_ctx->iv = NULL;
- bc_ctx->pad = NULL;
+ openssl_cipher_ctx_impl_t * ctx_impl= NULL;
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ ctx_impl = AXIS2_INTF_TO_IMPL(ctx);
+ /*TODO Check how to free the EVP_CIPHER. Might be a problem if we try to free it here.*/
+ if (ctx_impl->key){
+ AXIS2_FREE(env->allocator, ctx_impl->key);
+ ctx_impl->key = NULL;
+ }
+
+ if (ctx_impl->iv){
+ AXIS2_FREE(env->allocator, ctx_impl->iv);
+ ctx_impl->iv = NULL;
+ }
+
+ if (ctx_impl->pad){
+ AXIS2_FREE(env->allocator, ctx_impl->pad);
+ ctx_impl->pad = NULL;
+ }
+ AXIS2_FREE(env->allocator, ctx_impl);
+ ctx_impl = NULL;
+
return AXIS2_SUCCESS;
}
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
-openssl_evp_block_cipher_ctx_init(const axis2_env_t *env,
- openssl_evp_block_cipher_ctx_ptr bc_ctx,
- int encrypt,
- const unsigned char* cipher_name)
+const EVP_CIPHER* AXIS2_CALL
+openssl_cipher_ctx_get_cipher(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env
+ )
{
-
- /*int iv_len;*/
- axis2_status_t ret = AXIS2_FAILURE;
+ openssl_cipher_ctx_impl_t * ctx_impl= NULL;
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ ctx_impl = AXIS2_INTF_TO_IMPL(ctx);
-
- /*If bc_ctx is NULL create a new one*/
- if(!bc_ctx){
- printf("Given bc_ctx is NULL. Creating a new one\n");
- bc_ctx = openssl_evp_block_cipher_ctx_create(env);
- if(!bc_ctx){
- return AXIS2_FAILURE;
- }
- }
- printf("\nCreating cipher ctx for %s", cipher_name);
-
- bc_ctx->cipher = (EVP_CIPHER*)openssl_get_evp_cipher_by_name(env, (axis2_char_t*)cipher_name);
-
- /*Key supposed to be set before this */
- if(!bc_ctx->key){
- return AXIS2_FAILURE;
- };
-
- /*Check if key and IV sizes are not applicable for the cipher*/
-#if 1
-
- if(EVP_CIPHER_iv_length(bc_ctx->cipher) != strlen((char*)bc_ctx->iv) ){
- printf("WARNING : IV size is not applicable for the cipher %d = %d\n", EVP_CIPHER_iv_length(bc_ctx->cipher) , strlen((char*)bc_ctx->iv) );
-
- }
-
- printf("\n KEY = %s, IV= %s", bc_ctx->key, bc_ctx->iv);
-
-#endif
+ return ctx_impl->cipher ;
+}
+
+axis2_char_t *AXIS2_CALL
+openssl_cipher_ctx_get_key(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env
+ )
+{
+ openssl_cipher_ctx_impl_t * ctx_impl= NULL;
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ ctx_impl = AXIS2_INTF_TO_IMPL(ctx);
+
+ return ctx_impl->key ;
+}
+
+axis2_char_t *AXIS2_CALL
+openssl_cipher_ctx_get_iv(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env
+ )
+{
+ openssl_cipher_ctx_impl_t * ctx_impl= NULL;
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ ctx_impl = AXIS2_INTF_TO_IMPL(ctx);
+
+ return ctx_impl->iv ;
+}
+
+axis2_char_t *AXIS2_CALL
+openssl_cipher_ctx_get_pad(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env
+ )
+{
+ openssl_cipher_ctx_impl_t * ctx_impl= NULL;
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+ ctx_impl = AXIS2_INTF_TO_IMPL(ctx);
+
+ return ctx_impl->pad;
+}
+
+axis2_status_t AXIS2_CALL
+openssl_cipher_ctx_set_cipher(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env,
+ const EVP_CIPHER *cipher
+ )
+{
+ openssl_cipher_ctx_impl_t * ctx_impl= NULL;
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- /*Init ctx*/
- EVP_CIPHER_CTX_init(&(bc_ctx->cipher_ctx));
-
- EVP_CipherInit_ex(&(bc_ctx->cipher_ctx), bc_ctx->cipher, NULL, NULL, NULL, encrypt);
- /* We finished modifying parameters so now we can set key and IV */
- ret = EVP_CipherInit_ex(&(bc_ctx->cipher_ctx), NULL, NULL, bc_ctx->key, bc_ctx->iv, encrypt);
- if(ret < 0 ){
- return AXIS2_FAILURE;
+ ctx_impl = AXIS2_INTF_TO_IMPL(ctx);
+ /*if (ctx_impl->cipher){
+ AXIS2_FREE(env->allocator, ctx_impl->cipher);
+ ctx_impl->cipher = NULL;
}
-
- bc_ctx->ctx_initialized = 1;
-
+ */
+ ctx_impl->cipher = cipher;
+
+ return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+openssl_cipher_ctx_set_key(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env,
+ axis2_char_t *key
+ )
+{
+ openssl_cipher_ctx_impl_t * ctx_impl= NULL;
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ ctx_impl = AXIS2_INTF_TO_IMPL(ctx);
+ if (ctx_impl->key){
+ AXIS2_FREE(env->allocator, ctx_impl->key);
+ ctx_impl->key = NULL;
+ }
+ ctx_impl->key = key;
+
+ return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+openssl_cipher_ctx_set_iv(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env,
+ axis2_char_t *iv
+ )
+{
+ openssl_cipher_ctx_impl_t * ctx_impl= NULL;
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ ctx_impl = AXIS2_INTF_TO_IMPL(ctx);
+ if (ctx_impl->iv){
+ AXIS2_FREE(env->allocator, ctx_impl->iv);
+ ctx_impl->iv = NULL;
+ }
+ ctx_impl->iv = iv;
+
+ return AXIS2_SUCCESS;
+}
+
+
+axis2_status_t AXIS2_CALL
+openssl_cipher_ctx_set_pad(openssl_cipher_ctx_t *ctx,
+ const axis2_env_t *env,
+ axis2_char_t *pad
+ )
+{
+ openssl_cipher_ctx_impl_t * ctx_impl= NULL;
+ AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
+
+ ctx_impl = AXIS2_INTF_TO_IMPL(ctx);
+ if (ctx_impl->pad){
+ AXIS2_FREE(env->allocator, ctx_impl->pad);
+ ctx_impl->pad = NULL;
+ }
+ ctx_impl->pad = pad;
+
return AXIS2_SUCCESS;
}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Modified: webservices/axis2/trunk/c/rampart/src/omxmlsec/openssl/crypt.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/omxmlsec/openssl/crypt.c?view=diff&rev=441393&r1=441392&r2=441393
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/omxmlsec/openssl/crypt.c (original)
+++ webservices/axis2/trunk/c/rampart/src/omxmlsec/openssl/crypt.c Thu Sep 7 23:25:44 2006
@@ -29,7 +29,7 @@
* leave the value unchanged
*/
AXIS2_EXTERN int AXIS2_CALL openssl_block_cipher_crypt(const axis2_env_t *env,
- openssl_evp_block_cipher_ctx_ptr bc_ctx,
+ openssl_cipher_ctx_t *oc_ctx,
unsigned char *in_main_buf,
int in_main_len,
unsigned char **out_main_buf,
@@ -37,19 +37,24 @@
{
EVP_CIPHER_CTX ctx ;
- unsigned char inbuf[BUFSIZE + 1 ], outbuf[BUFSIZE + EVP_MAX_BLOCK_LENGTH]; /*EVP_MAX_BLOCK_LENGTH = 32 in evp.h*/
- unsigned char *tempbuf = NULL;
- unsigned char *tempbuf2 = NULL;
-
- int inlen, outlen, i, out_buf_index;
- int ret;
-
- i = 0;
- out_buf_index = 0;
- ctx = bc_ctx->cipher_ctx;
-
- for(;;)
- {
+ unsigned char inbuf[BUFSIZE + 1 ], outbuf[BUFSIZE + EVP_MAX_BLOCK_LENGTH]; /*EVP_MAX_BLOCK_LENGTH = 32 in evp.h*/
+ unsigned char *tempbuf = NULL;
+ unsigned char *tempbuf2 = NULL;
+
+ int inlen, outlen, i, out_buf_index;
+ int ret;
+
+ i = 0;
+ out_buf_index = 0;
+
+ /*Init ctx*/
+ EVP_CIPHER_CTX_init(&ctx);
+ ret = EVP_CipherInit_ex(&ctx, (EVP_CIPHER *)OPENSSL_CIPHER_CTX_GET_CIPHER(oc_ctx, env), NULL, NULL, NULL, do_encrypt);
+ ret = EVP_CipherInit_ex(&ctx, NULL, NULL, (unsigned char*)OPENSSL_CIPHER_CTX_GET_KEY(oc_ctx, env),
+ (unsigned char*)OPENSSL_CIPHER_CTX_GET_IV(oc_ctx, env),
+ do_encrypt);
+ for(;;)
+ {
memset(inbuf,0 ,BUFSIZE);/*Reset memory for the inbuf*/
memcpy(inbuf, in_main_buf + (i * BUFSIZE) , BUFSIZE );/*Copy the first block to the inbuf*/
@@ -89,31 +94,29 @@
out_buf_index = out_buf_index + outlen;/*Update the writing position of the tempbuf*/
i++;
- }/*End of for loop*/
-
- ret = EVP_CipherFinal_ex(&ctx, outbuf, &outlen);
- if(!ret)
- {
- /* Error */
- EVP_CIPHER_CTX_cleanup(&ctx);
- printf("\nERROR:EVP_CipherFinal_ex--- EVP_CIPHER_CTX_cleanup");
- return (-1);
- }
- /*Alright now we need to write the last drop*/
- tempbuf2 = malloc(out_buf_index + outlen);
- memcpy(tempbuf2, tempbuf, out_buf_index);
- /*free tempbuf*/
- free(tempbuf);
- memcpy(tempbuf2 + out_buf_index, outbuf, outlen);
- tempbuf = tempbuf2; /*Assign new tempbuf2 to the old one*/
- out_buf_index = out_buf_index + outlen;/*Update the writing position of the tempbuf*/
+ }/*End of for loop*/
+ ret = EVP_CipherFinal_ex(&ctx, outbuf, &outlen);
+ if(!ret)
+ {
+ /* Error */
EVP_CIPHER_CTX_cleanup(&ctx);
-
- /*Assign the temp buf to the out_main_buf*/
- *out_main_buf = tempbuf;
- free(tempbuf2);
- return out_buf_index;
+ printf("\nERROR:EVP_CipherFinal_ex--- EVP_CIPHER_CTX_cleanup");
+ return (-1);
+ }
+ /*Alright now we need to write the last drop*/
+ tempbuf2 = malloc(out_buf_index + outlen);
+ memcpy(tempbuf2, tempbuf, out_buf_index);
+ /*free tempbuf*/
+ free(tempbuf);
+ memcpy(tempbuf2 + out_buf_index, outbuf, outlen);
+ tempbuf = tempbuf2; /*Assign new tempbuf2 to the old one*/
+ out_buf_index = out_buf_index + outlen;/*Update the writing position of the tempbuf*/
+ EVP_CIPHER_CTX_cleanup(&ctx);
+ /*Assign the temp buf to the out_main_buf*/
+ *out_main_buf = tempbuf;
+ free(tempbuf2);
+ return out_buf_index;
}
Modified: webservices/axis2/trunk/c/rampart/src/util/rampart_action.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/rampart/src/util/rampart_action.c?view=diff&rev=441393&r1=441392&r2=441393
==============================================================================
--- webservices/axis2/trunk/c/rampart/src/util/rampart_action.c (original)
+++ webservices/axis2/trunk/c/rampart/src/util/rampart_action.c Thu Sep 7 23:25:44 2006
@@ -58,97 +58,97 @@
rampart_actions_t *actions);
/*public functions*/
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_encryption_user(
rampart_actions_t *actions,
const axis2_env_t *env
);
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_encryption_sym_algorithm (
rampart_actions_t *actions,
const axis2_env_t *env
);
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_encryption_key_transport_algorithm (
rampart_actions_t *actions,
const axis2_env_t *env
);
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_items (
rampart_actions_t *actions,
const axis2_env_t *env
);
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_password_type (
rampart_actions_t *actions,
const axis2_env_t *env
);
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_user (
rampart_actions_t *actions,
const axis2_env_t *env
);
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_password_callback_class (
rampart_actions_t *actions,
const axis2_env_t *env
);
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_encryption_prop_file (
rampart_actions_t *actions,
const axis2_env_t *env
);
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_decryption_prop_file (
rampart_actions_t *actions,
const axis2_env_t *env
);
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_signature_prop_file(
rampart_actions_t *actions,
const axis2_env_t *env
);
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_signature_key_identifier (
rampart_actions_t *actions,
const axis2_env_t *env
);
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_encryption_key_identifier (
rampart_actions_t *actions,
const axis2_env_t *env
);
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_signature_parts (
rampart_actions_t *actions,
const axis2_env_t *env
);
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_encryption_parts (
rampart_actions_t *actions,
const axis2_env_t *env
);
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_time_to_live (
rampart_actions_t *actions,
const axis2_env_t *env
);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_encryption_user(
rampart_actions_t *actions,
const axis2_env_t *env,
@@ -156,124 +156,124 @@
);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_encryption_sym_algorithm(
rampart_actions_t *actions,
const axis2_env_t *env,
axis2_char_t *encryption_sym_algorithm
);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_encryption_key_transport_algorithm(
rampart_actions_t *actions,
const axis2_env_t *env,
axis2_char_t *encryption_key_transport_algorithm
);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_items(
rampart_actions_t *actions,
const axis2_env_t *env,
axis2_char_t *items
);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_password_type(
rampart_actions_t *actions,
const axis2_env_t *env,
axis2_char_t *password_type
);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_user(
rampart_actions_t *actions,
const axis2_env_t *env,
axis2_char_t *user
);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_password_callback_class(
rampart_actions_t *actions,
const axis2_env_t *env,
axis2_char_t *password_callback_class
);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_encryption_prop_file(
rampart_actions_t *actions,
const axis2_env_t *env,
axis2_char_t *encryption_prop_file
);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_decryption_prop_file(
rampart_actions_t *actions,
const axis2_env_t *env,
axis2_char_t *decryption_prop_file
);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_signature_prop_file(
rampart_actions_t *actions,
const axis2_env_t *env,
axis2_char_t *signature_prop_file
);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_signature_key_identifier(
rampart_actions_t *actions,
const axis2_env_t *env,
axis2_char_t *signature_key_identifier
);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_encryption_key_identifier(
rampart_actions_t *actions,
const axis2_env_t *env,
axis2_char_t *encryption_key_identifier
);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_signature_parts(
rampart_actions_t *actions,
const axis2_env_t *env,
axis2_char_t *signature_parts
);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_encryption_parts(
rampart_actions_t *actions,
const axis2_env_t *env,
axis2_char_t *encryption_parts
);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_time_to_live(
rampart_actions_t *actions,
const axis2_env_t *env,
axis2_char_t *time_to_live
);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_reset(
rampart_actions_t *actions,
const axis2_env_t *env
);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_free(
rampart_actions_t *actions,
const axis2_env_t *env
);
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_populate_from_params(
rampart_actions_t *actions,
const axis2_env_t *env,
axis2_param_t *param_action
);
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_populate_from_ctx (
rampart_actions_t *actions,
const axis2_env_t *env,
@@ -324,7 +324,7 @@
}
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_encryption_user(
rampart_actions_t *actions,
const axis2_env_t *env
@@ -337,7 +337,7 @@
return actions_impl->encryption_user;
}
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_encryption_sym_algorithm (
rampart_actions_t *actions,
const axis2_env_t *env
@@ -350,7 +350,7 @@
return actions_impl->encryption_sym_algorithm ;
}
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_encryption_key_transport_algorithm (
rampart_actions_t *actions,
const axis2_env_t *env
@@ -363,7 +363,7 @@
return actions_impl->encryption_key_transport_algorithm ;
}
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_items (
rampart_actions_t *actions,
const axis2_env_t *env
@@ -376,7 +376,7 @@
return actions_impl->items ;
}
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_password_type (
rampart_actions_t *actions,
const axis2_env_t *env
@@ -389,7 +389,7 @@
return actions_impl->password_type ;
}
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_user (
rampart_actions_t *actions,
const axis2_env_t *env
@@ -402,7 +402,7 @@
return actions_impl->user ;
}
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_password_callback_class(
rampart_actions_t *actions,
const axis2_env_t *env
@@ -415,7 +415,7 @@
return actions_impl->password_callback_class ;
}
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_encryption_prop_file(
rampart_actions_t *actions,
const axis2_env_t *env
@@ -428,7 +428,7 @@
return actions_impl->encryption_prop_file ;
}
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_decryption_prop_file(
rampart_actions_t *actions,
const axis2_env_t *env
@@ -441,7 +441,7 @@
return actions_impl->decryption_prop_file ;
}
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_signature_prop_file(
rampart_actions_t *actions,
const axis2_env_t *env
@@ -454,7 +454,7 @@
return actions_impl->signature_prop_file ;
}
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_signature_key_identifier(
rampart_actions_t *actions,
const axis2_env_t *env
@@ -467,7 +467,7 @@
return actions_impl->signature_key_identifier ;
}
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_encryption_key_identifier(
rampart_actions_t *actions,
const axis2_env_t *env
@@ -480,7 +480,7 @@
return actions_impl->encryption_key_identifier ;
}
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_signature_parts(
rampart_actions_t *actions,
const axis2_env_t *env
@@ -493,7 +493,7 @@
return actions_impl->signature_parts ;
}
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_encryption_parts(
rampart_actions_t *actions,
const axis2_env_t *env
@@ -506,7 +506,7 @@
return actions_impl->encryption_parts ;
}
-axis2_char_t *AXIS2_CALL
+static axis2_char_t *AXIS2_CALL
rampart_actions_get_time_to_live(
rampart_actions_t *actions,
const axis2_env_t *env
@@ -520,7 +520,7 @@
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_encryption_user(
rampart_actions_t *actions,
const axis2_env_t *env,
@@ -541,7 +541,7 @@
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_encryption_sym_algorithm(
rampart_actions_t *actions,
const axis2_env_t *env,
@@ -561,7 +561,7 @@
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_encryption_key_transport_algorithm(
rampart_actions_t *actions,
const axis2_env_t *env,
@@ -581,7 +581,7 @@
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_items(
rampart_actions_t *actions,
const axis2_env_t *env,
@@ -601,7 +601,7 @@
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_password_type(
rampart_actions_t *actions,
const axis2_env_t *env,
@@ -621,7 +621,7 @@
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_user(
rampart_actions_t *actions,
const axis2_env_t *env,
@@ -640,7 +640,7 @@
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_password_callback_class(
rampart_actions_t *actions,
const axis2_env_t *env,
@@ -659,7 +659,7 @@
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_encryption_prop_file(
rampart_actions_t *actions,
const axis2_env_t *env,
@@ -679,7 +679,7 @@
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_decryption_prop_file(
rampart_actions_t *actions,
const axis2_env_t *env,
@@ -699,7 +699,7 @@
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_signature_prop_file(
rampart_actions_t *actions,
const axis2_env_t *env,
@@ -718,7 +718,7 @@
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_signature_key_identifier(
rampart_actions_t *actions,
const axis2_env_t *env,
@@ -737,7 +737,7 @@
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_encryption_key_identifier(
rampart_actions_t *actions,
const axis2_env_t *env,
@@ -756,7 +756,7 @@
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_signature_parts(
rampart_actions_t *actions,
const axis2_env_t *env,
@@ -775,7 +775,7 @@
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_encryption_parts(
rampart_actions_t *actions,
const axis2_env_t *env,
@@ -795,7 +795,7 @@
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_set_time_to_live(
rampart_actions_t *actions,
const axis2_env_t *env,
@@ -815,7 +815,7 @@
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_reset( rampart_actions_t * actions, const axis2_env_t *env)
{
rampart_actions_impl_t * actions_impl= NULL;
@@ -840,7 +840,7 @@
return AXIS2_SUCCESS;
}
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_free( rampart_actions_t * actions, const axis2_env_t *env)
{
rampart_actions_impl_t * actions_impl= NULL;
@@ -930,7 +930,7 @@
}
/*Populate actions by extracting values from parameters set*/
-axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_populate_from_params (rampart_actions_t *actions,
const axis2_env_t *env, axis2_param_t *param_action )
{
@@ -1044,7 +1044,7 @@
}
/*Populate actions by extracting values from axis2 ctx*/
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
+static axis2_status_t AXIS2_CALL
rampart_actions_populate_from_ctx (rampart_actions_t *actions,
const axis2_env_t *env, axis2_ctx_t *ctx )
{
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org