diff options
author | Matt Caswell <matt@openssl.org> | 2022-09-23 12:59:22 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2022-10-12 15:53:31 +0100 |
commit | 4bf610bdce3b0e474c5ce7db5be77e152f3649b6 (patch) | |
tree | a5ac253df4fe3ca2eba95f48ea846835dc7f9844 /ssl/statem | |
parent | 2f6e24eb5bd6a3ea4c5e18ff003acc4e812b527f (diff) | |
download | openssl-4bf610bdce3b0e474c5ce7db5be77e152f3649b6.tar.gz |
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 <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19343)
Diffstat (limited to 'ssl/statem')
-rw-r--r-- | ssl/statem/statem.c | 3 | ||||
-rw-r--r-- | ssl/statem/statem.h | 10 |
2 files changed, 1 insertions, 12 deletions
diff --git a/ssl/statem/statem.c b/ssl/statem/statem.c index b885214f3c..138bca220c 100644 --- a/ssl/statem/statem.c +++ b/ssl/statem/statem.c @@ -143,8 +143,7 @@ void ossl_statem_send_fatal(SSL_CONNECTION *s, int al) return; ossl_statem_set_in_init(s, 1); s->statem.state = MSG_FLOW_ERROR; - if (al != SSL_AD_NO_ALERT - && s->statem.enc_write_state != ENC_WRITE_STATE_INVALID) + if (al != SSL_AD_NO_ALERT) ssl3_send_alert(s, SSL3_AL_FATAL, al); } diff --git a/ssl/statem/statem.h b/ssl/statem/statem.h index 28ef97922e..167e8a12bf 100644 --- a/ssl/statem/statem.h +++ b/ssl/statem/statem.h @@ -72,15 +72,6 @@ typedef enum { } WRITE_STATE; typedef enum { - /* The enc_write_ctx can be used normally */ - ENC_WRITE_STATE_VALID, - /* The enc_write_ctx cannot be used */ - ENC_WRITE_STATE_INVALID, - /* Write alerts in plaintext, but otherwise use the enc_write_ctx */ - ENC_WRITE_STATE_WRITE_PLAIN_ALERTS -} ENC_WRITE_STATES; - -typedef enum { CON_FUNC_ERROR = 0, CON_FUNC_SUCCESS, CON_FUNC_DONT_SEND @@ -115,7 +106,6 @@ struct ossl_statem_st { /* Should we skip the CertificateVerify message? */ unsigned int no_cert_verify; int use_timer; - ENC_WRITE_STATES enc_write_state; }; typedef struct ossl_statem_st OSSL_STATEM; |