mirror of
https://gitea.invidious.io/iv-org/litespeed-quic.git
synced 2024-08-15 00:53:43 +00:00
Latest changes
- Remove comment: MSPC is obsolete (no code changes) - Prog: use lsquic_str2ver() when processing -o version flag - Remove unused CTIM and SRBF transport parameters - Disable QUIC versions Q037 and Q038 by default - Fix Windows compilation by including compat header file in lshpack.c - Address warnings produced by newer versions of gcc - Future-proof: turn off -Werror
This commit is contained in:
parent
5442222fd3
commit
4b332c36d1
6 changed files with 18 additions and 44 deletions
|
@ -84,14 +84,12 @@ typedef struct hs_ctx_st
|
|||
uint32_t scls;
|
||||
uint32_t cfcw;
|
||||
uint32_t sfcw;
|
||||
uint32_t srbf;
|
||||
uint32_t icsl;
|
||||
|
||||
uint32_t irtt;
|
||||
uint64_t rcid;
|
||||
uint32_t tcid;
|
||||
uint32_t smhl;
|
||||
uint64_t ctim; /* any usage? */
|
||||
uint64_t sttl;
|
||||
unsigned char scid[SCID_LENGTH];
|
||||
//unsigned char chlo_hash[32]; //SHA256 HASH of CHLO
|
||||
|
@ -566,10 +564,6 @@ static int parse_hs_data (lsquic_enc_session_t *enc_session, uint32_t tag,
|
|||
return -1;
|
||||
break;
|
||||
|
||||
case QTAG_SRBF:
|
||||
hs_ctx->srbf = get_tag_value_i32(val, len);
|
||||
break;
|
||||
|
||||
case QTAG_ICSL:
|
||||
hs_ctx->icsl = get_tag_value_i32(val, len);
|
||||
break;
|
||||
|
@ -586,10 +580,6 @@ static int parse_hs_data (lsquic_enc_session_t *enc_session, uint32_t tag,
|
|||
/* else ignore, following the reference implementation */
|
||||
break;
|
||||
|
||||
case QTAG_CTIM:
|
||||
hs_ctx->ctim = get_tag_value_i64(val, len);
|
||||
break;
|
||||
|
||||
case QTAG_SNI:
|
||||
lsquic_str_setto(&hs_ctx->sni, val, len);
|
||||
ESHIST_APPEND(enc_session, ESHE_SET_SNI);
|
||||
|
@ -957,7 +947,6 @@ lsquic_enc_session_gen_chlo (lsquic_enc_session_t *enc_session,
|
|||
MSG_LEN_ADD(msg_len, 4); ++n_tags; /* SFCW */
|
||||
MSG_LEN_ADD(msg_len, 4); ++n_tags; /* ICSL */
|
||||
MSG_LEN_ADD(msg_len, 4); ++n_tags; /* SMHL */
|
||||
MSG_LEN_ADD(msg_len, 8); ++n_tags; /* CTIM */
|
||||
MSG_LEN_ADD(msg_len, 4); ++n_tags; /* KEXS */
|
||||
MSG_LEN_ADD(msg_len, 0); ++n_tags; /* CSCT */
|
||||
if (n_opts > 0)
|
||||
|
@ -1023,11 +1012,6 @@ lsquic_enc_session_gen_chlo (lsquic_enc_session_t *enc_session,
|
|||
if (MSG_LEN_VAL(msg_len) > *len)
|
||||
return -1;
|
||||
|
||||
/* Calculate any remaining values: */
|
||||
enc_session->hs_ctx.ctim = time(NULL);
|
||||
|
||||
/* XXX: should we use MSPC instead of MIDS in newer versions of gQUIC? */
|
||||
|
||||
/* Write CHLO: */
|
||||
MW_BEGIN(&mw, QTAG_CHLO, n_tags, buf);
|
||||
if (include_pad)
|
||||
|
@ -1053,7 +1037,6 @@ lsquic_enc_session_gen_chlo (lsquic_enc_session_t *enc_session,
|
|||
MW_WRITE_UINT32(&mw, QTAG_PDMD, settings->es_pdmd);
|
||||
MW_WRITE_UINT32(&mw, QTAG_SMHL, 1);
|
||||
MW_WRITE_UINT32(&mw, QTAG_ICSL, settings->es_idle_conn_to / 1000000);
|
||||
MW_WRITE_UINT64(&mw, QTAG_CTIM, enc_session->hs_ctx.ctim);
|
||||
if (lsquic_str_len(&enc_session->info->scfg) > 0 && enc_session->cert_ptr)
|
||||
MW_WRITE_BUFFER(&mw, QTAG_PUBS, pub_key, sizeof(pub_key));
|
||||
MW_WRITE_UINT32(&mw, QTAG_MIDS, settings->es_max_streams_in);
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#define QTAG_CHLO TAG('C', 'H', 'L', 'O')
|
||||
#define QTAG_COPT TAG('C', 'O', 'P', 'T')
|
||||
#define QTAG_CSCT TAG('C', 'S', 'C', 'T')
|
||||
#define QTAG_CTIM TAG('C', 'T', 'I', 'M')
|
||||
#define QTAG_EXPY TAG('E', 'X', 'P', 'Y')
|
||||
#define QTAG_ICSL TAG('I', 'C', 'S', 'L')
|
||||
#define QTAG_IRTT TAG('I', 'R', 'T', 'T')
|
||||
|
@ -35,7 +34,6 @@
|
|||
#define QTAG_SFCW TAG('S', 'F', 'C', 'W')
|
||||
#define QTAG_SHLO TAG('S', 'H', 'L', 'O')
|
||||
#define QTAG_SNI TAG('S', 'N', 'I', 0 )
|
||||
#define QTAG_SRBF TAG('S', 'R', 'B', 'F')
|
||||
#define QTAG_SREJ TAG('S', 'R', 'E', 'J')
|
||||
#define QTAG_STTL TAG('S', 'T', 'T', 'L')
|
||||
#define QTAG_TCID TAG('T', 'C', 'I', 'D')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue