From 4bf610bdce3b0e474c5ce7db5be77e152f3649b6 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Fri, 23 Sep 2022 12:59:22 +0100 Subject: Remove enc_write_state This field was used to track whether a cipher ctx was valid for writing or not, and also whether we should write out plaintext alerts. With the new record layer design we no longer need to track whether a cipher ctx is valid since the whole record layer will be aborted if it is not. Also we have a different mechanism for tracking whether we should write out plaintext alerts. Therefore this field is removed from the SSL object. Reviewed-by: Hugo Landau Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/19343) --- ssl/s3_enc.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'ssl/s3_enc.c') diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c index 26471c3784..67123c7372 100644 --- a/ssl/s3_enc.c +++ b/ssl/s3_enc.c @@ -143,9 +143,6 @@ int ssl3_change_cipher_state(SSL_CONNECTION *s, int which) goto err; } - if ((which & SSL3_CC_WRITE) != 0) - s->statem.enc_write_state = ENC_WRITE_STATE_INVALID; - if (!ssl_set_new_record_layer(s, SSL3_VERSION, direction, OSSL_RECORD_PROTECTION_LEVEL_APPLICATION, @@ -155,7 +152,6 @@ int ssl3_change_cipher_state(SSL_CONNECTION *s, int which) goto err; } - s->statem.enc_write_state = ENC_WRITE_STATE_VALID; return 1; err: return 0; -- cgit v1.2.3