summaryrefslogtreecommitdiffstats
path: root/ssl/record
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/record
parent1e065a15119520e13a2d68d003c4c06869208a32 (diff)
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/record')
-rw-r--r--ssl/record/rec_layer_d1.c4
-rw-r--r--ssl/record/rec_layer_s3.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/ssl/record/rec_layer_d1.c b/ssl/record/rec_layer_d1.c
index 3a1c2f8e66..729f1a16e2 100644
--- a/ssl/record/rec_layer_d1.c
+++ b/ssl/record/rec_layer_d1.c
@@ -318,8 +318,8 @@ int dtls1_read_bytes(SSL *s, int type, int *recvd_type, unsigned char *buf,
* make sure that we are not getting application data when we are
* doing a handshake for the first time
*/
- if (SSL_in_init(s) && (type == SSL3_RT_APPLICATION_DATA) &&
- (sc->enc_read_ctx == NULL)) {
+ if (SSL_in_init(s) && (type == SSL3_RT_APPLICATION_DATA)
+ && (SSL_IS_FIRST_HANDSHAKE(sc))) {
SSLfatal(sc, SSL_AD_UNEXPECTED_MESSAGE,
SSL_R_APP_DATA_IN_HANDSHAKE);
return -1;
diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c
index 2de466ac5b..32bd7cf7c2 100644
--- a/ssl/record/rec_layer_s3.c
+++ b/ssl/record/rec_layer_s3.c
@@ -622,7 +622,7 @@ int ssl3_read_bytes(SSL *ssl, int type, int *recvd_type, unsigned char *buf,
* doing a handshake for the first time
*/
if (SSL_in_init(ssl) && type == SSL3_RT_APPLICATION_DATA
- && s->enc_read_ctx == NULL) {
+ && SSL_IS_FIRST_HANDSHAKE(s)) {
SSLfatal(s, SSL_AD_UNEXPECTED_MESSAGE, SSL_R_APP_DATA_IN_HANDSHAKE);
return -1;
}