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/ecdh | |
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/ecdh')
-rw-r--r-- | src/regress/lib/libcrypto/ecdh/ecdhtest.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/regress/lib/libcrypto/ecdh/ecdhtest.c b/src/regress/lib/libcrypto/ecdh/ecdhtest.c index bf362245bb..385f6803aa 100644 --- a/src/regress/lib/libcrypto/ecdh/ecdhtest.c +++ b/src/regress/lib/libcrypto/ecdh/ecdhtest.c | |||
@@ -160,14 +160,14 @@ static int test_ecdh_curve(int nid, const char *text, BN_CTX *ctx, BIO *out) | |||
160 | (void)BIO_flush(out); | 160 | (void)BIO_flush(out); |
161 | 161 | ||
162 | alen=KDF1_SHA1_len; | 162 | alen=KDF1_SHA1_len; |
163 | abuf=(unsigned char *)OPENSSL_malloc(alen); | 163 | abuf=malloc(alen); |
164 | aout=ECDH_compute_key(abuf,alen,EC_KEY_get0_public_key(b),a,KDF1_SHA1); | 164 | aout=ECDH_compute_key(abuf,alen,EC_KEY_get0_public_key(b),a,KDF1_SHA1); |
165 | 165 | ||
166 | BIO_printf(out,"."); | 166 | BIO_printf(out,"."); |
167 | (void)BIO_flush(out); | 167 | (void)BIO_flush(out); |
168 | 168 | ||
169 | blen=KDF1_SHA1_len; | 169 | blen=KDF1_SHA1_len; |
170 | bbuf=(unsigned char *)OPENSSL_malloc(blen); | 170 | bbuf=malloc(blen); |
171 | bout=ECDH_compute_key(bbuf,blen,EC_KEY_get0_public_key(a),b,KDF1_SHA1); | 171 | bout=ECDH_compute_key(bbuf,blen,EC_KEY_get0_public_key(a),b,KDF1_SHA1); |
172 | 172 | ||
173 | BIO_printf(out,"."); | 173 | BIO_printf(out,"."); |
@@ -218,8 +218,8 @@ static int test_ecdh_curve(int nid, const char *text, BN_CTX *ctx, BIO *out) | |||
218 | err: | 218 | err: |
219 | ERR_print_errors_fp(stderr); | 219 | ERR_print_errors_fp(stderr); |
220 | 220 | ||
221 | if (abuf != NULL) OPENSSL_free(abuf); | 221 | free(abuf); |
222 | if (bbuf != NULL) OPENSSL_free(bbuf); | 222 | free(bbuf); |
223 | if (x_a) BN_free(x_a); | 223 | if (x_a) BN_free(x_a); |
224 | if (y_a) BN_free(y_a); | 224 | if (y_a) BN_free(y_a); |
225 | if (x_b) BN_free(x_b); | 225 | if (x_b) BN_free(x_b); |
@@ -235,10 +235,6 @@ int main(int argc, char *argv[]) | |||
235 | int ret=1; | 235 | int ret=1; |
236 | BIO *out; | 236 | BIO *out; |
237 | 237 | ||
238 | CRYPTO_malloc_debug_init(); | ||
239 | CRYPTO_dbg_set_options(V_CRYPTO_MDEBUG_ALL); | ||
240 | CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); | ||
241 | |||
242 | out=BIO_new(BIO_s_file()); | 238 | out=BIO_new(BIO_s_file()); |
243 | if (out == NULL) exit(1); | 239 | if (out == NULL) exit(1); |
244 | BIO_set_fp(out,stdout,BIO_NOCLOSE); | 240 | BIO_set_fp(out,stdout,BIO_NOCLOSE); |