]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Ensure that the SSL_rstate_string*() API works as they used to
authorMatt Caswell <matt@openssl.org>
Tue, 25 Apr 2023 13:04:06 +0000 (14:04 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 27 Apr 2023 16:03:33 +0000 (17:03 +0100)
We initialise the record layer rstate variable to ensure the
SSL_rstate_string*() APIs return values that are consistent with
previous versions.

Fixes #20808

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20827)

ssl/record/methods/tls_common.c

index a93bd91daf4e6753417d38c3601adef6256cb908..4cfeddca431bc9eaa5c241484b55fa649726c0f4 100644 (file)
@@ -1296,6 +1296,7 @@ tls_int_new_record_layer(OSSL_LIB_CTX *libctx, const char *propq, int vers,
     rl->md = md;
 
     rl->alert = SSL_AD_NO_ALERT;
+    rl->rstate = SSL_ST_READ_HEADER;
 
     if (level == OSSL_RECORD_PROTECTION_LEVEL_NONE)
         rl->is_first_record = 1;