openssl 3.0.14 breaks tests
Summary
Openssl 3.0.14 has recently changed the way EVP_PKEY_CTX_add1_hkdf_info works and now it causes a build failure here: https://gitlab.torproject.org/tpo/core/tor/-/blob/main/src/lib/crypt_ops/crypto_hkdf.c?ref_type=heads#L102
Here is the openssl change on the openssl-3.0 branch that breaks the build: https://github.com/openssl/openssl/commit/4953ab1aefd14db7038e28d62c0e3efb22ddb199
Steps to reproduce:
- Update to HEAD of openssl-3.0 branch
- make test
- error is shown in hkdf_sha256_testvecs
What is the current bug behavior?
Test failure
What is the expected behavior?
Run tests without errors
Environment
- Using tor-0.4.8.11 tag
- OS used to build package is Ubuntu 18.04
- Built tor package from latest source on release-0.4.8 branch
Relevant logs and/or screenshots
crypto/hkdf_sha256_testvecs: Apr 11 20:35:00.279 [err] tor_assertion_failed_(): Bug: ../src/lib/crypt_ops/crypto_hkdf.c:103: crypto_expand_key_material_rfc5869_sha256_openssl: Assertion r == 1 failed; aborting. (on Tor 0.4.8.11-dev 5a85290a35d2a7bd) Apr 11 20:35:00.279 [err] Bug: Tor 0.4.8.11-dev (git-5a85290a35d2a7bd): Assertion r == 1 failed in crypto_expand_key_material_rfc5869_sha256_openssl at ../src/lib/crypt_ops/crypto_hkdf.c:103: . Stack trace: (on Tor 0.4.8.11-dev 5a85290a35d2a7bd) Apr 11 20:35:00.279 [err] Bug: ./src/test/test(log_backtrace_impl+0x56) [0x556a10de0776] (on Tor 0.4.8.11-dev 5a85290a35d2a7bd) Apr 11 20:35:00.279 [err] Bug: ./src/test/test(tor_assertion_failed_+0x147) [0x556a10deeaa7] (on Tor 0.4.8.11-dev 5a85290a35d2a7bd) Apr 11 20:35:00.279 [err] Bug: ./src/test/test(crypto_expand_key_material_rfc5869_sha256+0x1a7) [0x556a10dd4077] (on Tor 0.4.8.11-dev 5a85290a35d2a7bd) Apr 11 20:35:00.279 [err] Bug: ./src/test/test(+0x1ef847) [0x556a109ef847] (on Tor 0.4.8.11-dev 5a85290a35d2a7bd) Apr 11 20:35:00.279 [err] Bug: ./src/test/test(+0x4460b6) [0x556a10c460b6] (on Tor 0.4.8.11-dev 5a85290a35d2a7bd) Apr 11 20:35:00.279 [err] Bug: ./src/test/test(testcase_run_one+0x83) [0x556a10c46193] (on Tor 0.4.8.11-dev 5a85290a35d2a7bd) Apr 11 20:35:00.279 [err] Bug: ./src/test/test(tinytest_main+0x10c) [0x556a10c469bc] (on Tor 0.4.8.11-dev 5a85290a35d2a7bd) Apr 11 20:35:00.279 [err] Bug: ./src/test/test(main+0x44f) [0x556a1089ea8f] (on Tor 0.4.8.11-dev 5a85290a35d2a7bd) Apr 11 20:35:00.279 [err] Bug: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f5f1b1eac87] (on Tor 0.4.8.11-dev 5a85290a35d2a7bd) Apr 11 20:35:00.279 [err] Bug: ./src/test/test(_start+0x2a) [0x556a1089ec7a] (on Tor 0.4.8.11-dev 5a85290a35d2a7bd) Makefile:23375: recipe for target 'test' failed