Skip to content

Commit

Permalink
Pass the dtls record version to the record layer msg_callback function.
Browse files Browse the repository at this point in the history
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #22241)
  • Loading branch information
fwh-dc authored and t8m committed Oct 4, 2023
1 parent 706512e commit b31597d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ssl/record/methods/dtls_meth.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,6 @@ int dtls_get_more_records(OSSL_RECORD_LAYER *rl)

p = rl->packet;

if (rl->msg_callback != NULL)
rl->msg_callback(0, 0, SSL3_RT_HEADER, p, DTLS1_RT_HEADER_LENGTH,
rl->cbarg);

/* Pull apart the header into the DTLS1_RECORD */
rr->type = *(p++);
ssl_major = *(p++);
Expand All @@ -447,6 +443,10 @@ int dtls_get_more_records(OSSL_RECORD_LAYER *rl)

n2s(p, rr->length);

if (rl->msg_callback != NULL)
rl->msg_callback(0, rr->rec_version, SSL3_RT_HEADER, rl->packet, DTLS1_RT_HEADER_LENGTH,
rl->cbarg);

/*
* Lets check the version. We tolerate alerts that don't have the exact
* version number (e.g. because of protocol version errors)
Expand Down

0 comments on commit b31597d

Please sign in to comment.