summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-01-09 21:37:32 +0100
committerRichard Levitte <levitte@openssl.org>2020-01-19 02:47:46 +0100
commit0a054d2a0b1ccab07587185245455093454fe353 (patch)
tree639c462a4228fb3ee2342d4d1b54cc86ceb18b57 /test
parented5cb1776b4759b745984c0c67c2d6453345c0a1 (diff)
APPS & TEST: Eliminate as much use of EVP_PKEY_size() as possible
Some uses were going against documented recommendations. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10798)
Diffstat (limited to 'test')
-rw-r--r--test/evp_extra_test.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/test/evp_extra_test.c b/test/evp_extra_test.c
index e7e73cd150..5f2bcc1a51 100644
--- a/test/evp_extra_test.c
+++ b/test/evp_extra_test.c
@@ -582,10 +582,7 @@ static int test_EVP_DigestSignInit(int tst)
/* Determine the size of the signature. */
if (!TEST_true(EVP_DigestSignFinal(md_ctx, NULL, &sig_len))
- || !TEST_size_t_le(sig_len, (size_t)EVP_PKEY_size(pkey)))
- goto out;
-
- if (!TEST_ptr(sig = OPENSSL_malloc(sig_len))
+ || !TEST_ptr(sig = OPENSSL_malloc(sig_len))
|| !TEST_true(EVP_DigestSignFinal(md_ctx, sig, &sig_len)))
goto out;
@@ -919,9 +916,6 @@ static int test_EVP_SM2(void)
if (!TEST_true(EVP_DigestSignFinal(md_ctx, NULL, &sig_len)))
goto done;
- if (!TEST_size_t_eq(sig_len, (size_t)EVP_PKEY_size(pkey)))
- goto done;
-
if (!TEST_ptr(sig = OPENSSL_malloc(sig_len)))
goto done;