Skip to content

Commit

Permalink
Ensure the msg_callback is called on CCS receipt in TLSv1.3
Browse files Browse the repository at this point in the history
CCS records are ignore in TLSv1.3. But we should still call the msg_callback
anyway.

Fixes openssl#25166
  • Loading branch information
mattcaswell committed Aug 12, 2024
1 parent 250a7ad commit 8ada5e6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ssl/record/methods/tls_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,8 +750,11 @@ int tls_get_more_records(OSSL_RECORD_LAYER *rl)
}
/*
* CCS messages are ignored in TLSv1.3. We treat it like an empty
* handshake record
* handshake record - but we still call the msg_callback
*/
if (rl->msg_callback != NULL)
rl->msg_callback(0, TLS1_3_VERSION, SSL3_RT_CHANGE_CIPHER_SPEC,
thisrr->data, 1, rl->cbarg);
thisrr->type = SSL3_RT_HANDSHAKE;
if (++(rl->empty_record_count) > MAX_EMPTY_RECORDS) {
RLAYERfatal(rl, SSL_AD_UNEXPECTED_MESSAGE,
Expand Down

0 comments on commit 8ada5e6

Please sign in to comment.