]> git.ipfire.org Git - thirdparty/openssl.git/commit
test/evp_test.c: Check too big output buffer sizes in PKEYKDF tests
authorRichard Levitte <levitte@openssl.org>
Sun, 12 Jun 2022 04:03:50 +0000 (06:03 +0200)
committerRichard Levitte <levitte@openssl.org>
Wed, 15 Jun 2022 13:17:39 +0000 (15:17 +0200)
commita0587aaeff7391b8cf4ee4c6a233d0f4dca7d62f
treebc4795b85bacfb447d0b22dd178f95f5f828b815
parent76a597c512a055556a5033c69ce02d6330e8a2af
test/evp_test.c: Check too big output buffer sizes in PKEYKDF tests

EVP_PKEY_derive() should be able to cope with a too big buffer for fixed
size outputs.  However, we don't test that.

This change modifies the PKEYKDF tests to ask EVP_PKEY_derive() what the
desired output buffer size is, and as long as the returned value isn't
absurd (indicating that anything goes), the output buffer is made to be
twice as big as what is expected.

Tests #18517

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18533)
test/evp_test.c