From: Matt Caswell Date: Fri, 20 May 2022 15:58:51 +0000 (+0100) Subject: Remove use of ossl_statem_in_error() from the record layer X-Git-Tag: openssl-3.2.0-alpha1~2234 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=651216dd54199c64bf9afd1256bbdde3990e1dfc;p=thirdparty%2Fopenssl.git Remove use of ossl_statem_in_error() from the record layer We remove the dependency on the SSL object. Instead we check if the record layer has already set an alert code. Reviewed-by: Hugo Landau Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/18132) --- diff --git a/ssl/record/methods/tls_common.c b/ssl/record/methods/tls_common.c index f5d51ef6979..83111270039 100644 --- a/ssl/record/methods/tls_common.c +++ b/ssl/record/methods/tls_common.c @@ -703,8 +703,8 @@ static int tls_get_more_records(OSSL_RECORD_LAYER *rl, * 1: Success or MTE decryption failed (MAC will be randomised) */ if (enc_err == 0) { - if (ossl_statem_in_error(s)) { - /* SSLfatal() already got called */ + if (rl->alert != 0) { + /* RLAYERfatal() already got called */ goto end; } if (num_recs == 1 && ossl_statem_skip_early_data(s)) { @@ -759,8 +759,8 @@ static int tls_get_more_records(OSSL_RECORD_LAYER *rl, } if (enc_err == 0) { - if (ossl_statem_in_error(s)) { - /* We already called SSLfatal() */ + if (rl->alert != 0) { + /* We already called RLAYERfatal() */ goto end; } /*