From: Matt Caswell Date: Tue, 25 Apr 2023 13:04:06 +0000 (+0100) Subject: Ensure that the SSL_rstate_string*() API works as they used to X-Git-Tag: openssl-3.2.0-alpha1~958 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73bac6e28014bfecc322c67aa8b09077e34da299;p=thirdparty%2Fopenssl.git Ensure that the SSL_rstate_string*() API works as they used to 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 Reviewed-by: Hugo Landau (Merged from https://github.com/openssl/openssl/pull/20827) --- diff --git a/ssl/record/methods/tls_common.c b/ssl/record/methods/tls_common.c index a93bd91daf4..4cfeddca431 100644 --- a/ssl/record/methods/tls_common.c +++ b/ssl/record/methods/tls_common.c @@ -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;