mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:31:41 +03:00
doh: cleanups and extended HTTPS RR code
In preparation for using HTTPS outside of ECH, the parser now also extracts the port number. Plus other minor cleanups. Closes #16007
This commit is contained in:
parent
f739a6867b
commit
5d70a5c5a4
3 changed files with 70 additions and 96 deletions
17
lib/hostip.h
17
lib/hostip.h
|
|
@ -67,28 +67,21 @@ struct Curl_hash *Curl_global_host_cache_init(void);
|
|||
#define CURL_MAXLEN_host_name 253
|
||||
|
||||
struct Curl_https_rrinfo {
|
||||
size_t len; /* raw encoded length */
|
||||
unsigned char *val; /* raw encoded octets */
|
||||
/*
|
||||
* fields from HTTPS RR, with the mandatory fields
|
||||
* first (priority, target), then the others in the
|
||||
* order of the keytag numbers defined at
|
||||
* https://datatracker.ietf.org/doc/html/rfc9460#section-14.3.2
|
||||
* Fields from HTTPS RR. The only mandatory fields are priority and target.
|
||||
* See https://datatracker.ietf.org/doc/html/rfc9460#section-14.3.2
|
||||
*/
|
||||
uint16_t priority;
|
||||
char *target;
|
||||
char *alpns; /* keytag = 1 */
|
||||
bool no_def_alpn; /* keytag = 2 */
|
||||
/*
|
||||
* we do not support ports (keytag = 3) as we do not support
|
||||
* port-switching yet
|
||||
*/
|
||||
unsigned char *ipv4hints; /* keytag = 4 */
|
||||
size_t ipv4hints_len;
|
||||
unsigned char *echconfiglist; /* keytag = 5 */
|
||||
size_t echconfiglist_len;
|
||||
unsigned char *ipv6hints; /* keytag = 6 */
|
||||
size_t ipv6hints_len;
|
||||
int port; /* -1 means not set */
|
||||
uint16_t priority;
|
||||
bool no_def_alpn; /* keytag = 2 */
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue