From 651216dd54199c64bf9afd1256bbdde3990e1dfc Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Fri, 20 May 2022 16:58:51 +0100 Subject: [PATCH] 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) --- ssl/record/methods/tls_common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; } /* -- 2.47.2