diff options
author | beck <> | 2014-05-24 13:57:18 +0000 |
---|---|---|
committer | beck <> | 2014-05-24 13:57:18 +0000 |
commit | cae65df81b69f410afddb3d880daac7c43ce3daf (patch) | |
tree | deb94273e62c0be2f39f578173b1232887e77c64 /src/regress/lib/libcrypto/ec/ectest.c | |
parent | 4eb4d7bb8c263141ef39d6b0ad13ef197e422063 (diff) | |
download | openbsd-cae65df81b69f410afddb3d880daac7c43ce3daf.tar.gz openbsd-cae65df81b69f410afddb3d880daac7c43ce3daf.tar.bz2 openbsd-cae65df81b69f410afddb3d880daac7c43ce3daf.zip |
remove OPENSSL_malloc and CRYPTO_malloc goo from the regress tests.
ok miod@ jsing@ guenther@
Diffstat (limited to 'src/regress/lib/libcrypto/ec/ectest.c')
-rw-r--r-- | src/regress/lib/libcrypto/ec/ectest.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/src/regress/lib/libcrypto/ec/ectest.c b/src/regress/lib/libcrypto/ec/ectest.c index e3028881e0..efb9a529ef 100644 --- a/src/regress/lib/libcrypto/ec/ectest.c +++ b/src/regress/lib/libcrypto/ec/ectest.c | |||
@@ -1070,14 +1070,14 @@ static void internal_curve_test(void) | |||
1070 | 1070 | ||
1071 | crv_len = EC_get_builtin_curves(NULL, 0); | 1071 | crv_len = EC_get_builtin_curves(NULL, 0); |
1072 | 1072 | ||
1073 | curves = OPENSSL_malloc(sizeof(EC_builtin_curve) * crv_len); | 1073 | curves = reallocarray(NULL, sizeof(EC_builtin_curve), crv_len); |
1074 | 1074 | ||
1075 | if (curves == NULL) | 1075 | if (curves == NULL) |
1076 | return; | 1076 | return; |
1077 | 1077 | ||
1078 | if (!EC_get_builtin_curves(curves, crv_len)) | 1078 | if (!EC_get_builtin_curves(curves, crv_len)) |
1079 | { | 1079 | { |
1080 | OPENSSL_free(curves); | 1080 | free(curves); |
1081 | return; | 1081 | return; |
1082 | } | 1082 | } |
1083 | 1083 | ||
@@ -1115,7 +1115,7 @@ static void internal_curve_test(void) | |||
1115 | fprintf(stdout, " failed\n\n"); | 1115 | fprintf(stdout, " failed\n\n"); |
1116 | ABORT; | 1116 | ABORT; |
1117 | } | 1117 | } |
1118 | OPENSSL_free(curves); | 1118 | free(curves); |
1119 | return; | 1119 | return; |
1120 | } | 1120 | } |
1121 | 1121 | ||
@@ -1289,20 +1289,7 @@ void nistp_tests() | |||
1289 | #endif | 1289 | #endif |
1290 | 1290 | ||
1291 | int main(int argc, char *argv[]) | 1291 | int main(int argc, char *argv[]) |
1292 | { | 1292 | { |
1293 | |||
1294 | /* enable memory leak checking unless explicitly disabled */ | ||
1295 | if (!((getenv("OPENSSL_DEBUG_MEMORY") != NULL) && (0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off")))) | ||
1296 | { | ||
1297 | CRYPTO_malloc_debug_init(); | ||
1298 | CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL); | ||
1299 | } | ||
1300 | else | ||
1301 | { | ||
1302 | /* OPENSSL_DEBUG_MEMORY=off */ | ||
1303 | CRYPTO_set_mem_debug_functions(0, 0, 0, 0, 0); | ||
1304 | } | ||
1305 | CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); | ||
1306 | ERR_load_crypto_strings(); | 1293 | ERR_load_crypto_strings(); |
1307 | 1294 | ||
1308 | prime_field_tests(); | 1295 | prime_field_tests(); |