[openssl/openssl] f68283: test/evp_test.c: Check too big output buffer sizes...

Richard Levitte noreply at reply.github.openssl.org
Wed Jun 15 13:21:09 UTC 2022


  Branch: refs/heads/master
  Home:   https://github.openssl.org/openssl/openssl
  Commit: f68283c18eaf015e7500e59a6adf3dbb3ee74f59
      https://github.openssl.org/openssl/openssl/commit/f68283c18eaf015e7500e59a6adf3dbb3ee74f59
  Author: Richard Levitte <levitte at openssl.org>
  Date:   2022-06-15 (Wed, 15 Jun 2022)

  Changed paths:
    M test/evp_test.c

  Log Message:
  -----------
  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 at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18533)

(cherry picked from commit a0587aaeff7391b8cf4ee4c6a233d0f4dca7d62f)


  Commit: 0feb138fbeeec9ae09e63b212a0a6e345ed0dc30
      https://github.openssl.org/openssl/openssl/commit/0feb138fbeeec9ae09e63b212a0a6e345ed0dc30
  Author: Richard Levitte <levitte at openssl.org>
  Date:   2022-06-15 (Wed, 15 Jun 2022)

  Changed paths:
    M providers/implementations/exchange/kdf_exch.c

  Log Message:
  -----------
  providers/implementations/exchange/kdf_exch.c: Fix kdf_derive()

kdf_derive() calls EVP_KDF_derive(), but didn't do enough to adapt its input
buffer length arguments to fit the requirements to call EVP_KDF_derive().

Fixes #18517

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

(cherry picked from commit e906eab8d863ac7bdadc671e8d0686fead88c4bf)


Compare: https://github.openssl.org/openssl/openssl/compare/46c1c2d7fa91...0feb138fbeee


More information about the openssl-commits mailing list