summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/evp/evp_enc.c
diff options
context:
space:
mode:
authorbeck <beck@openbsd.org>2014-04-17 13:37:48 +0000
committerbeck <beck@openbsd.org>2014-04-17 13:37:48 +0000
commit6f3a6cb14ff86acbae89a0395ba3cdc01e85fa54 (patch)
treee7ca531f41f3403bf7f04411c40317e859a02460 /lib/libcrypto/evp/evp_enc.c
parentRevert unintended whitespace changes. (diff)
downloadwireguard-openbsd-6f3a6cb14ff86acbae89a0395ba3cdc01e85fa54.tar.xz
wireguard-openbsd-6f3a6cb14ff86acbae89a0395ba3cdc01e85fa54.zip
Change library to use intrinsic memory allocation functions instead of
OPENSSL_foo wrappers. This changes: OPENSSL_malloc->malloc OPENSSL_free->free OPENSSL_relloc->realloc OPENSSL_freeFunc->free
Diffstat (limited to 'lib/libcrypto/evp/evp_enc.c')
-rw-r--r--lib/libcrypto/evp/evp_enc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libcrypto/evp/evp_enc.c b/lib/libcrypto/evp/evp_enc.c
index 50403a75780..e8ca5026332 100644
--- a/lib/libcrypto/evp/evp_enc.c
+++ b/lib/libcrypto/evp/evp_enc.c
@@ -78,7 +78,7 @@ void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx)
EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void)
{
- EVP_CIPHER_CTX *ctx=OPENSSL_malloc(sizeof *ctx);
+ EVP_CIPHER_CTX *ctx=malloc(sizeof *ctx);
if (ctx)
EVP_CIPHER_CTX_init(ctx);
return ctx;
@@ -164,7 +164,7 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *imp
ctx->cipher=cipher;
if (ctx->cipher->ctx_size)
{
- ctx->cipher_data=OPENSSL_malloc(ctx->cipher->ctx_size);
+ ctx->cipher_data=malloc(ctx->cipher->ctx_size);
if (!ctx->cipher_data)
{
EVPerr(EVP_F_EVP_CIPHERINIT_EX, ERR_R_MALLOC_FAILURE);
@@ -546,7 +546,7 @@ void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx)
if (ctx)
{
EVP_CIPHER_CTX_cleanup(ctx);
- OPENSSL_free(ctx);
+ free(ctx);
}
}
@@ -561,7 +561,7 @@ int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *c)
OPENSSL_cleanse(c->cipher_data, c->cipher->ctx_size);
}
if (c->cipher_data)
- OPENSSL_free(c->cipher_data);
+ free(c->cipher_data);
#ifndef OPENSSL_NO_ENGINE
if (c->engine)
/* The EVP_CIPHER we used belongs to an ENGINE, release the
@@ -644,7 +644,7 @@ int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in)
if (in->cipher_data && in->cipher->ctx_size)
{
- out->cipher_data=OPENSSL_malloc(in->cipher->ctx_size);
+ out->cipher_data=malloc(in->cipher->ctx_size);
if (!out->cipher_data)
{
EVPerr(EVP_F_EVP_CIPHER_CTX_COPY,ERR_R_MALLOC_FAILURE);