diff options
author | jsing <> | 2021-02-08 17:17:02 +0000 |
---|---|---|
committer | jsing <> | 2021-02-08 17:17:02 +0000 |
commit | f5cb78cf9336d193c885d8c96a3406e0fe81b1fa (patch) | |
tree | 8464f69c9fca6213c30acc3f43a0e23e0d6a5489 /src | |
parent | adf5489ea8db2ed3bf4f2a1ddecfa1c6c7d1ebe2 (diff) | |
download | openbsd-f5cb78cf9336d193c885d8c96a3406e0fe81b1fa.tar.gz openbsd-f5cb78cf9336d193c885d8c96a3406e0fe81b1fa.tar.bz2 openbsd-f5cb78cf9336d193c885d8c96a3406e0fe81b1fa.zip |
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 'src')
-rw-r--r-- | src/lib/libssl/d1_pkt.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/lib/libssl/d1_pkt.c b/src/lib/libssl/d1_pkt.c index bbf2e8e538..ebf04e3292 100644 --- a/src/lib/libssl/d1_pkt.c +++ b/src/lib/libssl/d1_pkt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: d1_pkt.c,v 1.91 2021/01/26 14:22:19 jsing Exp $ */ | 1 | /* $OpenBSD: d1_pkt.c,v 1.92 2021/02/08 17:17:02 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. |
@@ -575,16 +575,8 @@ dtls1_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek) | |||
575 | * so process data buffered during the last handshake | 575 | * so process data buffered during the last handshake |
576 | * in advance, if any. | 576 | * in advance, if any. |
577 | */ | 577 | */ |
578 | if (S3I(s)->hs.state == SSL_ST_OK && rr->length == 0) { | 578 | if (S3I(s)->hs.state == SSL_ST_OK && rr->length == 0) |
579 | pitem *item; | 579 | dtls1_retrieve_buffered_record(s, &(D1I(s)->buffered_app_data)); |
580 | item = pqueue_pop(D1I(s)->buffered_app_data.q); | ||
581 | if (item) { | ||
582 | dtls1_copy_record(s, item->data); | ||
583 | |||
584 | free(item->data); | ||
585 | pitem_free(item); | ||
586 | } | ||
587 | } | ||
588 | 580 | ||
589 | /* Check for timeout */ | 581 | /* Check for timeout */ |
590 | if (dtls1_handle_timeout(s) > 0) | 582 | if (dtls1_handle_timeout(s) > 0) |