Rename msg_callback_s to msg_callback_ssl for greater clarity

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20914)
This commit is contained in:
Matt Caswell 2023-05-22 15:00:00 +01:00
parent 7802170f7c
commit c2786c8ea7
10 changed files with 26 additions and 25 deletions

View File

@ -326,7 +326,7 @@ int ossl_quic_channel_replace_local_cid(QUIC_CHANNEL *ch,
/* Setters for the msg_callback and msg_callback_arg */
void ossl_quic_channel_set_msg_callback(QUIC_CHANNEL *ch,
ossl_msg_cb msg_callback,
SSL *msg_callback_s);
SSL *msg_callback_ssl);
void ossl_quic_channel_set_msg_callback_arg(QUIC_CHANNEL *ch,
void *msg_callback_arg);

View File

@ -62,7 +62,7 @@ void ossl_qrx_free(OSSL_QRX *qrx);
/* Setters for the msg_callback and msg_callback_arg */
void ossl_qrx_set_msg_callback(OSSL_QRX *qrx, ossl_msg_cb msg_callback,
SSL *msg_callback_s);
SSL *msg_callback_ssl);
void ossl_qrx_set_msg_callback_arg(OSSL_QRX *qrx,
void *msg_callback_arg);

View File

@ -60,7 +60,7 @@ void ossl_qtx_set_mutator(OSSL_QTX *qtx, ossl_mutate_packet_cb mutatecb,
/* Setters for the msg_callback and the msg_callback_arg */
void ossl_qtx_set_msg_callback(OSSL_QTX *qtx, ossl_msg_cb msg_callback,
SSL *msg_callback_s);
SSL *msg_callback_ssl);
void ossl_qtx_set_msg_callback_arg(OSSL_QTX *qtx, void *msg_callback_arg);
/*

View File

@ -170,7 +170,7 @@ int ossl_quic_tx_packetiser_schedule_conn_close(OSSL_QUIC_TX_PACKETISER *txp,
/* Setters for the msg_callback and msg_callback_arg */
void ossl_quic_tx_packetiser_set_msg_callback(OSSL_QUIC_TX_PACKETISER *txp,
ossl_msg_cb msg_callback,
SSL *msg_callback_s);
SSL *msg_callback_ssl);
void ossl_quic_tx_packetiser_set_msg_callback_arg(OSSL_QUIC_TX_PACKETISER *txp,
void *msg_callback_arg);

View File

