summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/e_aes.c
diff options
context:
space:
mode:
authorbeck <>2014-04-17 13:37:50 +0000
committerbeck <>2014-04-17 13:37:50 +0000
commitbddb7c686e3d1aeb156722adc64b6c35ae720f87 (patch)
tree7595a93a27385c367802aa17ecf20f96551cf14d /src/lib/libcrypto/evp/e_aes.c
parentecec66222d758996a4ff2671ca5026d9ede5ef76 (diff)
downloadopenbsd-bddb7c686e3d1aeb156722adc64b6c35ae720f87.tar.gz
openbsd-bddb7c686e3d1aeb156722adc64b6c35ae720f87.tar.bz2
openbsd-bddb7c686e3d1aeb156722adc64b6c35ae720f87.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/e_aes.c')
-rw-r--r--src/lib/libcrypto/evp/e_aes.c6
1 files changed, 3 insertions, 3 deletions
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 }