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 ka...@apache.org on 2007/09/06 08:30:53 UTC
svn commit: r573157 - in /webservices/rampart/trunk/c/src/omxmlsec: ./
openssl/
Author: kaushalye
Date: Wed Sep 5 23:30:51 2007
New Revision: 573157
URL: http://svn.apache.org/viewvc?rev=573157&view=rev
Log:
Code cleaning
Modified:
webservices/rampart/trunk/c/src/omxmlsec/asym_ctx.c
webservices/rampart/trunk/c/src/omxmlsec/axiom.c
webservices/rampart/trunk/c/src/omxmlsec/buffer.c
webservices/rampart/trunk/c/src/omxmlsec/cipher.c
webservices/rampart/trunk/c/src/omxmlsec/ctx.c
webservices/rampart/trunk/c/src/omxmlsec/encryption.c
webservices/rampart/trunk/c/src/omxmlsec/iv.c
webservices/rampart/trunk/c/src/omxmlsec/key.c
webservices/rampart/trunk/c/src/omxmlsec/key_mgr.c
webservices/rampart/trunk/c/src/omxmlsec/openssl/cipher_property.c
webservices/rampart/trunk/c/src/omxmlsec/sign_ctx.c
webservices/rampart/trunk/c/src/omxmlsec/sign_part.c
webservices/rampart/trunk/c/src/omxmlsec/signature.c
webservices/rampart/trunk/c/src/omxmlsec/transform.c
webservices/rampart/trunk/c/src/omxmlsec/x509_cert.c
webservices/rampart/trunk/c/src/omxmlsec/xml_encryption.c
webservices/rampart/trunk/c/src/omxmlsec/xml_signature.c
Modified: webservices/rampart/trunk/c/src/omxmlsec/asym_ctx.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/asym_ctx.c?rev=573157&r1=573156&r2=573157&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/asym_ctx.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/asym_ctx.c Wed Sep 5 23:30:51 2007
@@ -335,7 +335,7 @@
oxs_x509_cert_free(asym_ctx->certificate, env);
asym_ctx->certificate = NULL;
}
-
+
if (asym_ctx->private_key)
{
openssl_pkey_free(asym_ctx->private_key, env);
Modified: webservices/rampart/trunk/c/src/omxmlsec/axiom.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/axiom.c?rev=573157&r1=573156&r2=573157&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/axiom.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/axiom.c Wed Sep 5 23:30:51 2007
@@ -173,7 +173,7 @@
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_char_t *attribute_name,
axis2_char_t *ns)
{
axis2_char_t *attribute_value = NULL;
@@ -250,13 +250,13 @@
axutil_hash_this(hi, NULL, NULL, &val);
if (val)
{
- axiom_attribute_free((axiom_attribute_t *)val, env);
- val = NULL;
+ axiom_attribute_free((axiom_attribute_t *)val, env);
+ val = NULL;
}
- }
+ }
axutil_hash_free(attr_list, env);
attr_list = NULL;
-
+
return found_val;
}
Modified: webservices/rampart/trunk/c/src/omxmlsec/buffer.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/buffer.c?rev=573157&r1=573156&r2=573157&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/buffer.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/buffer.c Wed Sep 5 23:30:51 2007
@@ -76,7 +76,7 @@
AXIS2_ENV_CHECK(env, NULL);
buf = oxs_buffer_create(env);
- status = oxs_buffer_populate(buf, env, oxs_buffer_get_data(buffer, env), oxs_buffer_get_size(buffer, env));
+ status = oxs_buffer_populate(buf, env, oxs_buffer_get_data(buffer, env), oxs_buffer_get_size(buffer, env));
return buf;
}
Modified: webservices/rampart/trunk/c/src/omxmlsec/cipher.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/cipher.c?rev=573157&r1=573156&r2=573157&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/cipher.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/cipher.c Wed Sep 5 23:30:51 2007
@@ -48,7 +48,6 @@
oxs_error(env, ERROR_LOCATION,
OXS_ERROR_INVALID_DATA, "Cannot populate cipher property");
return NULL;
-
}
return cprop;
}
Modified: webservices/rampart/trunk/c/src/omxmlsec/ctx.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/ctx.c?rev=573157&r1=573156&r2=573157&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/ctx.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/ctx.c Wed Sep 5 23:30:51 2007
@@ -308,11 +308,11 @@
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- /* if (ctx->key)
- {
- oxs_key_free(ctx->key, env);
- ctx->key = NULL;
- }*/
+ /* if (ctx->key)
+ {
+ oxs_key_free(ctx->key, env);
+ ctx->key = NULL;
+ }*/
ctx->key = key;
return AXIS2_SUCCESS;
Modified: webservices/rampart/trunk/c/src/omxmlsec/encryption.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/encryption.c?rev=573157&r1=573156&r2=573157&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/encryption.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/encryption.c Wed Sep 5 23:30:51 2007
@@ -52,10 +52,10 @@
return AXIS2_FAILURE;
}
/*Get the IV*/
- iv = axutil_strndup(env,
+ iv = axutil_strndup(env,
(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));
+ oxs_ctx_get_enc_mtd_algorithm(enc_ctx, env)),
+ openssl_cipher_property_get_iv_size(cprop, env));
/*Create the openssl context*/
@@ -83,7 +83,6 @@
return AXIS2_FAILURE;
}
-
ret = openssl_cipher_ctx_set_cipher(oc_ctx,
env,
(EVP_CIPHER*)openssl_get_evp_cipher_by_name(
@@ -150,6 +149,7 @@
}
/*Populate decoded (input to the crypto function) buffer*/
ret = oxs_buffer_populate(decoded_buf, env, decoded_data, decoded_len);
+
/*Then we decrypt*/
enclen = openssl_bc_crypt(env, oc_ctx, decoded_buf, result, OPENSSL_DECRYPT);
@@ -158,6 +158,7 @@
"openssl_block_cipher_crypt FAILED");
return AXIS2_FAILURE;
}
+
/*Free*/
oxs_buffer_free(decoded_buf, env);
decoded_buf = NULL;
@@ -173,10 +174,13 @@
/*FREE*/
openssl_cipher_property_free(cprop, env);
cprop = NULL;
+
AXIS2_FREE(env->allocator, iv);
iv = NULL;
+
openssl_cipher_ctx_free(oc_ctx, env);
oc_ctx = NULL;
+
return AXIS2_SUCCESS;
}
@@ -213,7 +217,7 @@
if(AXIS2_FAILURE == status){
oxs_error(env, ERROR_LOCATION, OXS_ERROR_INVALID_DATA,
"Key loading failed for Key encryption");
-
+
return AXIS2_FAILURE;
}
Modified: webservices/rampart/trunk/c/src/omxmlsec/iv.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/iv.c?rev=573157&r1=573156&r2=573157&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/iv.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/iv.c Wed Sep 5 23:30:51 2007
@@ -42,7 +42,7 @@
openssl_cipher_property_free(cprop, env);
cprop = NULL;
-
+
/*Here we have predefined IVs in the openssl_constants.
Get the correct one using the size*/
Modified: webservices/rampart/trunk/c/src/omxmlsec/key.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/key.c?rev=573157&r1=573156&r2=573157&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/key.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/key.c Wed Sep 5 23:30:51 2007
@@ -56,7 +56,7 @@
oxs_buffer_t *AXIS2_CALL
oxs_key_get_buffer(const oxs_key_t *key,
- const axutil_env_t *env)
+ const axutil_env_t *env)
{
AXIS2_ENV_CHECK(env, NULL);
return key->buf;
@@ -118,13 +118,13 @@
}
oxs_key_t *AXIS2_CALL
-oxs_key_dup(oxs_key_t *key,
- const axutil_env_t *env)
+oxs_key_dup(oxs_key_t *key,
+ const axutil_env_t *env)
{
oxs_key_t *new_key = NULL;
AXIS2_ENV_CHECK(env, NULL);
-
+
AXIS2_PARAM_CHECK(env->error, key, NULL);
/*Create new key*/
@@ -134,13 +134,13 @@
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
-
- /*Populate with data buf*/
- oxs_key_populate_with_buf(new_key,
- env,
- oxs_key_get_buffer(key, env),
- axutil_strdup(env, key->name),
- key->usage);
+
+ /*Populate with data buf*/
+ oxs_key_populate_with_buf(new_key,
+ env,
+ oxs_key_get_buffer(key, env),
+ axutil_strdup(env, key->name),
+ key->usage);
return new_key;
}
@@ -174,7 +174,7 @@
const axutil_env_t *env)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
+
oxs_buffer_free(key->buf, env);
key->buf = NULL;
AXIS2_FREE(env->allocator, key->name);
@@ -188,17 +188,17 @@
axis2_status_t AXIS2_CALL
oxs_key_populate_with_buf(oxs_key_t *key,
- const axutil_env_t *env,
- oxs_buffer_t *buffer,
- axis2_char_t *name,
- int usage)
+ const axutil_env_t *env,
+ oxs_buffer_t *buffer,
+ axis2_char_t *name,
+ int usage)
{
- int ret;
+ int ret;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-
+
ret = oxs_key_set_name(key, env, name);
- ret = oxs_key_set_usage(key, env, usage);
-
+ ret = oxs_key_set_usage(key, env, usage);
+
ret = oxs_buffer_populate(key->buf, env, oxs_buffer_get_data(buffer, env), oxs_buffer_get_size(buffer, env));
return AXIS2_SUCCESS;
}
@@ -238,7 +238,7 @@
status = oxs_key_populate(key, env,
oxs_buffer_get_data(buf, env), file_name,
oxs_buffer_get_size(buf, env), OXS_KEY_USAGE_NONE);
-
+
oxs_buffer_free(buf, env);
buf = NULL;
@@ -282,7 +282,7 @@
oxs_buffer_get_size(key_buf, env), OXS_KEY_USAGE_NONE);
oxs_buffer_free(key_buf, env);
- key_buf = NULL;
+ key_buf = NULL;
return ret;
}
Modified: webservices/rampart/trunk/c/src/omxmlsec/key_mgr.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/key_mgr.c?rev=573157&r1=573156&r2=573157&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/key_mgr.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/key_mgr.c Wed Sep 5 23:30:51 2007
@@ -52,11 +52,11 @@
if(pem_buf){
if( OXS_ASYM_CTX_OPERATION_PUB_ENCRYPT == oxs_asym_ctx_get_operation(ctx, env) ||
OXS_ASYM_CTX_OPERATION_PUB_DECRYPT == oxs_asym_ctx_get_operation(ctx, env)){
-
+
/*load certificate from buf*/
status = openssl_x509_load_from_buffer(env, pem_buf, &cert);
}else{
-
+
/*load private key from buf*/
status = openssl_pem_buf_read_pkey(env, pem_buf, password, OPENSSL_PEM_PKEY_TYPE_PRIVATE_KEY, &prvkey);
if(status == AXIS2_FAILURE){
@@ -64,7 +64,7 @@
}
}
}else{
-
+
/* pem_buf is NULL. So we have to fetch the key in a file*/
/* Get file to be loaded. Can be either in PEM or PKCS12 format*/
filename = oxs_asym_ctx_get_file_name(ctx, env);
@@ -81,7 +81,7 @@
status = openssl_x509_load_from_pem(env, filename, &cert);
if((status == AXIS2_FAILURE) || (!cert)){
-
+
/* If we cannot get the certificate then the file might contain either a public key or a private key*/
/* The type depends on the operation*/
operation = oxs_asym_ctx_get_operation(ctx, env);
@@ -100,7 +100,7 @@
}
}else if(OXS_ASYM_CTX_FORMAT_PKCS12 == oxs_asym_ctx_get_format(ctx, env)){
format = OPENSSL_X509_FORMAT_PKCS12;
-
+
/* Here we load both key and the certificate*/
status = openssl_x509_load_from_pkcs12(env, filename, password, &cert, &prvkey, &ca);
if(AXIS2_FAILURE == status){
@@ -119,10 +119,10 @@
openssl_pkey_populate(open_prvkey, env, prvkey, filename, OPENSSL_PKEY_TYPE_PRIVATE_KEY);
oxs_asym_ctx_set_private_key(ctx, env, open_prvkey);
}
-
+
/*If the public key is available populate*/
if(pubkey){
-
+
/*This scenario is not recommonded. This will be executed iff the file is a public key file in PEM format*/
open_pubkey = openssl_pkey_create(env);
openssl_pkey_populate(open_pubkey, env, pubkey, filename, OPENSSL_PKEY_TYPE_PUBLIC_KEY);
@@ -130,13 +130,13 @@
oxs_x509_cert_set_public_key(oxs_cert, env, open_pubkey);
oxs_asym_ctx_set_certificate(ctx, env, oxs_cert);
}
-
+
/*If the X509 certificate is available, populate oxs_x509_cert*/
if(cert){
axis2_char_t *x509_cert_data = NULL;
-
+
x509_cert_data = openssl_x509_get_cert_data(env, cert);
-
+
/*Create certificate*/
oxs_cert = oxs_x509_cert_create(env);
@@ -155,18 +155,18 @@
openssl_pkey_populate(open_pubkey, env, pubkey, openssl_x509_get_info(env, OPENSSL_X509_INFO_FINGER,cert), OPENSSL_PKEY_TYPE_PUBLIC_KEY);
/*Set the public key to the x509 certificate*/
oxs_x509_cert_set_public_key(oxs_cert, env, open_pubkey);
-
+
/*Set the x509 certificate to the asym ctx*/
oxs_asym_ctx_set_certificate(ctx, env, oxs_cert);
AXIS2_FREE(env->allocator, x509_cert_data);
x509_cert_data = NULL;
-
+
X509_free(cert);
cert = NULL;
}
-
+
/*If this fails to get anything return failure*/
if((!cert) && (!pubkey) && (!prvkey)){
oxs_error(env, ERROR_LOCATION, OXS_ERROR_DEFAULT,
@@ -190,7 +190,7 @@
/*load private key from buf*/
status = openssl_pem_buf_read_pkey(env, pem_string, password, OPENSSL_PEM_PKEY_TYPE_PRIVATE_KEY, &prvkey);
-
+
/*Populate*/
if(prvkey){
open_prvkey = openssl_pkey_create(env);
@@ -236,7 +236,7 @@
EVP_PKEY *pubkey = NULL;
openssl_pkey_t *open_pubkey = NULL;
axis2_char_t *x509_cert_data = NULL;
-
+
x509_cert_data = openssl_x509_get_cert_data(env, cert);
/*Create X509 certificate*/
@@ -252,13 +252,13 @@
/*Additionally we need to set the public key*/
openssl_x509_get_pubkey(env, cert, &pubkey);
open_pubkey = openssl_pkey_create(env);
- openssl_pkey_populate(open_pubkey, env, pubkey,
- openssl_x509_get_info(env, OPENSSL_X509_INFO_FINGER,cert),
- OPENSSL_PKEY_TYPE_PUBLIC_KEY);
+ openssl_pkey_populate(open_pubkey, env, pubkey,
+ openssl_x509_get_info(env, OPENSSL_X509_INFO_FINGER,cert),
+ OPENSSL_PKEY_TYPE_PUBLIC_KEY);
/*Set the public key to the x509 certificate*/
oxs_x509_cert_set_public_key(oxs_cert, env, open_pubkey);
-
+
/*Free*/
AXIS2_FREE(env->allocator, x509_cert_data);
x509_cert_data = NULL;
@@ -289,7 +289,7 @@
{
X509 *cert = NULL;
oxs_x509_cert_t *oxs_cert = NULL;
-
+
openssl_x509_load_from_buffer(env, pem_string, &cert);
oxs_cert = oxs_key_mgr_convert_to_x509(env, cert);
Modified: webservices/rampart/trunk/c/src/omxmlsec/openssl/cipher_property.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/openssl/cipher_property.c?rev=573157&r1=573156&r2=573157&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/openssl/cipher_property.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/openssl/cipher_property.c Wed Sep 5 23:30:51 2007
@@ -227,6 +227,7 @@
if (cprop->cipher)
{
+ /*We should not free the EVP_CIPHER* cipher here*/
/*AXIS2_FREE(env->allocator, cprop->cipher);*/
cprop->cipher = NULL;
}
Modified: webservices/rampart/trunk/c/src/omxmlsec/sign_ctx.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/sign_ctx.c?rev=573157&r1=573156&r2=573157&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/sign_ctx.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/sign_ctx.c Wed Sep 5 23:30:51 2007
@@ -282,7 +282,7 @@
openssl_pkey_free(sign_ctx->prv_key, env);
sign_ctx->prv_key = NULL;
}
-
+
if(sign_ctx->pub_key)
{
openssl_pkey_free(sign_ctx->pub_key, env);
@@ -290,7 +290,7 @@
}
if(sign_ctx->sign_parts)
- {
+ {
int size = 0;
int j = 0;
size = axutil_array_list_size(sign_ctx->sign_parts, env);
@@ -301,11 +301,11 @@
sig_part = axutil_array_list_get(sign_ctx->sign_parts, env, j);
oxs_sign_part_free(sig_part, env);
sig_part = NULL;
- }
+ }
axutil_array_list_free(sign_ctx->sign_parts, env);
sign_ctx->sign_parts = NULL;
}
-
+
if(sign_ctx->certificate){
oxs_x509_cert_free(sign_ctx->certificate, env);
sign_ctx->certificate = NULL;
Modified: webservices/rampart/trunk/c/src/omxmlsec/sign_part.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/sign_part.c?rev=573157&r1=573156&r2=573157&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/sign_part.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/sign_part.c Wed Sep 5 23:30:51 2007
@@ -196,7 +196,7 @@
}
sign_part->node = NULL;
-
+
if(sign_part->transforms){
int size = 0;
int j = 0;
@@ -212,7 +212,7 @@
axutil_array_list_free(sign_part->transforms, env);
sign_part->transforms = NULL;
}
-
+
AXIS2_FREE(env->allocator, sign_part);
sign_part = NULL;
Modified: webservices/rampart/trunk/c/src/omxmlsec/signature.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/signature.c?rev=573157&r1=573156&r2=573157&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/signature.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/signature.c Wed Sep 5 23:30:51 2007
@@ -62,11 +62,11 @@
/*Free signed_result_buf*/
oxs_buffer_free(signed_result_buf, env);
signed_result_buf = NULL;
-
+
/*Free encoded_str*/
AXIS2_FREE(env->allocator, encoded_str);
encoded_str = NULL;
-
+
return AXIS2_SUCCESS;
}
@@ -80,7 +80,6 @@
{
axis2_char_t *sign_algo = NULL;
-
/*Get algo*/
sign_algo = oxs_sign_ctx_get_sign_mtd_algo(sign_ctx, env);
@@ -98,7 +97,6 @@
return AXIS2_FAILURE;
}
-
return AXIS2_SUCCESS;
}
@@ -153,15 +151,16 @@
sig_buf = NULL;
oxs_buffer_free(in_buf, env);
in_buf = NULL;
+
return AXIS2_FAILURE;
}else{
-
+ /*Signature SUCCESS*/
AXIS2_LOG_INFO(env->log, "[oxs][sig] Signature verification SUCCESS " );
oxs_buffer_free(sig_buf, env);
sig_buf = NULL;
oxs_buffer_free(in_buf, env);
in_buf = NULL;
+
return AXIS2_SUCCESS;
}
-
}
Modified: webservices/rampart/trunk/c/src/omxmlsec/transform.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/transform.c?rev=573157&r1=573156&r2=573157&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/transform.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/transform.c Wed Sep 5 23:30:51 2007
@@ -74,6 +74,7 @@
transform->id = NULL;
}
transform->id = axutil_strdup(env, id);
+
return AXIS2_SUCCESS;
}
@@ -84,6 +85,7 @@
oxs_tr_dtype_t input_data_type)
{
transform->input_data_type = input_data_type;
+
return AXIS2_SUCCESS;
}
@@ -94,6 +96,7 @@
oxs_tr_dtype_t output_data_type)
{
transform->output_data_type = output_data_type;
+
return AXIS2_SUCCESS;
}
@@ -104,6 +107,7 @@
oxs_transform_tr_func transform_func)
{
transform->transform_func = transform_func;
+
return AXIS2_SUCCESS;
}
@@ -113,6 +117,7 @@
{
oxs_transform_t *transform = NULL;
AXIS2_ENV_CHECK(env, NULL);
+
transform = AXIS2_MALLOC(env->allocator, sizeof(oxs_transform_t));
if (!transform)
{
@@ -120,8 +125,9 @@
return NULL;
}
- /*TODO Set defaults*/
transform->id = NULL;
+ transform->input_data_type = OXS_TRANSFORM_TYPE_UNKNOWN;
+ transform->output_data_type = OXS_TRANSFORM_TYPE_UNKNOWN;
return transform;
}
Modified: webservices/rampart/trunk/c/src/omxmlsec/x509_cert.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/x509_cert.c?rev=573157&r1=573156&r2=573157&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/x509_cert.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/x509_cert.c Wed Sep 5 23:30:51 2007
@@ -97,15 +97,15 @@
AXIS2_FREE(env->allocator, x509_cert->data );
x509_cert->data =NULL;
}
-
+
if(x509_cert->public_key){
openssl_pkey_free(x509_cert->public_key, env);
x509_cert->public_key = NULL;
}
-
+
AXIS2_FREE(env->allocator, x509_cert);
x509_cert = NULL;
-
+
return AXIS2_SUCCESS;
}
Modified: webservices/rampart/trunk/c/src/omxmlsec/xml_encryption.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/xml_encryption.c?rev=573157&r1=573156&r2=573157&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/xml_encryption.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/xml_encryption.c Wed Sep 5 23:30:51 2007
@@ -345,7 +345,7 @@
oxs_buffer_free(result_buf, env);
result_buf = NULL;
-
+
AXIS2_FREE(env->allocator, decrypted_data);
decrypted_data = NULL;
@@ -408,10 +408,10 @@
/*AXIS2_FREE(env->allocator, cipher_val);
cipher_val = NULL;*/
-
+
AXIS2_FREE(env->allocator, new_cipher_val);
new_cipher_val = NULL;
-
+
return status;
}
@@ -524,7 +524,7 @@
if(!cipher_val){
return AXIS2_FAILURE;
}
-
+
new_cipher_val = oxs_util_get_newline_removed_string(env, cipher_val);
/*Get key used to encrypt*/
@@ -550,8 +550,8 @@
AXIS2_FREE(env->allocator, new_cipher_val);
new_cipher_val = NULL;
-
-
+
+
if(AXIS2_FAILURE == status){
return AXIS2_FAILURE;
}
Modified: webservices/rampart/trunk/c/src/omxmlsec/xml_signature.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/omxmlsec/xml_signature.c?rev=573157&r1=573156&r2=573157&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/omxmlsec/xml_signature.c (original)
+++ webservices/rampart/trunk/c/src/omxmlsec/xml_signature.c Wed Sep 5 23:30:51 2007
@@ -181,7 +181,7 @@
/*Free*/
AXIS2_FREE(env->allocator, digest);
digest = NULL;
-
+
return AXIS2_SUCCESS;
}
/**
@@ -363,7 +363,7 @@
}
/*Set the next node to be processed*/
tr_node = axiom_node_get_next_sibling(tr_node, env);
- /*axiom_util_get_next_sibling_element(axiom_node_get_data_element(tr_node, env), env,
+ /*axiom_util_get_next_sibling_element(axiom_node_get_data_element(tr_node, env), env,
tr_node, &tr_node);*/
}/*eof while*/
/*Set transforms for this signature part*/
@@ -372,7 +372,7 @@
/*At the end, set the next node as the child node*/
/*child_node = axiom_node_get_next_sibling(child_node, env);*/
axiom_util_get_next_sibling_element(axiom_node_get_data_element(child_node, env), env,
- child_node, &child_node);
+ child_node, &child_node);
}else{
/*There are no transforms for this sign part*/
}
@@ -490,7 +490,7 @@
/*The very next child of SignedInfo Should be the ds:SignatureValue*/
/*sig_val_node = axiom_node_get_next_sibling(signed_info_node, env);*/
axiom_util_get_next_sibling_element(axiom_node_get_data_element(signed_info_node, env), env,
- signed_info_node, &sig_val_node);
+ signed_info_node, &sig_val_node);
if(0 == axutil_strcmp( OXS_NODE_SIGNATURE_VALUE, axiom_util_get_localname(sig_val_node, env))){
axis2_char_t *sig_val = NULL;
axis2_char_t *newline_removed = NULL;
@@ -553,7 +553,7 @@
oxs_error(env, ERROR_LOCATION, OXS_ERROR_SIG_VERIFICATION_FAILED,"Digest verification failed for node Id= %s ", id );
status = AXIS2_FAILURE;
}
-
+
/*FREE*/
AXIS2_FREE(env->allocator, new_digest);
new_digest = NULL;