]> git.pld-linux.org Git - packages/dnssec-tools.git/blob - glibc-2.25.patch
- added glibc-2.25 patch from arch (deal with glibc after some DNSSEC bits removal...
[packages/dnssec-tools.git] / glibc-2.25.patch
1 diff --git a/validator/include/validator/validator-compat.h b/validator/include/validator/validator-compat.h
2 index c6ebf23..515df6d 100644
3 --- a/validator/include/validator/validator-compat.h
4 +++ b/validator/include/validator/validator-compat.h
5 @@ -678,6 +678,11 @@ typedef enum __ns_rcode {
6  #define ns_t_zxfr    256 /* BIND-specific, nonstandard. */
7  #endif /* HAVE_NS_T_KX */
8
9 +/* glibc 2.25 is missing ns_t_zxfr */
10 +#if !defined(ns_t_zxfr)
11 +#define ns_t_zxfr    256 /* BIND-specific, nonstandard. */
12 +#endif /* glibc 2.25 */
13 +
14  #if !HAVE_DECL_NS_T_DS
15  #define ns_t_ds       43
16  #endif
17 @@ -818,53 +823,6 @@ typedef enum __ns_flag {
18          ns_f_max
19  } ns_flag;
20
21 -/* The Algorithm field of the KEY and SIG RR's is an integer, {1..254} */
22 -#define NS_ALG_MD5RSA           1       /* MD5 with RSA */
23 -#define NS_ALG_DH               2       /* Diffie Hellman KEY */
24 -#define NS_ALG_DSA              3       /* DSA KEY */
25 -#define NS_ALG_DSS              NS_ALG_DSA
26 -#define NS_ALG_EXPIRE_ONLY      253     /* No alg, no security */
27 -#define NS_ALG_PRIVATE_OID      254     /* Key begins with OID giving alg */
28 -
29 -/* Protocol values  */
30 -/* value 0 is reserved */
31 -#define NS_KEY_PROT_TLS         1
32 -#define NS_KEY_PROT_EMAIL       2
33 -#define NS_KEY_PROT_DNSSEC      3
34 -#define NS_KEY_PROT_IPSEC       4
35 -#define NS_KEY_PROT_ANY         255
36 -
37 -/* Signatures */
38 -#define NS_MD5RSA_MIN_BITS       512    /* Size of a mod or exp in bits */
39 -#define NS_MD5RSA_MAX_BITS      2552
40 -        /* Total of binary mod and exp */
41 -#define NS_MD5RSA_MAX_BYTES     ((NS_MD5RSA_MAX_BITS+7/8)*2+3)
42 -        /* Max length of text sig block */
43 -#define NS_MD5RSA_MAX_BASE64    (((NS_MD5RSA_MAX_BYTES+2)/3)*4)
44 -#define NS_MD5RSA_MIN_SIZE      ((NS_MD5RSA_MIN_BITS+7)/8)
45 -#define NS_MD5RSA_MAX_SIZE      ((NS_MD5RSA_MAX_BITS+7)/8)
46 -
47 -#define NS_DSA_SIG_SIZE         41
48 -#define NS_DSA_MIN_SIZE         213
49 -#define NS_DSA_MAX_BYTES        405
50 -
51 -/* Offsets into SIG record rdata to find various values */
52 -#define NS_SIG_TYPE     0       /* Type flags */
53 -#define NS_SIG_ALG      2       /* Algorithm */
54 -#define NS_SIG_LABELS   3       /* How many labels in name */
55 -#define NS_SIG_OTTL     4       /* Original TTL */
56 -#define NS_SIG_EXPIR    8       /* Expiration time */
57 -#define NS_SIG_SIGNED   12      /* Signature time */
58 -#define NS_SIG_FOOT     16      /* Key footprint */
59 -#define NS_SIG_SIGNER   18      /* Domain name of who signed it */
60 -
61 -/* How RR types are represented as bit-flags in NXT records */
62 -#define NS_NXT_BITS 8
63 -#define NS_NXT_BIT_SET(  n,p) (p[(n)/NS_NXT_BITS] |=  (0x80>>((n)%NS_NXT_BITS)))
64 -#define NS_NXT_BIT_CLEAR(n,p) (p[(n)/NS_NXT_BITS] &= ~(0x80>>((n)%NS_NXT_BITS)))
65 -#define NS_NXT_BIT_ISSET(n,p) (p[(n)/NS_NXT_BITS] &   (0x80>>((n)%NS_NXT_BITS)))
66 -#define NS_NXT_MAX 127
67 -
68  /*
69   * Inline versions of get/put short/long.  Pointer is advanced.
70   */
71 @@ -931,6 +889,57 @@ int        ns_parse_ttl(const char *, u_long *);
72
73  #endif /* HAVE_ARPA_NAMESER_H */
74
75 +/* glibc 2.25 passes HAVE_ARPA_NAMESER_H, but doesn't have NS_ALG_MD5RSA and more defines. */
76 +#if !defined(HAVE_ARPA_NAMESER_H) || defined(eabi) || defined(ANDROID) ||defined(__OpenBSD__) || !defined(NS_ALG_MD5RSA)
77 +/* The Algorithm field of the KEY and SIG RR's is an integer, {1..254} */
78 +#define NS_ALG_MD5RSA           1       /* MD5 with RSA */
79 +#define NS_ALG_DH               2       /* Diffie Hellman KEY */
80 +#define NS_ALG_DSA              3       /* DSA KEY */
81 +#define NS_ALG_DSS              NS_ALG_DSA
82 +#define NS_ALG_EXPIRE_ONLY      253     /* No alg, no security */
83 +#define NS_ALG_PRIVATE_OID      254     /* Key begins with OID giving alg */
84 +
85 +/* Protocol values  */
86 +/* value 0 is reserved */
87 +#define NS_KEY_PROT_TLS         1
88 +#define NS_KEY_PROT_EMAIL       2
89 +#define NS_KEY_PROT_DNSSEC      3
90 +#define NS_KEY_PROT_IPSEC       4
91 +#define NS_KEY_PROT_ANY         255
92 +
93 +/* Signatures */
94 +#define NS_MD5RSA_MIN_BITS       512    /* Size of a mod or exp in bits */
95 +#define NS_MD5RSA_MAX_BITS      2552
96 +        /* Total of binary mod and exp */
97 +#define NS_MD5RSA_MAX_BYTES     ((NS_MD5RSA_MAX_BITS+7/8)*2+3)
98 +        /* Max length of text sig block */
99 +#define NS_MD5RSA_MAX_BASE64    (((NS_MD5RSA_MAX_BYTES+2)/3)*4)
100 +#define NS_MD5RSA_MIN_SIZE      ((NS_MD5RSA_MIN_BITS+7)/8)
101 +#define NS_MD5RSA_MAX_SIZE      ((NS_MD5RSA_MAX_BITS+7)/8)
102 +
103 +#define NS_DSA_SIG_SIZE         41
104 +#define NS_DSA_MIN_SIZE         213
105 +#define NS_DSA_MAX_BYTES        405
106 +
107 +/* Offsets into SIG record rdata to find various values */
108 +#define NS_SIG_TYPE     0       /* Type flags */
109 +#define NS_SIG_ALG      2       /* Algorithm */
110 +#define NS_SIG_LABELS   3       /* How many labels in name */
111 +#define NS_SIG_OTTL     4       /* Original TTL */
112 +#define NS_SIG_EXPIR    8       /* Expiration time */
113 +#define NS_SIG_SIGNED   12      /* Signature time */
114 +#define NS_SIG_FOOT     16      /* Key footprint */
115 +#define NS_SIG_SIGNER   18      /* Domain name of who signed it */
116 +
117 +/* How RR types are represented as bit-flags in NXT records */
118 +#define NS_NXT_BITS 8
119 +#define NS_NXT_BIT_SET(  n,p) (p[(n)/NS_NXT_BITS] |=  (0x80>>((n)%NS_NXT_BITS)))
120 +#define NS_NXT_BIT_CLEAR(n,p) (p[(n)/NS_NXT_BITS] &= ~(0x80>>((n)%NS_NXT_BITS)))
121 +#define NS_NXT_BIT_ISSET(n,p) (p[(n)/NS_NXT_BITS] &   (0x80>>((n)%NS_NXT_BITS)))
122 +#define NS_NXT_MAX 127
123 +#endif
124 +/* glibc 2.25 */
125 +
126  int libsres_msg_getflag(ns_msg han, int flag);
127  /*
128   * at one open ns_msg_getflag was a macro on Linux, but now it is a
This page took 0.083049 seconds and 4 git commands to generate.