Skip to content

Commit

Permalink
Ensure that the SSL_rstate_string*() API works as they used to
Browse files Browse the repository at this point in the history
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 #20827)
  • Loading branch information
mattcaswell committed Apr 27, 2023
1 parent 79ee017 commit 73bac6e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ssl/record/methods/tls_common.c
Expand Up @@ -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;
Expand Down

0 comments on commit 73bac6e

Please sign in to comment.