]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Remove use of ossl_statem_in_error() from the record layer
authorMatt Caswell <matt@openssl.org>
Fri, 20 May 2022 15:58:51 +0000 (16:58 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 18 Aug 2022 15:38:12 +0000 (16:38 +0100)
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 <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18132)

ssl/record/methods/tls_common.c

index f5d51ef6979f417949acb977355f63f2a386508d..83111270039a7aab4e7fe0202a42eb33af1fe17f 100644 (file)
@@ -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;
         }
         /*