diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libssl/tls13_record_layer.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/libssl/tls13_record_layer.c b/src/lib/libssl/tls13_record_layer.c index 8208ae508c..5487e005e4 100644 --- a/src/lib/libssl/tls13_record_layer.c +++ b/src/lib/libssl/tls13_record_layer.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls13_record_layer.c,v 1.11 2019/11/17 17:20:16 jsing Exp $ */ | 1 | /* $OpenBSD: tls13_record_layer.c,v 1.12 2019/11/17 18:27:16 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -530,6 +530,9 @@ tls13_record_layer_open_record_protected(struct tls13_record_layer *rl) | |||
530 | static int | 530 | static int |
531 | tls13_record_layer_open_record(struct tls13_record_layer *rl) | 531 | tls13_record_layer_open_record(struct tls13_record_layer *rl) |
532 | { | 532 | { |
533 | if (rl->handshake_completed && rl->aead == NULL) | ||
534 | return 0; | ||
535 | |||
533 | if (rl->aead == NULL) | 536 | if (rl->aead == NULL) |
534 | return tls13_record_layer_open_record_plaintext(rl); | 537 | return tls13_record_layer_open_record_plaintext(rl); |
535 | 538 | ||
@@ -686,6 +689,9 @@ static int | |||
686 | tls13_record_layer_seal_record(struct tls13_record_layer *rl, | 689 | tls13_record_layer_seal_record(struct tls13_record_layer *rl, |
687 | uint8_t content_type, const uint8_t *content, size_t content_len) | 690 | uint8_t content_type, const uint8_t *content, size_t content_len) |
688 | { | 691 | { |
692 | if (rl->handshake_completed && rl->aead == NULL) | ||
693 | return 0; | ||
694 | |||
689 | tls13_record_layer_wrec_free(rl); | 695 | tls13_record_layer_wrec_free(rl); |
690 | 696 | ||
691 | if ((rl->wrec = tls13_record_new()) == NULL) | 697 | if ((rl->wrec = tls13_record_new()) == NULL) |