@ -2512,14 +2512,14 @@ int ossl_quic_channel_replace_local_cid(QUIC_CHANNEL *ch,
void ossl_quic_channel_set_msg_callback(QUIC_CHANNEL *ch,
ossl_msg_cb msg_callback,
SSL *msg_callback_s)
SSL *msg_callback_ssl)
{
ch->msg_callback = msg_callback;
ch->msg_callback_s = msg_callback_s;
ossl_qtx_set_msg_callback(ch->qtx, msg_callback, msg_callback_s);
ch->msg_callback_ssl = msg_callback_ssl;
ossl_qtx_set_msg_callback(ch->qtx, msg_callback, msg_callback_ssl);
ossl_quic_tx_packetiser_set_msg_callback(ch->txp, msg_callback,
msg_callback_s);
ossl_qrx_set_msg_callback(ch->qrx, msg_callback, msg_callback_s);
msg_callback_ssl);
ossl_qrx_set_msg_callback(ch->qrx, msg_callback, msg_callback_ssl);
}
void ossl_quic_channel_set_msg_callback_arg(QUIC_CHANNEL *ch,

View File

@ -96,7 +96,7 @@ struct quic_channel_st {
/* Message callback related arguments */
ossl_msg_cb msg_callback;
void *msg_callback_arg;
SSL *msg_callback_s;
SSL *msg_callback_ssl;
/*
* Send and receive parts of the crypto streams.

View File

@ -150,7 +150,7 @@ struct ossl_qrx_st {
/* Message callback related arguments */
ossl_msg_cb msg_callback;
void *msg_callback_arg;
SSL *msg_callback_s;
SSL *msg_callback_ssl;
};
static void qrx_on_rx(QUIC_URXE *urxe, void *arg);
@ -234,7 +234,8 @@ void ossl_qrx_inject_urxe(OSSL_QRX *qrx, QUIC_URXE *urxe)
if (qrx->msg_callback != NULL)
qrx->msg_callback(0, OSSL_QUIC1_VERSION, SSL3_RT_QUIC_DATAGRAM, urxe + 1,
urxe->data_len, qrx->msg_callback_s, qrx->msg_callback_arg);
urxe->data_len, qrx->msg_callback_ssl,
qrx->msg_callback_arg);
}
static void qrx_on_rx(QUIC_URXE *urxe, void *arg)
@ -845,7 +846,7 @@ static int qrx_process_pkt(OSSL_QRX *qrx, QUIC_URXE *urxe,
if (qrx->msg_callback != NULL)
qrx->msg_callback(0, OSSL_QUIC1_VERSION, SSL3_RT_QUIC_PACKET, sop,
eop - sop - rxe->hdr.len, qrx->msg_callback_s,
eop - sop - rxe->hdr.len, qrx->msg_callback_ssl,
qrx->msg_callback_arg);
/*
@ -1206,10 +1207,10 @@ uint64_t ossl_qrx_get_max_forged_pkt_count(OSSL_QRX *qrx,
}
void ossl_qrx_set_msg_callback(OSSL_QRX *qrx, ossl_msg_cb msg_callback,
SSL *msg_callback_s)
SSL *msg_callback_ssl)
{
qrx->msg_callback = msg_callback;
qrx->msg_callback_s = msg_callback_s;
qrx->msg_callback_ssl = msg_callback_ssl;
}
void ossl_qrx_set_msg_callback_arg(OSSL_QRX *qrx, void *msg_callback_arg)

View File

@ -98,7 +98,7 @@ struct ossl_qtx_st {
/* Message callback related arguments */
ossl_msg_cb msg_callback;
void *msg_callback_arg;
SSL *msg_callback_s;
SSL *msg_callback_ssl;
};
/* Instantiates a new QTX. */
@ -452,7 +452,7 @@ static int qtx_write_hdr(OSSL_QTX *qtx, const QUIC_PKT_HDR *hdr, TXE *txe,
if (qtx->msg_callback != NULL)
qtx->msg_callback(1, OSSL_QUIC1_VERSION, SSL3_RT_QUIC_PACKET, data, l,
qtx->msg_callback_s, qtx->msg_callback_arg);
qtx->msg_callback_ssl, qtx->msg_callback_arg);
txe->data_len += l;
@ -911,7 +911,7 @@ int ossl_qtx_flush_net(OSSL_QTX *qtx)
if (qtx->msg_callback != NULL)
qtx->msg_callback(1, OSSL_QUIC1_VERSION, SSL3_RT_QUIC_DATAGRAM,
msg[i].data, msg[i].data_len,
qtx->msg_callback_s,
qtx->msg_callback_ssl,
qtx->msg_callback_arg);
qtx_pending_to_free(qtx);
}
@ -1004,10 +1004,10 @@ uint64_t ossl_qtx_get_max_epoch_pkt_count(OSSL_QTX *qtx, uint32_t enc_level)
}
void ossl_qtx_set_msg_callback(OSSL_QTX *qtx, ossl_msg_cb msg_callback,
SSL *msg_callback_s)
SSL *msg_callback_ssl)
{
qtx->msg_callback = msg_callback;
qtx->msg_callback_s = msg_callback_s;
qtx->msg_callback_ssl = msg_callback_ssl;
}
void ossl_qtx_set_msg_callback_arg(OSSL_QTX *qtx, void *msg_callback_arg)

View File

@ -1107,7 +1107,7 @@ static int depack_process_frames(QUIC_CHANNEL *ch, PACKET *pkt,
}
ch->msg_callback(0, OSSL_QUIC1_VERSION, ctype, sof, framelen,
ch->msg_callback_s, ch->msg_callback_arg);
ch->msg_callback_ssl, ch->msg_callback_arg);
}
}

View File

@ -73,7 +73,7 @@ struct ossl_quic_tx_packetiser_st {
/* Message callback related arguments */
ossl_msg_cb msg_callback;
void *msg_callback_arg;
SSL *msg_callback_s;
SSL *msg_callback_ssl;
};
@ -325,7 +325,7 @@ static int tx_helper_commit(struct tx_helper *h)
ctype = SSL3_RT_QUIC_FRAME_HEADER;
h->txp->msg_callback(1, OSSL_QUIC1_VERSION, ctype, h->txn.data, l,
h->txp->msg_callback_s,
h->txp->msg_callback_ssl,
h->txp->msg_callback_arg);
}
@ -2385,10 +2385,10 @@ int ossl_quic_tx_packetiser_schedule_conn_close(OSSL_QUIC_TX_PACKETISER *txp,
void ossl_quic_tx_packetiser_set_msg_callback(OSSL_QUIC_TX_PACKETISER *txp,
ossl_msg_cb msg_callback,
SSL *msg_callback_s)
SSL *msg_callback_ssl)
{
txp->msg_callback = msg_callback;
txp->msg_callback_s = msg_callback_s;
txp->msg_callback_ssl = msg_callback_ssl;
}
void ossl_quic_tx_packetiser_set_msg_callback_arg(OSSL_QUIC_TX_PACKETISER *txp,