/* Temporarily exposed during QUIC_PORT transition. */
int ossl_quic_channel_on_new_conn(QUIC_CHANNEL *ch, const BIO_ADDR *peer,
- const QUIC_CONN_ID *peer_scid,
const QUIC_CONN_ID *peer_dcid);
/* For use by QUIC_PORT. You should not need to call this directly. */
uint64_t ossl_quic_channel_get_active_conn_id_limit_peer_request(const QUIC_CHANNEL *ch);
int ossl_quic_bind_channel(QUIC_CHANNEL *ch, const BIO_ADDR *peer,
- const QUIC_CONN_ID *scid, const QUIC_CONN_ID *dcid,
- const QUIC_CONN_ID *odcid);
+ const QUIC_CONN_ID *dcid, const QUIC_CONN_ID *odcid);
void ossl_quic_channel_set_tcause(QUIC_CHANNEL *ch, uint64_t app_error_code,
const char *app_reason);
* @return 1 on success, 0 on failure to set required elements.
*/
static int ch_on_new_conn_common(QUIC_CHANNEL *ch, const BIO_ADDR *peer,
- const QUIC_CONN_ID *peer_scid,
const QUIC_CONN_ID *peer_dcid,
const QUIC_CONN_ID *peer_odcid)
{
return 0;
ch->init_dcid = *peer_dcid;
- ch->cur_remote_dcid = *peer_scid;
ch->odcid.id_len = 0;
if (peer_odcid != NULL)
/* Called when we, as a server, get a new incoming connection. */
int ossl_quic_channel_on_new_conn(QUIC_CHANNEL *ch, const BIO_ADDR *peer,
- const QUIC_CONN_ID *peer_scid,
const QUIC_CONN_ID *peer_dcid)
{
if (!ossl_assert(ch->state == QUIC_CHANNEL_STATE_IDLE && ch->is_server))
if (!ossl_quic_lcidm_generate_initial(ch->lcidm, ch, &ch->cur_local_cid))
return 0;
- return ch_on_new_conn_common(ch, peer, peer_scid, peer_dcid, NULL);
+ return ch_on_new_conn_common(ch, peer, peer_dcid, NULL);
}
/**
* met (e.g., channel is not idle or not a server, or binding fails).
*/
int ossl_quic_bind_channel(QUIC_CHANNEL *ch, const BIO_ADDR *peer,
- const QUIC_CONN_ID *peer_scid,
const QUIC_CONN_ID *peer_dcid,
const QUIC_CONN_ID *peer_odcid)
{
* peer_odcid <=> is initial dst conn id chosen by peer in its
* first initial packet we received without token.
*/
- return ch_on_new_conn_common(ch, peer, peer_scid, peer_dcid, peer_odcid);
+ return ch_on_new_conn_common(ch, peer, peer_dcid, peer_odcid);
}
SSL *ossl_quic_channel_get0_ssl(QUIC_CHANNEL *ch)
* to *new_ch.
*/
static void port_bind_channel(QUIC_PORT *port, const BIO_ADDR *peer,
- const QUIC_CONN_ID *scid, const QUIC_CONN_ID *dcid,
+ const QUIC_CONN_ID *dcid,
const QUIC_CONN_ID *odcid, OSSL_QRX *qrx,
QUIC_CHANNEL **new_ch)
{
* See RFC 9000 s. 8.1
*/
ossl_quic_tx_packetiser_set_validated(ch->txp);
- if (!ossl_quic_bind_channel(ch, peer, scid, dcid, odcid)) {
+ if (!ossl_quic_bind_channel(ch, peer, dcid, odcid)) {
ossl_quic_channel_free(ch);
return;
}
* No odcid means we didn't do server validation, so we need to
* generate a cid via ossl_quic_channel_on_new_conn
*/
- if (!ossl_quic_channel_on_new_conn(ch, peer, scid, dcid)) {
+ if (!ossl_quic_channel_on_new_conn(ch, peer, dcid)) {
ossl_quic_channel_free(ch);
return;
}
* configurable in the future.
*/
static int port_validate_token(QUIC_PKT_HDR *hdr, QUIC_PORT *port,
- BIO_ADDR *peer, QUIC_CONN_ID *odcid,
- QUIC_CONN_ID *scid, uint8_t *gen_new_token)
+ BIO_ADDR *peer, QUIC_CONN_ID *odcid, uint8_t *gen_new_token)
{
int ret = 0;
QUIC_VALIDATION_TOKEN token = { 0 };
!= 0)
goto err;
*odcid = token.odcid;
- *scid = token.rscid;
} else {
if (!ossl_quic_lcidm_get_unused_cid(port->lcidm, odcid))
goto err;
- *scid = hdr->src_conn_id;
}
/*
PACKET pkt;
QUIC_PKT_HDR hdr;
QUIC_CHANNEL *ch = NULL, *new_ch = NULL;
- QUIC_CONN_ID odcid, scid;
+ QUIC_CONN_ID odcid;
uint8_t gen_new_token = 0;
OSSL_QRX *qrx = NULL;
OSSL_QRX *qrx_src = NULL;
*/
if (hdr.token != NULL
&& port_validate_token(&hdr, port, &e->peer,
- &odcid, &scid,
- &gen_new_token)
+ &odcid, &gen_new_token)
== 0) {
/*
* RFC 9000 s 8.1.3
qrx = NULL;
}
- port_bind_channel(port, &e->peer, &scid, &hdr.dst_conn_id,
+ port_bind_channel(port, &e->peer, &hdr.dst_conn_id,
&odcid, qrx, &new_ch);
/*