]> git.ipfire.org Git - thirdparty/openssl.git/commit
Correct ssl_old_test stream handling
authorMatt Caswell <matt@openssl.org>
Wed, 3 Jan 2024 09:43:16 +0000 (09:43 +0000)
committerTomas Mraz <tomas@openssl.org>
Fri, 5 Jan 2024 11:13:40 +0000 (12:13 +0100)
commit0e16c4ba2f65eddfd368cb95480849150db9368f
tree9317c2e8c7176ac3dd0aae752dc88ea460c7e13f
parentb4200aaf701d4a521b17fd0f20b38f96f5a46637
Correct ssl_old_test stream handling

The ssl_old_test has not been fully converted to the test framework but
it still reuses some test framework utilities. Notably it was creating
it's own copy of the global bio_err object directly (which is normally
created and owned by the test framework). This causes a problem because
ever since commit 2fa9044 access to the bio_err object is controlled by
a lock. Since ssl_old_test was circumventing the normal creation and
destruction of bio_err, the lock was not being created resulting in a
crash under certain error conditions.

We fix this by creating and destroying the bio_err object using the
test framework functions designed for that purpose.

Fixes #23184

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23187)

(cherry picked from commit 2995be50e8c2f2ef907866e35347be1e200558a2)
test/ssl_old_test.c