Skip to content

Commit

Permalink
fixup! fixup! fixup! Adds DTLS 1.3 ACK message functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
fwh-dc committed Aug 7, 2024
1 parent fa3d88c commit bd492eb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
1 change: 1 addition & 0 deletions doc/designs/dtlsv1_3/dtlsv1_3-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ section 5.9.
ACK's are sent for KeyUpdates, NewSessionTicket and Finish (client).

Notes on RFC9147 Section 7.1:

* The implementation does not offer any logic to determine that there is disruption
when receiving messages which means it will not send ACKs for the example given
in RFC9147 Figure 12.
Expand Down
24 changes: 6 additions & 18 deletions ssl/pqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,13 @@ pitem *pitem_new(unsigned char *prio64be, void *data)
pitem *pitem_new_ex(uint64_t prio64be, void *data)
{
pitem *item = OPENSSL_malloc(sizeof(*item));
unsigned char *p_item_prio;

if (item == NULL)
return NULL;

item->priority[0] = prio64be >> 56;
item->priority[1] = prio64be >> 48;
item->priority[2] = prio64be >> 40;
item->priority[3] = prio64be >> 32;
item->priority[4] = prio64be >> 24;
item->priority[5] = prio64be >> 16;
item->priority[6] = prio64be >> 8;
item->priority[7] = prio64be;
p_item_prio = item->priority;
l2n8(prio64be, p_item_prio);
item->data = data;
item->next = NULL;

Expand Down Expand Up @@ -144,16 +139,9 @@ pitem *pqueue_find(pqueue *pq, unsigned char *prio64be)
}

pitem *pqueue_find_ex(pqueue *pq, uint64_t prio64be) {
unsigned char prio[8];

prio[7] = prio64be;
prio[6] = prio64be >> 8;
prio[5] = prio64be >> 16;
prio[4] = prio64be >> 24;
prio[3] = prio64be >> 32;
prio[2] = prio64be >> 40;
prio[1] = prio64be >> 48;
prio[0] = prio64be >> 56;
unsigned char prio[8], *p_prio = prio;

l2n8(prio64be, p_prio);

return pqueue_find(pq, prio);
}
Expand Down
2 changes: 1 addition & 1 deletion ssl/record/methods/ssl3_meth.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ static int ssl3_mac(OSSL_RECORD_LAYER *rl, TLS_RL_RECORD *rec, unsigned char *md
|| !WPACKET_memcpy(&hdr, rl->mac_secret, md_size)
|| !WPACKET_memcpy(&hdr, ssl3_pad_1, npad)
|| !WPACKET_put_bytes_u64(&hdr, rl->sequence)
|| (!cbc_encrypted && !WPACKET_put_bytes_u8(&hdr, rec->type))
|| !WPACKET_put_bytes_u8(&hdr, rec->type)
|| !WPACKET_put_bytes_u16(&hdr, rec->length)
|| !WPACKET_finish(&hdr)
|| !WPACKET_get_total_written(&hdr, &hdr_written))
Expand Down

0 comments on commit bd492eb

Please sign in to comment.