diff options
| author | jsing <> | 2020-08-02 07:33:15 +0000 |
|---|---|---|
| committer | jsing <> | 2020-08-02 07:33:15 +0000 |
| commit | 59487ec2a7eb6c7372b491b9191727c1f471598d (patch) | |
| tree | 648614eca61abf8dd8fd8cdfff2634a209e3f694 /src/lib/libssl/ssl_pkt.c | |
| parent | 2ce291e2b55d3fcbf2c75812e85cfc999679a64a (diff) | |
| download | openbsd-59487ec2a7eb6c7372b491b9191727c1f471598d.tar.gz openbsd-59487ec2a7eb6c7372b491b9191727c1f471598d.tar.bz2 openbsd-59487ec2a7eb6c7372b491b9191727c1f471598d.zip | |
Check the return value of tls1_enc() in the write path.
The write path can return a failure in the AEAD path and there is no reason
not to check a return value.
Spotted by tb@ during another review.
ok tb@
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/ssl_pkt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libssl/ssl_pkt.c b/src/lib/libssl/ssl_pkt.c index 6bb722098a..39ce46381d 100644 --- a/src/lib/libssl/ssl_pkt.c +++ b/src/lib/libssl/ssl_pkt.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl_pkt.c,v 1.27 2020/08/01 16:50:16 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_pkt.c,v 1.28 2020/08/02 07:33:15 jsing Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -674,8 +674,8 @@ ssl3_create_record(SSL *s, unsigned char *p, uint16_t version, uint8_t type, | |||
| 674 | wr->input = p; | 674 | wr->input = p; |
| 675 | wr->length += eivlen; | 675 | wr->length += eivlen; |
| 676 | 676 | ||
| 677 | /* tls1_enc can only have an error on read */ | 677 | if (tls1_enc(s, 1) != 1) |
| 678 | tls1_enc(s, 1); | 678 | goto err; |
| 679 | 679 | ||
| 680 | /* record length after mac and block padding */ | 680 | /* record length after mac and block padding */ |
| 681 | if (!CBB_add_u16(&cbb, wr->length)) | 681 | if (!CBB_add_u16(&cbb, wr->length)) |
