summaryrefslogtreecommitdiff
path: root/ssl/statem
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2022-10-31 16:04:08 +0000
committerHugo Landau <hlandau@openssl.org>2022-11-14 07:51:17 +0000
commitf471f60a8adcbb72314be974f6bc320943786b96 (patch)
tree1e40179e21a4fd67a52b5081c9cab9bc457614a2 /ssl/statem
parent1e065a15119520e13a2d68d003c4c06869208a32 (diff)
downloadopenssl-new-f471f60a8adcbb72314be974f6bc320943786b96.tar.gz
Remove remaining refs to enc_(write|read)_ctx/(read|write)_hash
Those fields are no longer used. Their previous function is now in the new record layer. Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19586)
Diffstat (limited to 'ssl/statem')
-rw-r--r--ssl/statem/statem_clnt.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/ssl/statem/statem_clnt.c b/ssl/statem/statem_clnt.c
index 402654b7a4..4114131435 100644
--- a/ssl/statem/statem_clnt.c
+++ b/ssl/statem/statem_clnt.c
@@ -1785,11 +1785,21 @@ static MSG_PROCESS_RETURN tls_process_as_hello_retry_request(SSL_CONNECTION *s,
RAW_EXTENSION *extensions = NULL;
/*
- * If we were sending early_data then the enc_write_ctx is now invalid and
- * should not be used.
+ * If we were sending early_data then any alerts should not be sent using
+ * the old wrlmethod.
*/
- EVP_CIPHER_CTX_free(s->enc_write_ctx);
- s->enc_write_ctx = NULL;
+ if (s->early_data_state == SSL_EARLY_DATA_FINISHED_WRITING
+ && !ssl_set_new_record_layer(s,
+ TLS_ANY_VERSION,
+ OSSL_RECORD_DIRECTION_WRITE,
+ OSSL_RECORD_PROTECTION_LEVEL_NONE,
+ NULL, 0, NULL, 0, NULL, 0, NULL, 0,
+ NID_undef, NULL, NULL)) {
+ /* SSLfatal already called */
+ goto err;
+ }
+ /* We are definitely going to be using TLSv1.3 */
+ s->rlayer.wrlmethod->set_protocol_version(s->rlayer.wrl, TLS1_3_VERSION);
if (!tls_collect_extensions(s, extpkt, SSL_EXT_TLS1_3_HELLO_RETRY_REQUEST,
&extensions, NULL, 1)