Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! Place start of ClientHello correct…
Browse files Browse the repository at this point in the history
…ly when calculating binder for DTLS 1.3
  • Loading branch information
fwh-dc committed May 25, 2024
1 parent 4da9317 commit 5d9db29
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ssl/statem/statem_dtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,19 +140,21 @@ int dtls1_do_write(SSL_CONNECTION *s, uint8_t type)
size_t written;
size_t curr_mtu;
int retry = 1;
size_t len, overhead, used_len, msg_len = 0;
size_t len, overhead, used_len, msg_len;
SSL *ssl = SSL_CONNECTION_GET_SSL(s);
unsigned char *data = (unsigned char *)s->init_buf->data;
unsigned short msg_seq = s->d1->w_msg_hdr.seq;
unsigned char msg_type = 0;
unsigned char msg_type;

if (type == SSL3_RT_HANDSHAKE) {
msg_type = *data++;
l3n2(data, msg_len);
} else if (ossl_assert(type == SSL3_RT_CHANGE_CIPHER_SPEC)) {
msg_type = SSL3_MT_CCS;
msg_len = 0; /* SSL3_RT_CHANGE_CIPHER_SPEC */
}
} else
/* Other record types are not supported */
return -1;

if (!dtls1_query_mtu(s))
return -1;
Expand Down

0 comments on commit 5d9db29

Please sign in to comment.