diff options
| author | jsing <> | 2026-06-06 15:28:14 +0000 |
|---|---|---|
| committer | jsing <> | 2026-06-06 15:28:14 +0000 |
| commit | b58b2de9589eccdf473227aee5cb374998f0bf08 (patch) | |
| tree | cd47e9613644256309f0168da535cc9eaf8bc3a2 /src | |
| parent | 34bb3178dc6005cb170c6f002dfd49e503c94bf8 (diff) | |
| download | openbsd-b58b2de9589eccdf473227aee5cb374998f0bf08.tar.gz openbsd-b58b2de9589eccdf473227aee5cb374998f0bf08.tar.bz2 openbsd-b58b2de9589eccdf473227aee5cb374998f0bf08.zip | |
Correctly handle failure to buffer DTLS messages.
If we fail to buffer an outgoing DTLS message, we're not going to be able
to retransmit it. Correctly propagate the failure.
ok kenjiro@ tb@
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libssl/d1_both.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/libssl/d1_both.c b/src/lib/libssl/d1_both.c index 1e87d9e652..d3742cbd12 100644 --- a/src/lib/libssl/d1_both.c +++ b/src/lib/libssl/d1_both.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: d1_both.c,v 1.96 2026/06/06 15:24:26 jsing Exp $ */ | 1 | /* $OpenBSD: d1_both.c,v 1.97 2026/06/06 15:28:14 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * DTLS implementation written by Nagendra Modadugu | 3 | * DTLS implementation written by Nagendra Modadugu |
| 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. |
| @@ -1171,7 +1171,8 @@ dtls12_ccs_built(SSL *s) | |||
| 1171 | dtls1_set_message_header_int(s, SSL3_MT_CCS, 0, | 1171 | dtls1_set_message_header_int(s, SSL3_MT_CCS, 0, |
| 1172 | s->d1->handshake_write_seq, 0, 0); | 1172 | s->d1->handshake_write_seq, 0, 0); |
| 1173 | 1173 | ||
| 1174 | dtls1_buffer_message(s, 1); | 1174 | if (!dtls1_buffer_message(s, 1)) |
| 1175 | return 0; | ||
| 1175 | 1176 | ||
| 1176 | return 1; | 1177 | return 1; |
| 1177 | } | 1178 | } |
| @@ -1196,7 +1197,8 @@ dtls12_handshake_msg_built(SSL *s) | |||
| 1196 | 1197 | ||
| 1197 | dtls1_set_message_header(s, msg_type, len, 0, len); | 1198 | dtls1_set_message_header(s, msg_type, len, 0, len); |
| 1198 | 1199 | ||
| 1199 | dtls1_buffer_message(s, 0); | 1200 | if (!dtls1_buffer_message(s, 0)) |
| 1201 | return 0; | ||
| 1200 | 1202 | ||
| 1201 | return 1; | 1203 | return 1; |
| 1202 | } | 1204 | } |
