summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2021-02-08 17:17:03 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2021-02-08 17:17:03 +0000
commit2d0b8e7ac75a09697cad074696855dd58e8d6246 (patch)
treeb5cb1f4d0f19d0e236b6bd309eb3eb9cf7b6209e /lib
parent641893ac21259a64f97e2409bc0e608eb9d69cfd (diff)
Use dtls1_retrieve_buffered_record() to load buffered application data.
Replace the current copy of dtls1_retrieve_buffered_record() with a call to it instead. ok tb@
Diffstat (limited to 'lib')
-rw-r--r--lib/libssl/d1_pkt.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/libssl/d1_pkt.c b/lib/libssl/d1_pkt.c
index bbf2e8e538f..ebf04e32927 100644
--- a/lib/libssl/d1_pkt.c
+++ b/lib/libssl/d1_pkt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: d1_pkt.c,v 1.91 2021/01/26 14:22:19 jsing Exp $ */
+/* $OpenBSD: d1_pkt.c,v 1.92 2021/02/08 17:17:02 jsing Exp $ */
/*
* DTLS implementation written by Nagendra Modadugu
* (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -575,16 +575,8 @@ dtls1_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek)
* so process data buffered during the last handshake
* in advance, if any.
*/
- if (S3I(s)->hs.state == SSL_ST_OK && rr->length == 0) {
- pitem *item;
- item = pqueue_pop(D1I(s)->buffered_app_data.q);
- if (item) {
- dtls1_copy_record(s, item->data);
-
- free(item->data);
- pitem_free(item);
- }
- }
+ if (S3I(s)->hs.state == SSL_ST_OK && rr->length == 0)
+ dtls1_retrieve_buffered_record(s, &(D1I(s)->buffered_app_data));
/* Check for timeout */
if (dtls1_handle_timeout(s) > 0)