diff options
author | bcook <> | 2014-07-08 17:44:51 +0000 |
---|---|---|
committer | bcook <> | 2014-07-08 17:44:51 +0000 |
commit | e33a7b682ca6685f716692c1960473af4ac7747b (patch) | |
tree | 6a1b2f91cbac4230310348a991d97e094d343dcd | |
parent | 47cdcd13ec3b3ad445c0834e7ba8042f6e58640b (diff) | |
download | openbsd-e33a7b682ca6685f716692c1960473af4ac7747b.tar.gz openbsd-e33a7b682ca6685f716692c1960473af4ac7747b.tar.bz2 openbsd-e33a7b682ca6685f716692c1960473af4ac7747b.zip |
remove use of internally-deprecated OPENSSL_malloc/free
ok jsing@
-rw-r--r-- | src/regress/lib/libcrypto/ecdh/ecdhtest.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/regress/lib/libcrypto/ecdh/ecdhtest.c b/src/regress/lib/libcrypto/ecdh/ecdhtest.c index 620424dbdb..d6cb61d460 100644 --- a/src/regress/lib/libcrypto/ecdh/ecdhtest.c +++ b/src/regress/lib/libcrypto/ecdh/ecdhtest.c | |||
@@ -358,7 +358,7 @@ static int ecdh_kat(BIO *out, const char *cname, int nid, | |||
358 | Ztmplen = (EC_GROUP_get_degree(EC_KEY_get0_group(key1)) + 7)/8; | 358 | Ztmplen = (EC_GROUP_get_degree(EC_KEY_get0_group(key1)) + 7)/8; |
359 | if (Ztmplen != Zlen) | 359 | if (Ztmplen != Zlen) |
360 | goto err; | 360 | goto err; |
361 | Ztmp = OPENSSL_malloc(Ztmplen); | 361 | Ztmp = malloc(Ztmplen); |
362 | if (!ECDH_compute_key(Ztmp, Ztmplen, | 362 | if (!ECDH_compute_key(Ztmp, Ztmplen, |
363 | EC_KEY_get0_public_key(key2), key1, 0)) | 363 | EC_KEY_get0_public_key(key2), key1, 0)) |
364 | goto err; | 364 | goto err; |
@@ -376,8 +376,7 @@ static int ecdh_kat(BIO *out, const char *cname, int nid, | |||
376 | EC_KEY_free(key1); | 376 | EC_KEY_free(key1); |
377 | if (key2) | 377 | if (key2) |
378 | EC_KEY_free(key2); | 378 | EC_KEY_free(key2); |
379 | if (Ztmp) | 379 | free(Ztmp); |
380 | OPENSSL_free(Ztmp); | ||
381 | if (rv) | 380 | if (rv) |
382 | BIO_puts(out, " ok\n"); | 381 | BIO_puts(out, " ok\n"); |
383 | else | 382 | else |