summaryrefslogtreecommitdiff
path: root/lib/doh.h
diff options
context:
space:
mode:
authorNiall <Niall.oReilly@ucd.ie>2019-11-14 19:21:09 +0000
committerDaniel Stenberg <daniel@haxx.se>2019-11-16 16:15:03 +0100
commitb6a53fff6c1d07e8a9cb65ca1066d99490fb8132 (patch)
tree8f8b8ee97d9de60d29c0235953b37f798523769b /lib/doh.h
parent7627a2dd9d4b7417672fdec3dc6e7f8d3de379de (diff)
downloadcurl-b6a53fff6c1d07e8a9cb65ca1066d99490fb8132.tar.gz
doh: improced both encoding and decoding
Improved estimation of expected_len and updated related comments; increased strictness of QNAME-encoding, adding error detection for empty labels and names longer than the overall limit; avoided treating DNAME as unexpected; updated unit test 1655 with more thorough set of proofs and tests Closes #4598
Diffstat (limited to 'lib/doh.h')
-rw-r--r--lib/doh.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/doh.h b/lib/doh.h
index f522d3308..fc053eddf 100644
--- a/lib/doh.h
+++ b/lib/doh.h
@@ -55,14 +55,16 @@ typedef enum {
DOH_DNS_UNEXPECTED_TYPE, /* 9 */
DOH_DNS_UNEXPECTED_CLASS, /* 10 */
DOH_NO_CONTENT, /* 11 */
- DOH_DNS_BAD_ID /* 12 */
+ DOH_DNS_BAD_ID, /* 12 */
+ DOH_DNS_NAME_TOO_LONG /* 13 */
} DOHcode;
typedef enum {
DNS_TYPE_A = 1,
DNS_TYPE_NS = 2,
DNS_TYPE_CNAME = 5,
- DNS_TYPE_AAAA = 28
+ DNS_TYPE_AAAA = 28,
+ DNS_TYPE_DNAME = 39 /* RFC6672 */
} DNStype;
#define DOH_MAX_ADDR 24