diff options
| author | beck <> | 2014-04-17 13:37:50 +0000 |
|---|---|---|
| committer | beck <> | 2014-04-17 13:37:50 +0000 |
| commit | 6aa5f85bab6ba5f9189fbc3d53a12e0f6dae48dd (patch) | |
| tree | 7595a93a27385c367802aa17ecf20f96551cf14d /src/lib/libcrypto/evp | |
| parent | 4d13fb9c7b5ac7311d7031173c21ab0121388413 (diff) | |
| download | openbsd-6aa5f85bab6ba5f9189fbc3d53a12e0f6dae48dd.tar.gz openbsd-6aa5f85bab6ba5f9189fbc3d53a12e0f6dae48dd.tar.bz2 openbsd-6aa5f85bab6ba5f9189fbc3d53a12e0f6dae48dd.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 'src/lib/libcrypto/evp')
| -rw-r--r-- | src/lib/libcrypto/evp/bio_b64.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/bio_enc.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/bio_ok.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/digest.c | 12 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/e_aes.c | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/evp_enc.c | 10 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/evp_pbe.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/p_lib.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/p_open.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/pmeth_lib.c | 10 |
10 files changed, 31 insertions, 31 deletions
diff --git a/src/lib/libcrypto/evp/bio_b64.c b/src/lib/libcrypto/evp/bio_b64.c index ac6d441aad..27fc587ca8 100644 --- a/src/lib/libcrypto/evp/bio_b64.c +++ b/src/lib/libcrypto/evp/bio_b64.c | |||
| @@ -113,7 +113,7 @@ static int b64_new(BIO *bi) | |||
| 113 | { | 113 | { |
| 114 | BIO_B64_CTX *ctx; | 114 | BIO_B64_CTX *ctx; |
| 115 | 115 | ||
| 116 | ctx=(BIO_B64_CTX *)OPENSSL_malloc(sizeof(BIO_B64_CTX)); | 116 | ctx=(BIO_B64_CTX *)malloc(sizeof(BIO_B64_CTX)); |
| 117 | if (ctx == NULL) return(0); | 117 | if (ctx == NULL) return(0); |
| 118 | 118 | ||
| 119 | ctx->buf_len=0; | 119 | ctx->buf_len=0; |
| @@ -134,7 +134,7 @@ static int b64_new(BIO *bi) | |||
| 134 | static int b64_free(BIO *a) | 134 | static int b64_free(BIO *a) |
| 135 | { | 135 | { |
| 136 | if (a == NULL) return(0); | 136 | if (a == NULL) return(0); |
| 137 | OPENSSL_free(a->ptr); | 137 | free(a->ptr); |
| 138 | a->ptr=NULL; | 138 | a->ptr=NULL; |
| 139 | a->init=0; | 139 | a->init=0; |
| 140 | a->flags=0; | 140 | a->flags=0; |
diff --git a/src/lib/libcrypto/evp/bio_enc.c b/src/lib/libcrypto/evp/bio_enc.c index b6efb5fbc4..8fe9a45e48 100644 --- a/src/lib/libcrypto/evp/bio_enc.c +++ b/src/lib/libcrypto/evp/bio_enc.c | |||
| @@ -109,7 +109,7 @@ static int enc_new(BIO *bi) | |||
| 109 | { | 109 | { |
| 110 | BIO_ENC_CTX *ctx; | 110 | BIO_ENC_CTX *ctx; |
| 111 | 111 | ||
| 112 | ctx=(BIO_ENC_CTX *)OPENSSL_malloc(sizeof(BIO_ENC_CTX)); | 112 | ctx=(BIO_ENC_CTX *)malloc(sizeof(BIO_ENC_CTX)); |
| 113 | if (ctx == NULL) return(0); | 113 | if (ctx == NULL) return(0); |
| 114 | EVP_CIPHER_CTX_init(&ctx->cipher); | 114 | EVP_CIPHER_CTX_init(&ctx->cipher); |
| 115 | 115 | ||
| @@ -133,7 +133,7 @@ static int enc_free(BIO *a) | |||
| 133 | b=(BIO_ENC_CTX *)a->ptr; | 133 | b=(BIO_ENC_CTX *)a->ptr; |
| 134 | EVP_CIPHER_CTX_cleanup(&(b->cipher)); | 134 | EVP_CIPHER_CTX_cleanup(&(b->cipher)); |
| 135 | OPENSSL_cleanse(a->ptr,sizeof(BIO_ENC_CTX)); | 135 | OPENSSL_cleanse(a->ptr,sizeof(BIO_ENC_CTX)); |
| 136 | OPENSSL_free(a->ptr); | 136 | free(a->ptr); |
| 137 | a->ptr=NULL; | 137 | a->ptr=NULL; |
| 138 | a->init=0; | 138 | a->init=0; |
| 139 | a->flags=0; | 139 | a->flags=0; |
diff --git a/src/lib/libcrypto/evp/bio_ok.c b/src/lib/libcrypto/evp/bio_ok.c index e64335353f..fdb742f554 100644 --- a/src/lib/libcrypto/evp/bio_ok.c +++ b/src/lib/libcrypto/evp/bio_ok.c | |||
| @@ -178,7 +178,7 @@ static int ok_new(BIO *bi) | |||
| 178 | { | 178 | { |
| 179 | BIO_OK_CTX *ctx; | 179 | BIO_OK_CTX *ctx; |
| 180 | 180 | ||
| 181 | ctx=(BIO_OK_CTX *)OPENSSL_malloc(sizeof(BIO_OK_CTX)); | 181 | ctx=(BIO_OK_CTX *)malloc(sizeof(BIO_OK_CTX)); |
| 182 | if (ctx == NULL) return(0); | 182 | if (ctx == NULL) return(0); |
| 183 | 183 | ||
| 184 | ctx->buf_len=0; | 184 | ctx->buf_len=0; |
| @@ -203,7 +203,7 @@ static int ok_free(BIO *a) | |||
| 203 | if (a == NULL) return(0); | 203 | if (a == NULL) return(0); |
| 204 | EVP_MD_CTX_cleanup(&((BIO_OK_CTX *)a->ptr)->md); | 204 | EVP_MD_CTX_cleanup(&((BIO_OK_CTX *)a->ptr)->md); |
| 205 | OPENSSL_cleanse(a->ptr,sizeof(BIO_OK_CTX)); | 205 | OPENSSL_cleanse(a->ptr,sizeof(BIO_OK_CTX)); |
| 206 | OPENSSL_free(a->ptr); | 206 | free(a->ptr); |
| 207 | a->ptr=NULL; | 207 | a->ptr=NULL; |
| 208 | a->init=0; | 208 | a->init=0; |
| 209 | a->flags=0; | 209 | a->flags=0; |
diff --git a/src/lib/libcrypto/evp/digest.c b/src/lib/libcrypto/evp/digest.c index 782d3199a5..2fae68ef5e 100644 --- a/src/lib/libcrypto/evp/digest.c +++ b/src/lib/libcrypto/evp/digest.c | |||
| @@ -124,7 +124,7 @@ void EVP_MD_CTX_init(EVP_MD_CTX *ctx) | |||
| 124 | 124 | ||
| 125 | EVP_MD_CTX *EVP_MD_CTX_create(void) | 125 | EVP_MD_CTX *EVP_MD_CTX_create(void) |
| 126 | { | 126 | { |
| 127 | EVP_MD_CTX *ctx=OPENSSL_malloc(sizeof *ctx); | 127 | EVP_MD_CTX *ctx=malloc(sizeof *ctx); |
| 128 | 128 | ||
| 129 | if (ctx) | 129 | if (ctx) |
| 130 | EVP_MD_CTX_init(ctx); | 130 | EVP_MD_CTX_init(ctx); |
| @@ -198,12 +198,12 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) | |||
| 198 | if (ctx->digest != type) | 198 | if (ctx->digest != type) |
| 199 | { | 199 | { |
| 200 | if (ctx->digest && ctx->digest->ctx_size) | 200 | if (ctx->digest && ctx->digest->ctx_size) |
| 201 | OPENSSL_free(ctx->md_data); | 201 | free(ctx->md_data); |
| 202 | ctx->digest=type; | 202 | ctx->digest=type; |
| 203 | if (!(ctx->flags & EVP_MD_CTX_FLAG_NO_INIT) && type->ctx_size) | 203 | if (!(ctx->flags & EVP_MD_CTX_FLAG_NO_INIT) && type->ctx_size) |
| 204 | { | 204 | { |
| 205 | ctx->update = type->update; | 205 | ctx->update = type->update; |
| 206 | ctx->md_data=OPENSSL_malloc(type->ctx_size); | 206 | ctx->md_data=malloc(type->ctx_size); |
| 207 | if (ctx->md_data == NULL) | 207 | if (ctx->md_data == NULL) |
| 208 | { | 208 | { |
| 209 | EVPerr(EVP_F_EVP_DIGESTINIT_EX, | 209 | EVPerr(EVP_F_EVP_DIGESTINIT_EX, |
| @@ -298,7 +298,7 @@ int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in) | |||
| 298 | out->md_data = tmp_buf; | 298 | out->md_data = tmp_buf; |
| 299 | else | 299 | else |
| 300 | { | 300 | { |
| 301 | out->md_data=OPENSSL_malloc(out->digest->ctx_size); | 301 | out->md_data=malloc(out->digest->ctx_size); |
| 302 | if (!out->md_data) | 302 | if (!out->md_data) |
| 303 | { | 303 | { |
| 304 | EVPerr(EVP_F_EVP_MD_CTX_COPY_EX,ERR_R_MALLOC_FAILURE); | 304 | EVPerr(EVP_F_EVP_MD_CTX_COPY_EX,ERR_R_MALLOC_FAILURE); |
| @@ -347,7 +347,7 @@ void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx) | |||
| 347 | if (ctx) | 347 | if (ctx) |
| 348 | { | 348 | { |
| 349 | EVP_MD_CTX_cleanup(ctx); | 349 | EVP_MD_CTX_cleanup(ctx); |
| 350 | OPENSSL_free(ctx); | 350 | free(ctx); |
| 351 | } | 351 | } |
| 352 | } | 352 | } |
| 353 | 353 | ||
| @@ -364,7 +364,7 @@ int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx) | |||
| 364 | && !EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_REUSE)) | 364 | && !EVP_MD_CTX_test_flags(ctx, EVP_MD_CTX_FLAG_REUSE)) |
| 365 | { | 365 | { |
| 366 | OPENSSL_cleanse(ctx->md_data,ctx->digest->ctx_size); | 366 | OPENSSL_cleanse(ctx->md_data,ctx->digest->ctx_size); |
| 367 | OPENSSL_free(ctx->md_data); | 367 | free(ctx->md_data); |
| 368 | } | 368 | } |
| 369 | if (ctx->pctx) | 369 | if (ctx->pctx) |
| 370 | EVP_PKEY_CTX_free(ctx->pctx); | 370 | EVP_PKEY_CTX_free(ctx->pctx); |
diff --git a/src/lib/libcrypto/evp/e_aes.c b/src/lib/libcrypto/evp/e_aes.c index c7eaafe89b..d6f0124a94 100644 --- a/src/lib/libcrypto/evp/e_aes.c +++ b/src/lib/libcrypto/evp/e_aes.c | |||
| @@ -679,7 +679,7 @@ static int aes_gcm_cleanup(EVP_CIPHER_CTX *c) | |||
| 679 | EVP_AES_GCM_CTX *gctx = c->cipher_data; | 679 | EVP_AES_GCM_CTX *gctx = c->cipher_data; |
| 680 | OPENSSL_cleanse(&gctx->gcm, sizeof(gctx->gcm)); | 680 | OPENSSL_cleanse(&gctx->gcm, sizeof(gctx->gcm)); |
| 681 | if (gctx->iv != c->iv) | 681 | if (gctx->iv != c->iv) |
| 682 | OPENSSL_free(gctx->iv); | 682 | free(gctx->iv); |
| 683 | return 1; | 683 | return 1; |
| 684 | } | 684 | } |
| 685 | 685 | ||
| @@ -724,8 +724,8 @@ static int aes_gcm_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) | |||
| 724 | if ((arg > EVP_MAX_IV_LENGTH) && (arg > gctx->ivlen)) | 724 | if ((arg > EVP_MAX_IV_LENGTH) && (arg > gctx->ivlen)) |
| 725 | { | 725 | { |
| 726 | if (gctx->iv != c->iv) | 726 | if (gctx->iv != c->iv) |
| 727 | OPENSSL_free(gctx->iv); | 727 | free(gctx->iv); |
| 728 | gctx->iv = OPENSSL_malloc(arg); | 728 | gctx->iv = malloc(arg); |
| 729 | if (!gctx->iv) | 729 | if (!gctx->iv) |
| 730 | return 0; | 730 | return 0; |
| 731 | } | 731 | } |
diff --git a/src/lib/libcrypto/evp/evp_enc.c b/src/lib/libcrypto/evp/evp_enc.c index 50403a7578..e8ca502633 100644 --- a/src/lib/libcrypto/evp/evp_enc.c +++ b/src/lib/libcrypto/evp/evp_enc.c | |||
| @@ -78,7 +78,7 @@ void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx) | |||
| 78 | 78 | ||
| 79 | EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void) | 79 | EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void) |
| 80 | { | 80 | { |
| 81 | EVP_CIPHER_CTX *ctx=OPENSSL_malloc(sizeof *ctx); | 81 | EVP_CIPHER_CTX *ctx=malloc(sizeof *ctx); |
| 82 | if (ctx) | 82 | if (ctx) |
| 83 | EVP_CIPHER_CTX_init(ctx); | 83 | EVP_CIPHER_CTX_init(ctx); |
| 84 | return ctx; | 84 | return ctx; |
| @@ -164,7 +164,7 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *imp | |||
| 164 | ctx->cipher=cipher; | 164 | ctx->cipher=cipher; |
| 165 | if (ctx->cipher->ctx_size) | 165 | if (ctx->cipher->ctx_size) |
| 166 | { | 166 | { |
| 167 | ctx->cipher_data=OPENSSL_malloc(ctx->cipher->ctx_size); | 167 | ctx->cipher_data=malloc(ctx->cipher->ctx_size); |
| 168 | if (!ctx->cipher_data) | 168 | if (!ctx->cipher_data) |
| 169 | { | 169 | { |
| 170 | EVPerr(EVP_F_EVP_CIPHERINIT_EX, ERR_R_MALLOC_FAILURE); | 170 | EVPerr(EVP_F_EVP_CIPHERINIT_EX, ERR_R_MALLOC_FAILURE); |
| @@ -546,7 +546,7 @@ void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx) | |||
| 546 | if (ctx) | 546 | if (ctx) |
| 547 | { | 547 | { |
| 548 | EVP_CIPHER_CTX_cleanup(ctx); | 548 | EVP_CIPHER_CTX_cleanup(ctx); |
| 549 | OPENSSL_free(ctx); | 549 | free(ctx); |
| 550 | } | 550 | } |
| 551 | } | 551 | } |
| 552 | 552 | ||
| @@ -561,7 +561,7 @@ int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *c) | |||
| 561 | OPENSSL_cleanse(c->cipher_data, c->cipher->ctx_size); | 561 | OPENSSL_cleanse(c->cipher_data, c->cipher->ctx_size); |
| 562 | } | 562 | } |
| 563 | if (c->cipher_data) | 563 | if (c->cipher_data) |
| 564 | OPENSSL_free(c->cipher_data); | 564 | free(c->cipher_data); |
| 565 | #ifndef OPENSSL_NO_ENGINE | 565 | #ifndef OPENSSL_NO_ENGINE |
| 566 | if (c->engine) | 566 | if (c->engine) |
| 567 | /* The EVP_CIPHER we used belongs to an ENGINE, release the | 567 | /* 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) | |||
| 644 | 644 | ||
| 645 | if (in->cipher_data && in->cipher->ctx_size) | 645 | if (in->cipher_data && in->cipher->ctx_size) |
| 646 | { | 646 | { |
| 647 | out->cipher_data=OPENSSL_malloc(in->cipher->ctx_size); | 647 | out->cipher_data=malloc(in->cipher->ctx_size); |
| 648 | if (!out->cipher_data) | 648 | if (!out->cipher_data) |
| 649 | { | 649 | { |
| 650 | EVPerr(EVP_F_EVP_CIPHER_CTX_COPY,ERR_R_MALLOC_FAILURE); | 650 | EVPerr(EVP_F_EVP_CIPHER_CTX_COPY,ERR_R_MALLOC_FAILURE); |
diff --git a/src/lib/libcrypto/evp/evp_pbe.c b/src/lib/libcrypto/evp/evp_pbe.c index f8c32d825e..c808b96fef 100644 --- a/src/lib/libcrypto/evp/evp_pbe.c +++ b/src/lib/libcrypto/evp/evp_pbe.c | |||
| @@ -238,7 +238,7 @@ int EVP_PBE_alg_add_type(int pbe_type, int pbe_nid, int cipher_nid, int md_nid, | |||
| 238 | EVP_PBE_CTL *pbe_tmp; | 238 | EVP_PBE_CTL *pbe_tmp; |
| 239 | if (!pbe_algs) | 239 | if (!pbe_algs) |
| 240 | pbe_algs = sk_EVP_PBE_CTL_new(pbe_cmp); | 240 | pbe_algs = sk_EVP_PBE_CTL_new(pbe_cmp); |
| 241 | if (!(pbe_tmp = (EVP_PBE_CTL*) OPENSSL_malloc (sizeof(EVP_PBE_CTL)))) | 241 | if (!(pbe_tmp = (EVP_PBE_CTL*) malloc (sizeof(EVP_PBE_CTL)))) |
| 242 | { | 242 | { |
| 243 | EVPerr(EVP_F_EVP_PBE_ALG_ADD_TYPE,ERR_R_MALLOC_FAILURE); | 243 | EVPerr(EVP_F_EVP_PBE_ALG_ADD_TYPE,ERR_R_MALLOC_FAILURE); |
| 244 | return 0; | 244 | return 0; |
| @@ -306,7 +306,7 @@ int EVP_PBE_find(int type, int pbe_nid, | |||
| 306 | 306 | ||
| 307 | static void free_evp_pbe_ctl(EVP_PBE_CTL *pbe) | 307 | static void free_evp_pbe_ctl(EVP_PBE_CTL *pbe) |
| 308 | { | 308 | { |
| 309 | OPENSSL_freeFunc(pbe); | 309 | free(pbe); |
| 310 | } | 310 | } |
| 311 | 311 | ||
| 312 | void EVP_PBE_cleanup(void) | 312 | void EVP_PBE_cleanup(void) |
diff --git a/src/lib/libcrypto/evp/p_lib.c b/src/lib/libcrypto/evp/p_lib.c index e26ccd0d08..7a9da3487a 100644 --- a/src/lib/libcrypto/evp/p_lib.c +++ b/src/lib/libcrypto/evp/p_lib.c | |||
| @@ -183,7 +183,7 @@ EVP_PKEY *EVP_PKEY_new(void) | |||
| 183 | { | 183 | { |
| 184 | EVP_PKEY *ret; | 184 | EVP_PKEY *ret; |
| 185 | 185 | ||
| 186 | ret=(EVP_PKEY *)OPENSSL_malloc(sizeof(EVP_PKEY)); | 186 | ret=(EVP_PKEY *)malloc(sizeof(EVP_PKEY)); |
| 187 | if (ret == NULL) | 187 | if (ret == NULL) |
| 188 | { | 188 | { |
| 189 | EVPerr(EVP_F_EVP_PKEY_NEW,ERR_R_MALLOC_FAILURE); | 189 | EVPerr(EVP_F_EVP_PKEY_NEW,ERR_R_MALLOC_FAILURE); |
| @@ -405,7 +405,7 @@ void EVP_PKEY_free(EVP_PKEY *x) | |||
| 405 | EVP_PKEY_free_it(x); | 405 | EVP_PKEY_free_it(x); |
| 406 | if (x->attributes) | 406 | if (x->attributes) |
| 407 | sk_X509_ATTRIBUTE_pop_free(x->attributes, X509_ATTRIBUTE_free); | 407 | sk_X509_ATTRIBUTE_pop_free(x->attributes, X509_ATTRIBUTE_free); |
| 408 | OPENSSL_free(x); | 408 | free(x); |
| 409 | } | 409 | } |
| 410 | 410 | ||
| 411 | static void EVP_PKEY_free_it(EVP_PKEY *x) | 411 | static void EVP_PKEY_free_it(EVP_PKEY *x) |
diff --git a/src/lib/libcrypto/evp/p_open.c b/src/lib/libcrypto/evp/p_open.c index c748fbea87..2a5ab2b6cc 100644 --- a/src/lib/libcrypto/evp/p_open.c +++ b/src/lib/libcrypto/evp/p_open.c | |||
| @@ -87,7 +87,7 @@ int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, | |||
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | size=RSA_size(priv->pkey.rsa); | 89 | size=RSA_size(priv->pkey.rsa); |
| 90 | key=(unsigned char *)OPENSSL_malloc(size+2); | 90 | key=(unsigned char *)malloc(size+2); |
| 91 | if (key == NULL) | 91 | if (key == NULL) |
| 92 | { | 92 | { |
| 93 | /* ERROR */ | 93 | /* ERROR */ |
| @@ -106,7 +106,7 @@ int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, | |||
| 106 | ret=1; | 106 | ret=1; |
| 107 | err: | 107 | err: |
| 108 | if (key != NULL) OPENSSL_cleanse(key,size); | 108 | if (key != NULL) OPENSSL_cleanse(key,size); |
| 109 | OPENSSL_free(key); | 109 | free(key); |
| 110 | return(ret); | 110 | return(ret); |
| 111 | } | 111 | } |
| 112 | 112 | ||
diff --git a/src/lib/libcrypto/evp/pmeth_lib.c b/src/lib/libcrypto/evp/pmeth_lib.c index acfa7b6f87..a9fb15fdfe 100644 --- a/src/lib/libcrypto/evp/pmeth_lib.c +++ b/src/lib/libcrypto/evp/pmeth_lib.c | |||
| @@ -165,7 +165,7 @@ static EVP_PKEY_CTX *int_ctx_new(EVP_PKEY *pkey, ENGINE *e, int id) | |||
| 165 | return NULL; | 165 | return NULL; |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | ret = OPENSSL_malloc(sizeof(EVP_PKEY_CTX)); | 168 | ret = malloc(sizeof(EVP_PKEY_CTX)); |
| 169 | if (!ret) | 169 | if (!ret) |
| 170 | { | 170 | { |
| 171 | #ifndef OPENSSL_NO_ENGINE | 171 | #ifndef OPENSSL_NO_ENGINE |
| @@ -200,7 +200,7 @@ static EVP_PKEY_CTX *int_ctx_new(EVP_PKEY *pkey, ENGINE *e, int id) | |||
| 200 | EVP_PKEY_METHOD* EVP_PKEY_meth_new(int id, int flags) | 200 | EVP_PKEY_METHOD* EVP_PKEY_meth_new(int id, int flags) |
| 201 | { | 201 | { |
| 202 | EVP_PKEY_METHOD *pmeth; | 202 | EVP_PKEY_METHOD *pmeth; |
| 203 | pmeth = OPENSSL_malloc(sizeof(EVP_PKEY_METHOD)); | 203 | pmeth = malloc(sizeof(EVP_PKEY_METHOD)); |
| 204 | if (!pmeth) | 204 | if (!pmeth) |
| 205 | return NULL; | 205 | return NULL; |
| 206 | 206 | ||
| @@ -291,7 +291,7 @@ void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src) | |||
| 291 | void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth) | 291 | void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth) |
| 292 | { | 292 | { |
| 293 | if (pmeth && (pmeth->flags & EVP_PKEY_FLAG_DYNAMIC)) | 293 | if (pmeth && (pmeth->flags & EVP_PKEY_FLAG_DYNAMIC)) |
| 294 | OPENSSL_free(pmeth); | 294 | free(pmeth); |
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e) | 297 | EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e) |
| @@ -317,7 +317,7 @@ EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *pctx) | |||
| 317 | return 0; | 317 | return 0; |
| 318 | } | 318 | } |
| 319 | #endif | 319 | #endif |
| 320 | rctx = OPENSSL_malloc(sizeof(EVP_PKEY_CTX)); | 320 | rctx = malloc(sizeof(EVP_PKEY_CTX)); |
| 321 | if (!rctx) | 321 | if (!rctx) |
| 322 | return NULL; | 322 | return NULL; |
| 323 | 323 | ||
| @@ -378,7 +378,7 @@ void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx) | |||
| 378 | * functional reference we held for this reason. */ | 378 | * functional reference we held for this reason. */ |
| 379 | ENGINE_finish(ctx->engine); | 379 | ENGINE_finish(ctx->engine); |
| 380 | #endif | 380 | #endif |
| 381 | OPENSSL_free(ctx); | 381 | free(ctx); |
| 382 | } | 382 | } |
| 383 | 383 | ||
| 384 | int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype, | 384 | int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype, |
