diff options
author | beck <> | 2014-04-17 13:37:50 +0000 |
---|---|---|
committer | beck <> | 2014-04-17 13:37:50 +0000 |
commit | bddb7c686e3d1aeb156722adc64b6c35ae720f87 (patch) | |
tree | 7595a93a27385c367802aa17ecf20f96551cf14d /src/lib/libcrypto/bn/bn_exp.c | |
parent | ecec66222d758996a4ff2671ca5026d9ede5ef76 (diff) | |
download | openbsd-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/bn/bn_exp.c')
-rw-r--r-- | src/lib/libcrypto/bn/bn_exp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/bn/bn_exp.c b/src/lib/libcrypto/bn/bn_exp.c index 2abf6fd678..2047e1cc3f 100644 --- a/src/lib/libcrypto/bn/bn_exp.c +++ b/src/lib/libcrypto/bn/bn_exp.c | |||
@@ -636,7 +636,7 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, | |||
636 | powerbufFree = alloca(powerbufLen+MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH); | 636 | powerbufFree = alloca(powerbufLen+MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH); |
637 | else | 637 | else |
638 | #endif | 638 | #endif |
639 | if ((powerbufFree=(unsigned char*)OPENSSL_malloc(powerbufLen+MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH)) == NULL) | 639 | if ((powerbufFree=(unsigned char*)malloc(powerbufLen+MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH)) == NULL) |
640 | goto err; | 640 | goto err; |
641 | 641 | ||
642 | powerbuf = MOD_EXP_CTIME_ALIGN(powerbufFree); | 642 | powerbuf = MOD_EXP_CTIME_ALIGN(powerbufFree); |
@@ -823,7 +823,7 @@ err: | |||
823 | if (powerbuf!=NULL) | 823 | if (powerbuf!=NULL) |
824 | { | 824 | { |
825 | OPENSSL_cleanse(powerbuf,powerbufLen); | 825 | OPENSSL_cleanse(powerbuf,powerbufLen); |
826 | if (powerbufFree) OPENSSL_free(powerbufFree); | 826 | if (powerbufFree) free(powerbufFree); |
827 | } | 827 | } |
828 | BN_CTX_end(ctx); | 828 | BN_CTX_end(ctx); |
829 | return(ret); | 829 | return(ret); |