Compare commits
768
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e38c8b9aee | ||
|
|
c16fcbf9a4 | ||
|
|
2a33835a96 | ||
|
|
446b58f36b | ||
|
|
fb73a88f78 | ||
|
|
b40b6c3970 | ||
|
|
1e358dbc98 | ||
|
|
337f9dd0ec | ||
|
|
b4b4277f5a | ||
|
|
3f907b8bee | ||
|
|
9d7ad52506 | ||
|
|
cac3978af2 | ||
|
|
fa03f94102 | ||
|
|
75c2356f42 | ||
|
|
7351c505a0 | ||
|
|
994e656977 | ||
|
|
cb6a185c69 | ||
|
|
055278c936 | ||
|
|
64fe6bbaf2 | ||
|
|
9e493798c6 | ||
|
|
e5ee96fc1b | ||
|
|
b55338e447 | ||
|
|
20c52bf9b8 | ||
|
|
1d9c37876b | ||
|
|
8e3fc5725f | ||
|
|
7db4dedf6b | ||
|
|
b6c77202cb | ||
|
|
ec25056b48 | ||
|
|
e3131b8d52 | ||
|
|
21a547c100 | ||
|
|
9e11b54bbc | ||
|
|
e80c26b22e | ||
|
|
afddc2781e | ||
|
|
41a68425ea | ||
|
|
f7986c8d1a | ||
|
|
9c4fb3b3e6 | ||
|
|
83a1e87dd2 | ||
|
|
5146cbc092 | ||
|
|
49cd3aac9c | ||
|
|
a94db46631 | ||
|
|
c3c0481293 | ||
|
|
69380eb033 | ||
|
|
2c816e745b | ||
|
|
10e6bfc864 | ||
|
|
84385bc717 | ||
|
|
d6d9fd1c71 | ||
|
|
9130f055f4 | ||
|
|
cfccd8d246 | ||
|
|
3ea9861e7a | ||
|
|
a71823bc5c | ||
|
|
7425252207 | ||
|
|
c0bd1bf944 | ||
|
|
12d45c5cd1 | ||
|
|
d30f6e5f99 | ||
|
|
abe41ba011 | ||
|
|
6b30bc73c0 | ||
|
|
f335795068 | ||
|
|
b0b76d259f | ||
|
|
57eadf4d4f | ||
|
|
fb8bb4e306 | ||
|
|
d7ae24c868 | ||
|
|
84f1d9a204 | ||
|
|
2e688488f7 | ||
|
|
d2943440a0 | ||
|
|
1a5620db01 | ||
|
|
63c9ec367f | ||
|
|
d9929b1b0a | ||
|
|
88f913ac81 | ||
|
|
8abf2f23d0 | ||
|
|
20faf4652a | ||
|
|
7785f644c3 | ||
|
|
519bfe4c97 | ||
|
|
6a6dc2f410 | ||
|
|
63aaff50df | ||
|
|
4093efc900 | ||
|
|
e91da20dc3 | ||
|
|
c8b07932e4 | ||
|
|
ebcaae4ae5 | ||
|
|
7671aba67d | ||
|
|
e7c34d5179 | ||
|
|
187d22e090 | ||
|
|
537f2284a3 | ||
|
|
71877806e8 | ||
|
|
e0d42538f9 | ||
|
|
083461d332 | ||
|
|
b105ccee68 | ||
|
|
66ba2fdad5 | ||
|
|
8b9b270c7d | ||
|
|
8e6d89ad97 | ||
|
|
4c3386ad95 | ||
|
|
7fc59e384c | ||
|
|
83cde08522 | ||
|
|
51f7ed99fe | ||
|
|
08974f39f1 | ||
|
|
fc496b2b5d | ||
|
|
919179b369 | ||
|
|
ed090fed56 | ||
|
|
0937e281a8 | ||
|
|
0a73c9f137 | ||
|
|
45abf438f8 | ||
|
|
c40425d0f6 | ||
|
|
9d1f4696ec | ||
|
|
c3b8130fe8 | ||
|
|
3322e41eeb | ||
|
|
d34aa0ccd0 | ||
|
|
f5cb3d707a | ||
|
|
1d8a62713d | ||
|
|
d5ec498e26 | ||
|
|
636e9fc259 | ||
|
|
8666f8d28f | ||
|
|
2975f37f1c | ||
|
|
378e36a955 | ||
|
|
5bf1e8781e | ||
|
|
48eedb8108 | ||
|
|
e10e6756c9 | ||
|
|
82082ecd56 | ||
|
|
122a1a00be | ||
|
|
c96ca40023 | ||
|
|
c8b36ea6b9 | ||
|
|
15db6ee6e4 | ||
|
|
618921902a | ||
|
|
229dfb5dc8 | ||
|
|
ae1aa55c6f | ||
|
|
939824fce5 | ||
|
|
f0966d1485 | ||
|
|
2be97feb46 | ||
|
|
fd30a03f2b | ||
|
|
cc0e8cda71 | ||
|
|
12df6829d1 | ||
|
|
45e77a3680 | ||
|
|
c08e60adcb | ||
|
|
6e06d3e7c6 | ||
|
|
da3044f2df | ||
|
|
8ae1774089 | ||
|
|
ad86878d61 | ||
|
|
408bcf9c07 | ||
|
|
cc9c97fdfc | ||
|
|
a7e6a584ea | ||
|
|
1b7598a045 | ||
|
|
9bd14e2d1f | ||
|
|
a554eb1ea0 | ||
|
|
a64750e428 | ||
|
|
a7657dc150 | ||
|
|
127810e512 | ||
|
|
b722c92e76 | ||
|
|
718c527e1d | ||
|
|
96907d636d | ||
|
|
9f37641d81 | ||
|
|
f8f32ac1fc | ||
|
|
f781a1bd96 | ||
|
|
23f69e5626 | ||
|
|
a319b82421 | ||
|
|
adebe28b52 | ||
|
|
9f38be5064 | ||
|
|
9dfaf03b31 | ||
|
|
329a0e7812 | ||
|
|
440380ac41 | ||
|
|
6eec7fe092 | ||
|
|
5ae0906b23 | ||
|
|
cc3c8f1a7c | ||
|
|
4f18b6a09a | ||
|
|
69fd3f5ba4 | ||
|
|
f83a64072b | ||
|
|
bb1937aaec | ||
|
|
5519c76639 | ||
|
|
e63376fd0a | ||
|
|
dbfd19c668 | ||
|
|
802a58d5c6 | ||
|
|
5a879071d0 | ||
|
|
8ac0152651 | ||
|
|
cffb1ef0ac | ||
|
|
c4209418a5 | ||
|
|
96256e260a | ||
|
|
6c3c6aea37 | ||
|
|
3e0d30a642 | ||
|
|
e05784fd64 | ||
|
|
bf6efbc9a9 | ||
|
|
b896fc4972 | ||
|
|
e5ef038134 | ||
|
|
19c42d46e8 | ||
|
|
5106a18e9e | ||
|
|
bcf4d20603 | ||
|
|
59cdaef4f7 | ||
|
|
9a25368c8c | ||
|
|
fafc7c7b8a | ||
|
|
a0571d3851 | ||
|
|
f02e3c4bab | ||
|
|
8ef23f9fb0 | ||
|
|
7f60bb39df | ||
|
|
cd0e7df6fc | ||
|
|
ecb2f20324 | ||
|
|
4f6ef2f3e5 | ||
|
|
b65d19f9fd | ||
|
|
fffc671219 | ||
|
|
3245eb98f4 | ||
|
|
51161526a4 | ||
|
|
e9ed9b8eec | ||
|
|
b2f65ddbf0 | ||
|
|
a511c8cc0e | ||
|
|
6993d9131e | ||
|
|
5bc0e41008 | ||
|
|
48bbef71f7 | ||
|
|
b5ea00158d | ||
|
|
cebcd9184e | ||
|
|
7d4cbca5b0 | ||
|
|
c356413294 | ||
|
|
e299a870b3 | ||
|
|
c4a436569a | ||
|
|
8d9196bed7 | ||
|
|
b529de9109 | ||
|
|
8ccd8f4f90 | ||
|
|
6f719b482b | ||
|
|
92ae05e1bc | ||
|
|
dbe6a1a05f | ||
|
|
73d64de779 | ||
|
|
dd30f53edc | ||
|
|
3af412c0e0 | ||
|
|
c3f3b824e7 | ||
|
|
18ced94241 | ||
|
|
cde16236fb | ||
|
|
e9f17da6e9 | ||
|
|
8d996fd79c | ||
|
|
e3160b27f7 | ||
|
|
ad0ec2ea93 | ||
|
|
179d5faa28 | ||
|
|
c9accfde28 | ||
|
|
edbb256c3a | ||
|
|
befd429434 | ||
|
|
6439a76c6d | ||
|
|
d86f1d00ad | ||
|
|
eaf1c0f6eb | ||
|
|
fc3dd703d8 | ||
|
|
f86f314d7e | ||
|
|
facb68b22e | ||
|
|
49201f10cb | ||
|
|
be38c1f041 | ||
|
|
2aee33f412 | ||
|
|
b1254430df | ||
|
|
0db7130f2b | ||
|
|
45722aa4f7 | ||
|
|
7288d321ae | ||
|
|
75888a1f16 | ||
|
|
03568d6ec6 | ||
|
|
f1ee5e4a16 | ||
|
|
f553dac1b0 | ||
|
|
cc5c3b5948 | ||
|
|
379d407773 | ||
|
|
8c98e7abfe | ||
|
|
a60cef9dec | ||
|
|
0ba997b4c2 | ||
|
|
5d0b48474f | ||
|
|
2b075c2881 | ||
|
|
06d3106002 | ||
|
|
be26328849 | ||
|
|
27fb31580c | ||
|
|
116a2333ec | ||
|
|
8afeda645c | ||
|
|
0a33957c94 | ||
|
|
14a3193dfb | ||
|
|
d0314a14fa | ||
|
|
49f90025a0 | ||
|
|
d79be7dd5e | ||
|
|
dfed04605d | ||
|
|
f7d346357e | ||
|
|
e01a4bcb20 | ||
|
|
ddc9a8be97 | ||
|
|
51522a2b84 | ||
|
|
ff6b717955 | ||
|
|
730c6651a0 | ||
|
|
dc2c707a98 | ||
|
|
05a752c443 | ||
|
|
b8e273b47f | ||
|
|
33ff03db58 | ||
|
|
ad20284104 | ||
|
|
90e886cfc0 | ||
|
|
2bf388a31b | ||
|
|
6a756ab654 | ||
|
|
16a67911d8 | ||
|
|
3ba1d1e43b | ||
|
|
f6e1daba05 | ||
|
|
25d693f0c1 | ||
|
|
5f2f68985b | ||
|
|
8755a249bc | ||
|
|
4795f0ca89 | ||
|
|
dfdc6d61aa | ||
|
|
0158c1a4ea | ||
|
|
5ed0b0d852 | ||
|
|
ad94787cca | ||
|
|
e1400e3667 | ||
|
|
45bee4d3c3 | ||
|
|
ed8000f333 | ||
|
|
3385fb6456 | ||
|
|
52731c000d | ||
|
|
10535d1c79 | ||
|
|
bd2ddec58f | ||
|
|
07910f0153 | ||
|
|
b364445fc2 | ||
|
|
cdbe639fe6 | ||
|
|
681a07229b | ||
|
|
e8154b50d4 | ||
|
|
e495999c62 | ||
|
|
ad118d6eef | ||
|
|
8649c59a75 | ||
|
|
c094d1e4f3 | ||
|
|
24bca1c4b4 | ||
|
|
a7ae615743 | ||
|
|
5609472fbe | ||
|
|
11a552a614 | ||
|
|
5ac14cb753 | ||
|
|
bf65f72934 | ||
|
|
0d07de9228 | ||
|
|
0ed3a2b269 | ||
|
|
c76fcdd2a2 | ||
|
|
8448691159 | ||
|
|
0ed9ec49ed | ||
|
|
30e837f31a | ||
|
|
d782fcc638 | ||
|
|
7a996f0c0d | ||
|
|
04038baf1a | ||
|
|
4354f44d9c | ||
|
|
00ecbad2d0 | ||
|
|
7c3f653112 | ||
|
|
1a6525ffa2 | ||
|
|
ee06182057 | ||
|
|
fc6b5ad585 | ||
|
|
b3d2ab442c | ||
|
|
eb17957c3d | ||
|
|
dc81d8cb67 | ||
|
|
f06a755dd2 | ||
|
|
d4f3b14c78 | ||
|
|
097b57744a | ||
|
|
d949a5d83c | ||
|
|
730cc3e3c5 | ||
|
|
5d666f533b | ||
|
|
43d0fb84e7 | ||
|
|
ffc7997723 | ||
|
|
7554e8d2ca | ||
|
|
3a14450d39 | ||
|
|
ffe8ddd95f | ||
|
|
c37537cfe7 | ||
|
|
abb2fd1027 | ||
|
|
3668e152bb | ||
|
|
8ee23a47e8 | ||
|
|
38060959c7 | ||
|
|
0b559ccb33 | ||
|
|
7a0c7bf9c8 | ||
|
|
85da0086a8 | ||
|
|
05f25f8970 | ||
|
|
03ecba2cdc | ||
|
|
92b4e70d35 | ||
|
|
369d8cd432 | ||
|
|
e4295bb46c | ||
|
|
de23b20ccf | ||
|
|
302c6cbe7f | ||
|
|
be8a607341 | ||
|
|
524233a9d0 | ||
|
|
9b58500c6a | ||
|
|
f467ba8e1f | ||
|
|
7be900a98f | ||
|
|
75c0d85fc4 | ||
|
|
cf9fd889a6 | ||
|
|
c92d09320b | ||
|
|
337e37a6cf | ||
|
|
68f056b2a0 | ||
|
|
120af964ce | ||
|
|
2392b8bc7d | ||
|
|
7dc84eaa8e | ||
|
|
7ec88b384d | ||
|
|
dfa43e6dd5 | ||
|
|
1c36eed760 | ||
|
|
dde66b8012 | ||
|
|
265052df49 | ||
|
|
9cef87d835 | ||
|
|
1bf6b3ea65 | ||
|
|
31b0dc1f20 | ||
|
|
058ce1e732 | ||
|
|
c04784c144 | ||
|
|
c8015eb33b | ||
|
|
2ea47c7f34 | ||
|
|
4f9c718803 | ||
|
|
dd7bb617be | ||
|
|
0698158eb0 | ||
|
|
b7968f6c25 | ||
|
|
c8de677eae | ||
|
|
5c03cd339e | ||
|
|
bb2dfb3f49 | ||
|
|
b8fbe4aab4 | ||
|
|
bde9c2ec39 | ||
|
|
8d923a05a9 | ||
|
|
4aecd153de | ||
|
|
0e10223029 | ||
|
|
2368c3d2de | ||
|
|
b313084af2 | ||
|
|
2a7025f962 | ||
|
|
befff9452c | ||
|
|
d70726b0d2 | ||
|
|
cb3208aa43 | ||
|
|
5fc4bd3f76 | ||
|
|
013a49474c | ||
|
|
b4aa7a9d7e | ||
|
|
e582a10133 | ||
|
|
82e68ffbf0 | ||
|
|
18c3a08471 | ||
|
|
ba7a343156 | ||
|
|
0db5b087ed | ||
|
|
87a3dc8ab9 | ||
|
|
0667bf7ae7 | ||
|
|
b8b731bd20 | ||
|
|
71f2335f5a | ||
|
|
d7c5400798 | ||
|
|
41b29a436b | ||
|
|
56bbad6b78 | ||
|
|
ef7401e4a7 | ||
|
|
b491ceeb50 | ||
|
|
f0d97a7cb4 | ||
|
|
edcdfe9619 | ||
|
|
3d39d805c7 | ||
|
|
2f7ffadfc0 | ||
|
|
e771326f60 | ||
|
|
27593e65dc | ||
|
|
57f0949e2b | ||
|
|
94567f96ef | ||
|
|
3b66a7bbd7 | ||
|
|
4862d8ffc1 | ||
|
|
abfbedc0b1 | ||
|
|
193cc42b44 | ||
|
|
f98d8115e3 | ||
|
|
b0d9198e03 | ||
|
|
d4ea1edd2c | ||
|
|
374746430d | ||
|
|
3a643ee5b8 | ||
|
|
cabf9ab27a | ||
|
|
4cbe9c501d | ||
|
|
d91e313337 | ||
|
|
a7a2fa296a | ||
|
|
bef18ecac6 | ||
|
|
1f743fe0da | ||
|
|
192f777ee8 | ||
|
|
3dcc303d10 | ||
|
|
4f6d6919ab | ||
|
|
29be9cddaf | ||
|
|
e50210c695 | ||
|
|
ed3389a72c | ||
|
|
eb242959cb | ||
|
|
05d7aa5734 | ||
|
|
57c3064785 | ||
|
|
430e8d6858 | ||
|
|
12bdee3aa7 | ||
|
|
28e0b2c4c4 | ||
|
|
b1e2ecbc03 | ||
|
|
79bf79082b | ||
|
|
09aaed4329 | ||
|
|
75d348bed6 | ||
|
|
02f591f54c | ||
|
|
3abb2db9e8 | ||
|
|
0369ee1b85 | ||
|
|
a3aed02e43 | ||
|
|
ce71d94434 | ||
|
|
99ba29bc52 | ||
|
|
1a9a1b48d7 | ||
|
|
e9134b15eb | ||
|
|
cb5802e854 | ||
|
|
d71ee81676 | ||
|
|
3006ccb7f0 | ||
|
|
e7b2b097ed | ||
|
|
049777d6c5 | ||
|
|
4b442c309d | ||
|
|
d1ca21d50a | ||
|
|
58ad54e7a1 | ||
|
|
1e31fdb76d | ||
|
|
17871ac914 | ||
|
|
5a509f9e54 | ||
|
|
7fbffa6c44 | ||
|
|
5354adc403 | ||
|
|
9f8ba2eb82 | ||
|
|
cb96608fd8 | ||
|
|
e324449349 | ||
|
|
59d076caed | ||
|
|
ab22160a1c | ||
|
|
101eafb044 | ||
|
|
af73e16c9c | ||
|
|
4049ba866e | ||
|
|
b4d8349237 | ||
|
|
86899552cc | ||
|
|
e1358d1460 | ||
|
|
c91770549f | ||
|
|
2d750a15a9 | ||
|
|
9147a31b94 | ||
|
|
7c955e0eb8 | ||
|
|
191341af50 | ||
|
|
10dd0b3efe | ||
|
|
4283f9552f | ||
|
|
29b3a7d842 | ||
|
|
1c1a02d244 | ||
|
|
7ee8a7e69f | ||
|
|
9b6b11f02a | ||
|
|
67e573d718 | ||
|
|
6327c54c4b | ||
|
|
78f6c1d71f | ||
|
|
c4a38bd127 | ||
|
|
9bde348ae8 | ||
|
|
88631dad8f | ||
|
|
f6c213c87d | ||
|
|
999e3233f3 | ||
|
|
fb8b3ad23d | ||
|
|
9536688b37 | ||
|
|
df4df8e0d5 | ||
|
|
5f5fac6b92 | ||
|
|
bfafcf89b8 | ||
|
|
1092590ef4 | ||
|
|
4b67376e42 | ||
|
|
46bb4dd124 | ||
|
|
391fac1fc8 | ||
|
|
e8dd921ef9 | ||
|
|
6bff1768cf | ||
|
|
ac9d87e325 | ||
|
|
aabd651ae8 | ||
|
|
bb4bfb9ae6 | ||
|
|
975afc508d | ||
|
|
5a75f5bc91 | ||
|
|
074f247926 | ||
|
|
7a8f04b826 | ||
|
|
adbdedda7a | ||
|
|
174cd00290 | ||
|
|
5296ecb946 | ||
|
|
e61082015d | ||
|
|
087eab022f | ||
|
|
b890abb4f3 | ||
|
|
b4d6541fe8 | ||
|
|
f872cfcb45 | ||
|
|
2b8fab6828 | ||
|
|
3a4f820d62 | ||
|
|
74dd289a1c | ||
|
|
dfd73d7e16 | ||
|
|
303391ea41 | ||
|
|
31bd3147d1 | ||
|
|
f03d68a7d0 | ||
|
|
dea89f2a52 | ||
|
|
a6f99bb3e3 | ||
|
|
6ddbca6f2b | ||
|
|
9bc6ba0be9 | ||
|
|
34de85dab8 | ||
|
|
f98e145c5b | ||
|
|
2420320b96 | ||
|
|
769551c336 | ||
|
|
174d00fbb8 | ||
|
|
a02efbe1f8 | ||
|
|
ea5626179e | ||
|
|
23c1f7e506 | ||
|
|
cb578fae92 | ||
|
|
ee83b59e5e | ||
|
|
55a10b7acd | ||
|
|
93f2d25a9a | ||
|
|
3f66b8acb0 | ||
|
|
0ea363746e | ||
|
|
6aae115d15 | ||
|
|
53fbf143db | ||
|
|
30e58374a3 | ||
|
|
3adcc033f6 | ||
|
|
b9886abd86 | ||
|
|
56f17ab3d0 | ||
|
|
92e540df1e | ||
|
|
770235900e | ||
|
|
9845c4c4a7 | ||
|
|
172d0c401e | ||
|
|
e93a950b70 | ||
|
|
65975a3b5f | ||
|
|
0ee14aa594 | ||
|
|
15afdf94ef | ||
|
|
1bd5f61c60 | ||
|
|
31cdf770a4 | ||
|
|
3c40aa004a | ||
|
|
ab112d2c4f | ||
|
|
e07f78d76e | ||
|
|
4885809eb9 | ||
|
|
8b9d2c27b4 | ||
|
|
1f10186476 | ||
|
|
d7143986b1 | ||
|
|
b1947cee82 | ||
|
|
ace465a9f9 | ||
|
|
c1bc3be806 | ||
|
|
3c22af0d35 | ||
|
|
2980cbd55f | ||
|
|
bfbeef3609 | ||
|
|
dc1ac23b9f | ||
|
|
7e650ebee4 | ||
|
|
f0d3fe5d95 | ||
|
|
a27b1d4d32 | ||
|
|
63c3a6444b | ||
|
|
5613c3441f | ||
|
|
8801c65a4b | ||
|
|
7f2863196f | ||
|
|
cd8245077c | ||
|
|
22fab3199f | ||
|
|
08050d6524 | ||
|
|
0fedfcafb5 | ||
|
|
e713f83064 | ||
|
|
65320aa38d | ||
|
|
f10e43ac94 | ||
|
|
ea95e83f5c | ||
|
|
61da2bf028 | ||
|
|
16e352248d | ||
|
|
8d648e7a8a | ||
|
|
8bf192b4d1 | ||
|
|
35d2dbb9f5 | ||
|
|
f1722ff512 | ||
|
|
115fbc3540 | ||
|
|
0795dceda7 | ||
|
|
9a3a257374 | ||
|
|
6a49d41c5b | ||
|
|
8d3220643c | ||
|
|
9d1e9ce4bd | ||
|
|
30488dddf0 | ||
|
|
6b9e3b7b06 | ||
|
|
29ff62a149 | ||
|
|
f9f09069a8 | ||
|
|
f78bfda4b8 | ||
|
|
16dea1c577 | ||
|
|
2d957c6b9f | ||
|
|
9212a1b401 | ||
|
|
30b988f09a | ||
|
|
6070c734f2 | ||
|
|
7d2c09c905 | ||
|
|
6acf326969 | ||
|
|
cfbc8e264d | ||
|
|
498491555e | ||
|
|
8b1baa10ee | ||
|
|
e00eb55cd2 | ||
|
|
4247477b61 | ||
|
|
bfbe6925df | ||
|
|
0cc7aa250e | ||
|
|
9ca3ab1168 | ||
|
|
a08ba418ef | ||
|
|
4472144220 | ||
|
|
4bef0cfcfd | ||
|
|
2b73dfea75 | ||
|
|
784087390a | ||
|
|
3852bf4f24 | ||
|
|
f8d2a46daa | ||
|
|
686edad5c5 | ||
|
|
49f8e9571c | ||
|
|
d21ff4b72e | ||
|
|
89cf503880 | ||
|
|
dc8fc06e53 | ||
|
|
58c103e09c | ||
|
|
529d862573 | ||
|
|
c592655c0f | ||
|
|
d4086d6b04 | ||
|
|
f5b7ad718a | ||
|
|
2fc568b2e7 | ||
|
|
f0dc3b44df | ||
|
|
62bc422df1 | ||
|
|
d52283111d | ||
|
|
9bbd5e8dd6 | ||
|
|
7f434f1005 | ||
|
|
4d59a96b98 | ||
|
|
2845d7160e | ||
|
|
e20790c956 | ||
|
|
a23b305e6b | ||
|
|
68e9315c7d | ||
|
|
8fc9f64df9 | ||
|
|
7b61a857ba | ||
|
|
aba6ec896f | ||
|
|
0d8d3dc170 | ||
|
|
293d9132d7 | ||
|
|
46fd0b62f8 | ||
|
|
e10903c785 | ||
|
|
286a7b6b9a | ||
|
|
488ae9051e | ||
|
|
13d1861034 | ||
|
|
3fbf9d3ea1 | ||
|
|
7fe67ae949 | ||
|
|
717a4eb6e1 | ||
|
|
23f97f9a66 | ||
|
|
5311a3b7b5 | ||
|
|
96a07ba867 | ||
|
|
7278c455bc | ||
|
|
11f26b42e3 | ||
|
|
921d05ddcf | ||
|
|
b9552250cb | ||
|
|
9fda5253fd | ||
|
|
ccdb0287e8 | ||
|
|
20d145efef | ||
|
|
fd9c3ad389 | ||
|
|
97a88e2248 | ||
|
|
8bdc23add2 | ||
|
|
c2f42583c0 | ||
|
|
01f8e5dbb8 | ||
|
|
8c99d104e3 | ||
|
|
91683d19a8 | ||
|
|
44b84cb5a6 | ||
|
|
7467735258 | ||
|
|
7749d7945f | ||
|
|
93ee6b8a22 | ||
|
|
80ab2c0f22 | ||
|
|
06d164306b | ||
|
|
ecf5556bea | ||
|
|
2ad82b0083 | ||
|
|
330b26c9df | ||
|
|
ccff953c25 | ||
|
|
ecd812b4d6 | ||
|
|
ebf7641610 | ||
|
|
f595ab93eb | ||
|
|
266f491ff8 | ||
|
|
deae7d33f1 | ||
|
|
d7faee2566 | ||
|
|
39ddf9991f | ||
|
|
4df4a8e731 | ||
|
|
0d2a03c290 | ||
|
|
76fa1c181c | ||
|
|
f6a16bbd4a | ||
|
|
102a397e39 | ||
|
|
c8aa1ee9e6 | ||
|
|
d54d482af0 | ||
|
|
702c022016 | ||
|
|
ef0e68bfc3 | ||
|
|
7dbc6768d6 | ||
|
|
42ee8c853a | ||
|
|
25cd3168a7 | ||
|
|
8c12e488f7 | ||
|
|
e2a06db7f3 | ||
|
|
e20b702418 | ||
|
|
275a6a3bec | ||
|
|
76e17b54ea | ||
|
|
d39b3209fb | ||
|
|
d76ed0da1c | ||
|
|
f0a07b7546 | ||
|
|
3687648384 | ||
|
|
10814aaf3b | ||
|
|
f87e0c03ee | ||
|
|
622cffee9d | ||
|
|
f70121ed90 | ||
|
|
860e76b9a5 | ||
|
|
8da5e5290f | ||
|
|
21c2871667 | ||
|
|
ab992d40b0 | ||
|
|
e74c245e29 | ||
|
|
3c092eff4a | ||
|
|
860d4f6177 | ||
|
|
b097be17ef | ||
|
|
d81e1caa71 | ||
|
|
8b1b809ab4 | ||
|
|
c0405c3024 | ||
|
|
ef2b2a6c92 | ||
|
|
d2b3188c61 | ||
|
|
edaafacf36 | ||
|
|
01cc622e7b | ||
|
|
955ca7382d | ||
|
|
e0e81288cd | ||
|
|
4dad408ead | ||
|
|
8cf29aafec | ||
|
|
5009724f40 | ||
|
|
dc7b3d7597 | ||
|
|
6755118493 | ||
|
|
950c354b3d | ||
|
|
c727f0797b | ||
|
|
52909b5dbe | ||
|
|
08f66d8509 | ||
|
|
9bbffd019c | ||
|
|
d637c9cc03 | ||
|
|
859af8662f | ||
|
|
de3a4af1bf | ||
|
|
d8f4837fc5 | ||
|
|
4be5667b2c | ||
|
|
c0a29b30c9 | ||
|
|
6e4b5f2345 | ||
|
|
92a3ff9182 | ||
|
|
dd5dff3096 |
@@ -7,6 +7,8 @@ libtool
|
|||||||
/isc-config.sh
|
/isc-config.sh
|
||||||
/configure.lineno
|
/configure.lineno
|
||||||
autom4te.cache/
|
autom4te.cache/
|
||||||
|
*.rej
|
||||||
|
*.orig
|
||||||
*.o
|
*.o
|
||||||
*.lo
|
*.lo
|
||||||
*.so
|
*.so
|
||||||
|
|||||||
+174
-9
@@ -2,7 +2,7 @@ variables:
|
|||||||
DEBIAN_FRONTEND: noninteractive
|
DEBIAN_FRONTEND: noninteractive
|
||||||
LC_ALL: C
|
LC_ALL: C
|
||||||
DOCKER_DRIVER: overlay2
|
DOCKER_DRIVER: overlay2
|
||||||
CI_REGISTRY_IMAGE: oerdnj/bind9
|
CI_REGISTRY_IMAGE: registry.gitlab.isc.org/isc-projects/images/bind9
|
||||||
CCACHE_DIR: "/ccache"
|
CCACHE_DIR: "/ccache"
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
@@ -10,85 +10,111 @@ stages:
|
|||||||
- build
|
- build
|
||||||
- test
|
- test
|
||||||
|
|
||||||
|
.centos-centos6-amd64: ¢os_centos6_amd64_image
|
||||||
|
image: "$CI_REGISTRY_IMAGE:centos-centos6-amd64"
|
||||||
|
tags:
|
||||||
|
- linux
|
||||||
|
- docker
|
||||||
|
- amd64
|
||||||
|
|
||||||
|
.centos-centos7-amd64: ¢os_centos7_amd64_image
|
||||||
|
image: "$CI_REGISTRY_IMAGE:centos-centos7-amd64"
|
||||||
|
tags:
|
||||||
|
- linux
|
||||||
|
- docker
|
||||||
|
- amd64
|
||||||
|
|
||||||
.debian-jessie-amd64: &debian_jessie_amd64_image
|
.debian-jessie-amd64: &debian_jessie_amd64_image
|
||||||
image: "$CI_REGISTRY_IMAGE:debian-jessie-amd64"
|
image: "$CI_REGISTRY_IMAGE:debian-jessie-amd64"
|
||||||
tags:
|
tags:
|
||||||
- linux
|
- linux
|
||||||
- docker
|
- docker
|
||||||
|
- amd64
|
||||||
|
|
||||||
.debian-jessie-i386: &debian_jessie_i386_image
|
.debian-jessie-i386: &debian_jessie_i386_image
|
||||||
image: "$CI_REGISTRY_IMAGE:debian-jessie-i386"
|
image: "$CI_REGISTRY_IMAGE:debian-jessie-i386"
|
||||||
tags:
|
tags:
|
||||||
- linux
|
- linux
|
||||||
- docker
|
- docker
|
||||||
|
- i386
|
||||||
|
|
||||||
.debian-stretch-amd64: &debian_stretch_amd64_image
|
.debian-stretch-amd64: &debian_stretch_amd64_image
|
||||||
image: "$CI_REGISTRY_IMAGE:debian-stretch-amd64"
|
image: "$CI_REGISTRY_IMAGE:debian-stretch-amd64"
|
||||||
tags:
|
tags:
|
||||||
- linux
|
- linux
|
||||||
- docker
|
- docker
|
||||||
|
- amd64
|
||||||
|
|
||||||
.debian-stretch-i386:: &debian_stretch_i386_image
|
.debian-stretch-i386:: &debian_stretch_i386_image
|
||||||
image: "$CI_REGISTRY_IMAGE:debian-stretch-i386"
|
image: "$CI_REGISTRY_IMAGE:debian-stretch-i386"
|
||||||
tags:
|
tags:
|
||||||
- linux
|
- linux
|
||||||
- docker
|
- docker
|
||||||
|
- i386
|
||||||
|
|
||||||
.debian-buster-amd64: &debian_buster_amd64_image
|
.debian-buster-amd64: &debian_buster_amd64_image
|
||||||
image: "$CI_REGISTRY_IMAGE:debian-buster-amd64"
|
image: "$CI_REGISTRY_IMAGE:debian-buster-amd64"
|
||||||
tags:
|
tags:
|
||||||
- linux
|
- linux
|
||||||
- docker
|
- docker
|
||||||
|
- amd64
|
||||||
|
|
||||||
.debian-buster-i386:: &debian_buster_i386_image
|
.debian-buster-i386:: &debian_buster_i386_image
|
||||||
image: "$CI_REGISTRY_IMAGE:debian-buster-i386"
|
image: "$CI_REGISTRY_IMAGE:debian-buster-i386"
|
||||||
tags:
|
tags:
|
||||||
- linux
|
- linux
|
||||||
- docker
|
- docker
|
||||||
|
- i386
|
||||||
|
|
||||||
.debian-sid-amd64: &debian_sid_amd64_image
|
.debian-sid-amd64: &debian_sid_amd64_image
|
||||||
image: "$CI_REGISTRY_IMAGE:debian-sid-amd64"
|
image: "$CI_REGISTRY_IMAGE:debian-sid-amd64"
|
||||||
tags:
|
tags:
|
||||||
- linux
|
- linux
|
||||||
- docker
|
- docker
|
||||||
|
- amd64
|
||||||
|
|
||||||
.debian-sid-i386: &debian_sid_i386_image
|
.debian-sid-i386: &debian_sid_i386_image
|
||||||
image: "$CI_REGISTRY_IMAGE:debian-sid-i386"
|
image: "$CI_REGISTRY_IMAGE:debian-sid-i386"
|
||||||
tags:
|
tags:
|
||||||
- linux
|
- linux
|
||||||
- docker
|
- docker
|
||||||
|
- i386
|
||||||
|
|
||||||
.ubuntu-trusty-amd64: &ubuntu_trusty_amd64_image
|
.ubuntu-trusty-amd64: &ubuntu_trusty_amd64_image
|
||||||
image: "$CI_REGISTRY_IMAGE:ubuntu-trusty-amd64"
|
image: "$CI_REGISTRY_IMAGE:ubuntu-trusty-amd64"
|
||||||
tags:
|
tags:
|
||||||
- linux
|
- linux
|
||||||
- docker
|
- docker
|
||||||
|
- amd64
|
||||||
|
|
||||||
.ubuntu-trusty-i386: &ubuntu_trusty_i386_image
|
.ubuntu-trusty-i386: &ubuntu_trusty_i386_image
|
||||||
image: "$CI_REGISTRY_IMAGE:ubuntu-trusty-i386"
|
image: "$CI_REGISTRY_IMAGE:ubuntu-trusty-i386"
|
||||||
tags:
|
tags:
|
||||||
- linux
|
- linux
|
||||||
- docker
|
- docker
|
||||||
|
- i386
|
||||||
|
|
||||||
.ubuntu-xenial-amd64: &ubuntu_xenial_amd64_image
|
.ubuntu-xenial-amd64: &ubuntu_xenial_amd64_image
|
||||||
image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-amd64"
|
image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-amd64"
|
||||||
tags:
|
tags:
|
||||||
- linux
|
- linux
|
||||||
- docker
|
- docker
|
||||||
|
- amd64
|
||||||
|
|
||||||
.ubuntu-xenial-i386: &ubuntu_xenial_i386_image
|
.ubuntu-xenial-i386: &ubuntu_xenial_i386_image
|
||||||
image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-i386"
|
image: "$CI_REGISTRY_IMAGE:ubuntu-xenial-i386"
|
||||||
tags:
|
tags:
|
||||||
- linux
|
- linux
|
||||||
- docker
|
- docker
|
||||||
|
- i386
|
||||||
|
|
||||||
.build: &build_job
|
.build: &build_job
|
||||||
stage: build
|
stage: build
|
||||||
before_script:
|
before_script:
|
||||||
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
|
- test -w "${CCACHE_DIR}" && export PATH="/usr/lib/ccache:${PATH}"
|
||||||
- ./autogen.sh
|
# - ./autogen.sh
|
||||||
script:
|
script:
|
||||||
- ./configure --enable-developer --with-libtool --disable-static --with-atf=/usr/local --with-libidn2
|
- ./configure --enable-developer --with-libtool --disable-static --with-atf=/usr $EXTRA_CONFIGURE
|
||||||
- make -j${PARALLEL_JOBS_BUILD:-1} -k all V=1
|
- make -j${PARALLEL_JOBS_BUILD:-1} -k all V=1
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: '1 hour'
|
expire_in: '1 hour'
|
||||||
@@ -99,8 +125,12 @@ stages:
|
|||||||
before_script:
|
before_script:
|
||||||
- rm -rf .ccache
|
- rm -rf .ccache
|
||||||
- bash -x bin/tests/system/ifconfig.sh up
|
- bash -x bin/tests/system/ifconfig.sh up
|
||||||
|
- export SOFTHSM_CONF="/tmp/softhsm.conf"
|
||||||
|
- echo "0:/tmp/softhsm.db" > $SOFTHSM_CONF
|
||||||
|
- if command -v softhsm2-util >/dev/null; then softhsm2-util --init-token --free --pin 0000 --so-pin 0000 --label "softhsm"; fi
|
||||||
script:
|
script:
|
||||||
- cd bin/tests && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1
|
- ( cd bin/tests && make -j${TEST_PARALLEL_JOBS:-1} -k test V=1 )
|
||||||
|
- test -s bin/tests/system/systests.output
|
||||||
artifacts:
|
artifacts:
|
||||||
untracked: true
|
untracked: true
|
||||||
expire_in: '1 week'
|
expire_in: '1 week'
|
||||||
@@ -110,6 +140,9 @@ stages:
|
|||||||
stage: test
|
stage: test
|
||||||
before_script:
|
before_script:
|
||||||
- export KYUA_RESULT="$CI_PROJECT_DIR/kyua.results"
|
- export KYUA_RESULT="$CI_PROJECT_DIR/kyua.results"
|
||||||
|
- export SOFTHSM_CONF="/tmp/softhsm.conf"
|
||||||
|
- echo "0:/tmp/softhsm.db" > $SOFTHSM_CONF
|
||||||
|
- if command -v softhsm2-util >/dev/null; then softhsm2-util --init-token --free --pin 0000 --so-pin 0000 --label "softhsm"; fi
|
||||||
script:
|
script:
|
||||||
- make unit
|
- make unit
|
||||||
after_script:
|
after_script:
|
||||||
@@ -127,13 +160,17 @@ precheck:debian:sid:amd64:
|
|||||||
<<: *debian_sid_amd64_image
|
<<: *debian_sid_amd64_image
|
||||||
stage: precheck
|
stage: precheck
|
||||||
script:
|
script:
|
||||||
|
- sh util/checklibs.sh > checklibs.out
|
||||||
- perl util/check-changes CHANGES
|
- perl util/check-changes CHANGES
|
||||||
- perl -w util/merge_copyrights
|
- perl -w util/merge_copyrights
|
||||||
- diff -urNap util/copyrights util/newcopyrights
|
- diff -urNap util/copyrights util/newcopyrights
|
||||||
- rm util/newcopyrights
|
- rm util/newcopyrights
|
||||||
|
- xmllint --noout --nonet `git ls-files '*.xml' '*.docbook'`
|
||||||
|
- xmllint --noout --nonet --html `git ls-files '*.html'`
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- util/newcopyrights
|
- util/newcopyrights
|
||||||
|
- checklibs.out
|
||||||
expire_in: '1 week'
|
expire_in: '1 week'
|
||||||
when: on_failure
|
when: on_failure
|
||||||
|
|
||||||
@@ -161,34 +198,162 @@ precheck:debian:sid:amd64:
|
|||||||
# <<: *ubuntu_xenial_i386_image
|
# <<: *ubuntu_xenial_i386_image
|
||||||
# <<: *build_job
|
# <<: *build_job
|
||||||
|
|
||||||
build:debian:sid:amd64:
|
build:centos:centos6:amd64:
|
||||||
|
variables:
|
||||||
|
CC: gcc
|
||||||
|
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||||
|
EXTRA_CONFIGURE: "--with-libidn2 --disable-warn-error"
|
||||||
|
<<: *centos_centos6_amd64_image
|
||||||
|
<<: *build_job
|
||||||
|
|
||||||
|
build:centos:centos7:amd64:
|
||||||
|
variables:
|
||||||
|
CC: gcc
|
||||||
|
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||||
|
EXTRA_CONFIGURE: "--with-libidn2"
|
||||||
|
<<: *centos_centos7_amd64_image
|
||||||
|
<<: *build_job
|
||||||
|
|
||||||
|
build:clang:debian:sid:amd64:
|
||||||
|
variables:
|
||||||
|
CC: clang-6.0
|
||||||
|
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
|
||||||
|
EXTRA_CONFIGURE: "--with-libidn2"
|
||||||
<<: *debian_sid_amd64_image
|
<<: *debian_sid_amd64_image
|
||||||
<<: *build_job
|
<<: *build_job
|
||||||
|
|
||||||
build:debian:sid:i386:
|
build:debian:jessie:amd64:
|
||||||
|
variables:
|
||||||
|
CC: gcc
|
||||||
|
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||||
|
<<: *debian_jessie_amd64_image
|
||||||
|
<<: *build_job
|
||||||
|
|
||||||
|
build:debian:stretch:amd64:
|
||||||
|
variables:
|
||||||
|
CC: gcc
|
||||||
|
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||||
|
<<: *debian_stretch_amd64_image
|
||||||
|
<<: *build_job
|
||||||
|
|
||||||
|
build:debian:sid:amd64:
|
||||||
|
variables:
|
||||||
|
CC: gcc
|
||||||
|
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||||
|
EXTRA_CONFIGURE: "--with-libidn2"
|
||||||
|
<<: *debian_sid_amd64_image
|
||||||
|
<<: *build_job
|
||||||
|
|
||||||
|
build:clang:debian:sid:i386:
|
||||||
|
variables:
|
||||||
|
CC: clang-6.0
|
||||||
|
CFLAGS: "-Wall -Wextra -Wenum-conversion -O2 -g"
|
||||||
|
EXTRA_CONFIGURE: "--with-libidn2"
|
||||||
<<: *debian_sid_i386_image
|
<<: *debian_sid_i386_image
|
||||||
<<: *build_job
|
<<: *build_job
|
||||||
|
|
||||||
|
build:debian:sid:i386:
|
||||||
|
variables:
|
||||||
|
CC: gcc
|
||||||
|
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||||
|
EXTRA_CONFIGURE: "--with-libidn2"
|
||||||
|
<<: *debian_sid_i386_image
|
||||||
|
<<: *build_job
|
||||||
|
|
||||||
|
unittest:centos:centos6:amd64:
|
||||||
|
<<: *centos_centos6_amd64_image
|
||||||
|
<<: *unit_test_job
|
||||||
|
dependencies:
|
||||||
|
- build:centos:centos6:amd64
|
||||||
|
|
||||||
|
unittest:centos:centos7:amd64:
|
||||||
|
<<: *centos_centos7_amd64_image
|
||||||
|
<<: *unit_test_job
|
||||||
|
dependencies:
|
||||||
|
- build:centos:centos7:amd64
|
||||||
|
|
||||||
|
unittest:debian:jessie:amd64:
|
||||||
|
<<: *debian_jessie_amd64_image
|
||||||
|
<<: *unit_test_job
|
||||||
|
dependencies:
|
||||||
|
- build:debian:jessie:amd64
|
||||||
|
|
||||||
|
unittest:debian:stretch:amd64:
|
||||||
|
<<: *debian_stretch_amd64_image
|
||||||
|
<<: *unit_test_job
|
||||||
|
dependencies:
|
||||||
|
- build:debian:stretch:amd64
|
||||||
|
|
||||||
unittest:debian:sid:amd64:
|
unittest:debian:sid:amd64:
|
||||||
<<: *debian_sid_amd64_image
|
<<: *debian_sid_amd64_image
|
||||||
<<: *unit_test_job
|
<<: *unit_test_job
|
||||||
dependencies:
|
dependencies:
|
||||||
- build:debian:sid:amd64
|
- build:debian:sid:amd64
|
||||||
|
|
||||||
|
unittest:clang:debian:sid:amd64:
|
||||||
|
<<: *debian_sid_amd64_image
|
||||||
|
<<: *unit_test_job
|
||||||
|
dependencies:
|
||||||
|
- build:clang:debian:sid:amd64
|
||||||
|
|
||||||
unittest:debian:sid:i386:
|
unittest:debian:sid:i386:
|
||||||
<<: *debian_sid_i386_image
|
<<: *debian_sid_i386_image
|
||||||
<<: *unit_test_job
|
<<: *unit_test_job
|
||||||
dependencies:
|
dependencies:
|
||||||
- build:debian:sid:i386
|
- build:debian:sid:i386
|
||||||
|
|
||||||
|
systemtest:centos:centos6:amd64:
|
||||||
|
<<: *centos_centos6_amd64_image
|
||||||
|
<<: *system_test_job
|
||||||
|
dependencies:
|
||||||
|
- build:centos:centos6:amd64
|
||||||
|
|
||||||
|
systemtest:centos:centos7:amd64:
|
||||||
|
<<: *centos_centos7_amd64_image
|
||||||
|
<<: *system_test_job
|
||||||
|
dependencies:
|
||||||
|
- build:centos:centos7:amd64
|
||||||
|
|
||||||
|
systemtest:debian:jessie:amd64:
|
||||||
|
<<: *debian_jessie_amd64_image
|
||||||
|
<<: *system_test_job
|
||||||
|
dependencies:
|
||||||
|
- build:debian:jessie:amd64
|
||||||
|
|
||||||
|
systemtest:debian:stretch:amd64:
|
||||||
|
<<: *debian_stretch_amd64_image
|
||||||
|
<<: *system_test_job
|
||||||
|
dependencies:
|
||||||
|
- build:debian:stretch:amd64
|
||||||
|
|
||||||
systemtest:debian:sid:amd64:
|
systemtest:debian:sid:amd64:
|
||||||
<<: *debian_sid_amd64_image
|
<<: *debian_sid_amd64_image
|
||||||
<<: *system_test_job
|
<<: *system_test_job
|
||||||
dependencies:
|
dependencies:
|
||||||
- build:debian:sid:amd64
|
- build:debian:sid:amd64
|
||||||
|
|
||||||
systemtest:debian:sid:i386:
|
systemtest:debian:sid:i386:
|
||||||
<<: *debian_sid_i386_image
|
<<: *debian_sid_i386_image
|
||||||
<<: *system_test_job
|
<<: *system_test_job
|
||||||
dependencies:
|
dependencies:
|
||||||
- build:debian:sid:i386
|
- build:debian:sid:i386
|
||||||
|
|
||||||
|
pkcs11:build:debian:sid:amd64:
|
||||||
|
variables:
|
||||||
|
CC: gcc
|
||||||
|
CFLAGS: "-Wall -Wextra -O2 -g"
|
||||||
|
EXTRA_CONFIGURE: "--enable-native-pkcs11 --with-pkcs11=/usr/lib/softhsm/libsofthsm2.so"
|
||||||
|
<<: *debian_sid_amd64_image
|
||||||
|
<<: *build_job
|
||||||
|
|
||||||
|
pkcs11:unittest:debian:sid:amd64:
|
||||||
|
<<: *debian_sid_amd64_image
|
||||||
|
<<: *unit_test_job
|
||||||
|
dependencies:
|
||||||
|
- pkcs11:build:debian:sid:amd64
|
||||||
|
|
||||||
|
pkcs11:systemtest:debian:sid:amd64:
|
||||||
|
<<: *debian_sid_amd64_image
|
||||||
|
<<: *system_test_job
|
||||||
|
dependencies:
|
||||||
|
- pkcs11:build:debian:sid:amd64
|
||||||
|
|||||||
@@ -1,3 +1,329 @@
|
|||||||
|
5007. [cleanup] Replace custom ISC boolean and integer data types
|
||||||
|
with C99 stdint.h and stdbool.h types. [GL #9]
|
||||||
|
|
||||||
|
5006. [cleanup] Code preparing a delegation response was extracted from
|
||||||
|
query_delegation() and query_zone_delegation() into a
|
||||||
|
separate function in order to decrease code
|
||||||
|
duplication. [GL #431]
|
||||||
|
|
||||||
|
5005. [bug] dnssec-verify, and dnssec-signzone at the verification
|
||||||
|
step, failed on some validly signed zones. [GL #442]
|
||||||
|
|
||||||
|
5004. [bug] 'rndc reconfig' could cause inline zones to stop
|
||||||
|
re-signing. [GL #439]
|
||||||
|
|
||||||
|
5003. [bug] dns_acl_isinsecure did not handle geoip elements.
|
||||||
|
[GL #406]
|
||||||
|
|
||||||
|
5002. [bug] mdig: Handle malformed +ednsopt option, support 100
|
||||||
|
+ednsopt options per query rather than 100 total and
|
||||||
|
address memory leaks if +ednsopt was specified.
|
||||||
|
[GL #410]
|
||||||
|
|
||||||
|
5001. [bug] Fix refcount errors on error paths. [GL !563]
|
||||||
|
|
||||||
|
5000. [bug] named_server_servestale() could leave the server in
|
||||||
|
exclusive mode if an error occured. [GL #441]
|
||||||
|
|
||||||
|
4999. [cleanup] Remove custom printf implementaion in lib/isc/print.c.
|
||||||
|
[GL #261]
|
||||||
|
|
||||||
|
4998. [test] Make resolver and cacheclean tests more civilized.
|
||||||
|
|
||||||
|
4997. [security] named could crash during recursive processing
|
||||||
|
of DNAME records when "deny-answer-aliases" was
|
||||||
|
in use. (CVE-2018-5740) [GL #387]
|
||||||
|
|
||||||
|
4996. [bug] dig: Handle malformed +ednsopt option. [GL #403]
|
||||||
|
|
||||||
|
4995. [test] Add tests for "tcp-self" update policy. [GL !282]
|
||||||
|
|
||||||
|
4994. [bug] Trust anchor telemetry queries were not being sent
|
||||||
|
upstream for locally served zones. [GL #392]
|
||||||
|
|
||||||
|
4993. [cleanup] Remove support for silently ignoring 'no-change' deltas
|
||||||
|
from BIND 8 when processing an IXFR stream. 'no-change'
|
||||||
|
deltas will now trigger a fallback to AXFR as the
|
||||||
|
recovery mechanism. [GL #369]
|
||||||
|
|
||||||
|
4992. [bug] The wrong address was being logged for trust anchor
|
||||||
|
telemetry queries. [GL #379]
|
||||||
|
|
||||||
|
4991. [bug] "rndc reconfig" was incorrectly handling zones whose
|
||||||
|
"mirror" setting was changed. [GL #381]
|
||||||
|
|
||||||
|
4990. [bug] Prevent a possible NULL reference in pkcs11-keygen.
|
||||||
|
[GL #401]
|
||||||
|
|
||||||
|
4989. [cleanup] IDN support in dig has been reworked. IDNA2003
|
||||||
|
fallbacks were removed in the process. [GL #384]
|
||||||
|
|
||||||
|
4988. [bug] Don't synthesize NXDOMAIN from NSEC for records under
|
||||||
|
a DNAME.
|
||||||
|
|
||||||
|
--- 9.13.2 released ---
|
||||||
|
|
||||||
|
4987. [cleanup] dns_rdataslab_tordataset() and its related
|
||||||
|
dns_rdatasetmethods_t callbacks were removed as they
|
||||||
|
were not being used by anything in BIND. [GL #371]
|
||||||
|
|
||||||
|
4986. [func] When built on Linux, BIND now requires the libcap
|
||||||
|
library to set process privileges, unless capability
|
||||||
|
support is explicitly overridden with "configure
|
||||||
|
--disable-linux-caps". [GL #321]
|
||||||
|
|
||||||
|
4985. [func] Add a new slave zone option, "mirror", to enable
|
||||||
|
serving a non-authoritative copy of a zone that
|
||||||
|
is subject to DNSSEC validation before being
|
||||||
|
used. For now, this option is only meant to
|
||||||
|
facilitate deployment of an RFC 7706-style local
|
||||||
|
copy of the root zone. [GL #33]
|
||||||
|
|
||||||
|
4984. [bug] Improve handling of very large incremental
|
||||||
|
zone transfers to prevent journal corruption. [GL #339]
|
||||||
|
|
||||||
|
4983. [func] Add the ability to not return a DNS COOKIE option
|
||||||
|
when one is present in the request (answer-cookie no;).
|
||||||
|
[GL #173]
|
||||||
|
|
||||||
|
4982. [cleanup] Return FORMERR if the question section is empty
|
||||||
|
and no COOKIE option is present; this restores
|
||||||
|
older behavior except in the newly specified
|
||||||
|
COOKIE case. [GL #260]
|
||||||
|
|
||||||
|
4981. [bug] Fix race in cmsg buffer usage in socket code.
|
||||||
|
[GL #180]
|
||||||
|
|
||||||
|
4980. [bug] Named-checkconf failed to detect bad in-view targets.
|
||||||
|
[GL #288]
|
||||||
|
|
||||||
|
4979. [placeholder]
|
||||||
|
|
||||||
|
4978. [test] Fix error handling and resolver configuration in the
|
||||||
|
"rpz" system test. [GL #312]
|
||||||
|
|
||||||
|
4977. [func] When starting up, log the same details that
|
||||||
|
would be reported by 'named -V'. [GL #247]
|
||||||
|
|
||||||
|
4976. [bug] Log the label with invalid prefix length correctly
|
||||||
|
when loading RPZ zones. [GL #254]
|
||||||
|
|
||||||
|
4975. [bug] The server cookie computation for sha1 and sha256 did
|
||||||
|
not match the method described in RFC 7873. [GL #356]
|
||||||
|
|
||||||
|
4974. [bug] Restore default rrset-order to random. [GL #336]
|
||||||
|
|
||||||
|
4973. [func] verifyzone() and the functions it uses were moved to
|
||||||
|
libdns and refactored to prevent exit() from being
|
||||||
|
called upon failure. A side effect of that is that
|
||||||
|
dnssec-signzone and dnssec-verify now check for memory
|
||||||
|
leaks upon shutdown. [GL #266]
|
||||||
|
|
||||||
|
4972. [func] Declare the 'rdata' argument for dns_rdata_tostruct()
|
||||||
|
to be const. [GL #341]
|
||||||
|
|
||||||
|
4971. [bug] dnssec-signzone and dnssec-verify did not treat records
|
||||||
|
below a DNAME as out-of-zone data. [GL #298]
|
||||||
|
|
||||||
|
4970. [func] Add QNAME minimization option to resolver. [GL #16]
|
||||||
|
|
||||||
|
4969. [cleanup] Refactor zone logging functions. [GL #269]
|
||||||
|
|
||||||
|
--- 9.13.1 released ---
|
||||||
|
|
||||||
|
4968. [bug] If glue records are signed, attempt to validate them.
|
||||||
|
[GL #209]
|
||||||
|
|
||||||
|
4967. [cleanup] Add "answer-cookie" to the parser, marked obsolete.
|
||||||
|
|
||||||
|
4966. [placeholder]
|
||||||
|
|
||||||
|
4965. [func] Add support for marking options as deprecated.
|
||||||
|
[GL #322]
|
||||||
|
|
||||||
|
4964. [bug] Reduce the probabilty of double signature when deleting
|
||||||
|
a DNSKEY by checking if the node is otherwise signed
|
||||||
|
by the algorithm of the key to be deleted. [GL #240]
|
||||||
|
|
||||||
|
4963. [test] ifconfig.sh now uses "ip" instead of "ifconfig",
|
||||||
|
if available, to configure the test interfaces on
|
||||||
|
linux. [GL #302]
|
||||||
|
|
||||||
|
4962. [cleanup] Move 'named -T' processing to its own function.
|
||||||
|
[GL #316]
|
||||||
|
|
||||||
|
4961. [protocol] Remove support for ECC-GOST (GOST R 34.11-94).
|
||||||
|
[GL #295]
|
||||||
|
|
||||||
|
4960. [security] When recursion is enabled, but the "allow-recursion"
|
||||||
|
and "allow-query-cache" ACLs are not specified,
|
||||||
|
they should be limited to local networks,
|
||||||
|
but were inadvertently set to match the default
|
||||||
|
"allow-query", thus allowing remote queries.
|
||||||
|
(CVE-2018-5738) [GL #309]
|
||||||
|
|
||||||
|
4959. [func] NSID logging (enabled by the "request-nsid" option)
|
||||||
|
now has its own "nsid" category, instead of using the
|
||||||
|
"resolver" category. [GL !332]
|
||||||
|
|
||||||
|
4958. [bug] Remove redundant space from NSEC3 record. [GL #281]
|
||||||
|
|
||||||
|
4957. [func] The default setting for "dnssec-validation" is now
|
||||||
|
"auto", which activates DNSSEC validation using the
|
||||||
|
IANA root key. (The default can be changed back to
|
||||||
|
"yes", which activates DNSSEC validation only when keys
|
||||||
|
are explicitly configured in named.conf, by building
|
||||||
|
BIND with "configure --disable-auto-validation".)
|
||||||
|
[GL #30]
|
||||||
|
|
||||||
|
4956. [func] Change isc_random() to be just PRNG using xoshiro128**,
|
||||||
|
and add isc_nonce_buf() that uses CSPRNG. [GL #289]
|
||||||
|
|
||||||
|
4955. [cleanup] Silence cppcheck warnings in lib/dns/master.c.
|
||||||
|
[GL #286]
|
||||||
|
|
||||||
|
4954. [func] Messages about serving of stale answers are now
|
||||||
|
directed to the "serve-stale" logging category.
|
||||||
|
Also clarified serve-stale documentation. [GL !323]
|
||||||
|
|
||||||
|
4953. [bug] Removed the option to build the red black tree
|
||||||
|
database without a hash table; the non-hashing
|
||||||
|
version was buggy and is not needed. [GL #184]
|
||||||
|
|
||||||
|
4952. [func] Authoritative server support in named for the
|
||||||
|
EDNS CLIENT-SUBNET option (which was experimental
|
||||||
|
and not practical to deploy) has been removed.
|
||||||
|
|
||||||
|
The ECS option is still supported in dig and mdig
|
||||||
|
via the +subnet option, and can be parsed and logged
|
||||||
|
when received by named, but it is no longer used
|
||||||
|
for ACL processing. The "geoip-use-ecs" option
|
||||||
|
is now obsolete; a warning will be logged if it is
|
||||||
|
used in named.conf. "ecs" tags in an ACL definition
|
||||||
|
are also obsolete and will cause the configuration
|
||||||
|
to fail to load. [GL #32]
|
||||||
|
|
||||||
|
4951. [protocol] Add "HOME.ARPA" to list of built in empty zones as
|
||||||
|
per RFC 8375. [GL #273]
|
||||||
|
|
||||||
|
--- 9.13.0 released ---
|
||||||
|
|
||||||
|
4950. [bug] ISC_SOCKEVENTATTR_TRUNC was not be set. [GL #238]
|
||||||
|
|
||||||
|
4949. [placeholder]
|
||||||
|
|
||||||
|
4948. [bug] When request-nsid is turned on, EDNS NSID options
|
||||||
|
should be logged at level info. Since change 3741
|
||||||
|
they have been logged at debug(3) by mistake.
|
||||||
|
[GL !290]
|
||||||
|
|
||||||
|
4947. [func] Replace all random functions with isc_random(),
|
||||||
|
isc_random_buf() and isc_random_uniform() API.
|
||||||
|
[GL #221]
|
||||||
|
|
||||||
|
4946. [bug] Additional glue was not being returned by resolver
|
||||||
|
for unsigned zones since change 4596. [GL #209]
|
||||||
|
|
||||||
|
4945. [func] BIND can no longer be built without DNSSEC support.
|
||||||
|
A cryptography provder (i.e., OpenSSL or a hardware
|
||||||
|
service module with PKCS#11 support) must be
|
||||||
|
available. [GL #244]
|
||||||
|
|
||||||
|
4944. [cleanup] Silence cppcheck portability warnings in
|
||||||
|
lib/isc/tests/buffer_test.c. [GL #239]
|
||||||
|
|
||||||
|
4943. [bug] Change 4687 consumed too much memory when running
|
||||||
|
system tests with --with-tuning=large. Reduced the
|
||||||
|
hash table size to 512 entries for 'named -m record'
|
||||||
|
restoring the previous memory footprint. [GL #248]
|
||||||
|
|
||||||
|
4942. [cleanup] Consolidate multiple instances of splitting of
|
||||||
|
batchline in dig into a single function. [GL #196]
|
||||||
|
|
||||||
|
4941. [cleanup] Silence clang static analyzer warnings. [GL #196]
|
||||||
|
|
||||||
|
4940. [cleanup] Extract the loop in dns__zone_updatesigs() into
|
||||||
|
separate functions to improve code readability.
|
||||||
|
[GL #135]
|
||||||
|
|
||||||
|
4939. [test] Add basic unit tests for update_sigs(). [GL #135]
|
||||||
|
|
||||||
|
4938. [placeholder]
|
||||||
|
|
||||||
|
4937. [func] Remove support for OpenSSL < 1.0.0 [GL #191]
|
||||||
|
|
||||||
|
4936. [func] Always use OpenSSL or PKCS#11 random data providers,
|
||||||
|
and remove the --{enable,disable}-crypto-rand configure
|
||||||
|
options. [GL #165]
|
||||||
|
|
||||||
|
4935. [func] Add support for LibreSSL >= 2.7.0 (some OpenSSL 1.1.0
|
||||||
|
call were added). [GL #191]
|
||||||
|
|
||||||
|
4934. [security] The serve-stale feature could cause an assertion failure
|
||||||
|
in rbtdb.c even when stale-answer-enable was false.
|
||||||
|
Simultaneous use of stale cache records and NSEC
|
||||||
|
aggressive negative caching could trigger a recursion
|
||||||
|
loop. (CVE-2018-5737) [GL #185]
|
||||||
|
|
||||||
|
4933. [bug] Not creating signing keys for an inline signed zone
|
||||||
|
prevented changes applied to the raw zone from being
|
||||||
|
reflected in the secure zone until signing keys were
|
||||||
|
made available. [GL #159]
|
||||||
|
|
||||||
|
4932. [bug] Bumped signed serial of an inline signed zone was
|
||||||
|
logged even when an error occurred while updating
|
||||||
|
signatures. [GL #159]
|
||||||
|
|
||||||
|
4931. [func] Removed the "rbtdb64" database implementation.
|
||||||
|
[GL #217]
|
||||||
|
|
||||||
|
4930. [bug] Remove a bogus check in nslookup command line
|
||||||
|
argument processing. [GL #206]
|
||||||
|
|
||||||
|
4929. [func] Add the ability to set RA and TC in queries made by
|
||||||
|
dig (+[no]raflag, +[no]tcflag). [GL #213]
|
||||||
|
|
||||||
|
4928. [func] The "dnskey-sig-validity" option allows
|
||||||
|
"sig-validity-interval" to be overriden for signatures
|
||||||
|
covering DNSKEY RRsets. [GL #145]
|
||||||
|
|
||||||
|
4927. [placeholder]
|
||||||
|
|
||||||
|
4926. [func] Add root key sentinel support. To disable, add
|
||||||
|
'root-key-sentinel no;' to named.conf. [GL #37]
|
||||||
|
|
||||||
|
4925. [func] Several configuration options that define intervals
|
||||||
|
can now take TTL value suffixes (for example, 2h or 1d)
|
||||||
|
in addition to integer parameters. These include
|
||||||
|
max-cache-ttl, max-ncache-ttl, max-policy-ttl,
|
||||||
|
fstrm-set-reopen-interval, interface-interval, and
|
||||||
|
min-update-interval. [GL #203]
|
||||||
|
|
||||||
|
4924. [cleanup] Clean up the isc_string_* namespace and leave
|
||||||
|
only strlcpy and strlcat. [GL #178]
|
||||||
|
|
||||||
|
4923. [cleanup] Refactor socket and socket event options into
|
||||||
|
enum types. [GL !135]
|
||||||
|
|
||||||
|
4922. [bug] dnstap: Log the destination address of client
|
||||||
|
packets rather than the interface address.
|
||||||
|
[GL #197]
|
||||||
|
|
||||||
|
4921. [cleanup] Add dns_fixedname_initname() and refactor the caller
|
||||||
|
code to make usage of the new function, as a part of
|
||||||
|
refactoring dns_fixedname_*() macros were turned into
|
||||||
|
functions. [GL #183]
|
||||||
|
|
||||||
|
4920. [cleanup] Clean up libdns removing most of the backwards
|
||||||
|
compatibility wrappers.
|
||||||
|
|
||||||
|
4919. [cleanup] Clean up the isc_hash_* namespace and leave only
|
||||||
|
the FNV-1a hash implementation. [GL #178]
|
||||||
|
|
||||||
|
4918. [bug] Fix double free after keygen error in dnssec-keygen
|
||||||
|
when OpenSSL >= 1.1.0 is used and RSA_generate_key_ex
|
||||||
|
fails. [GL #109]
|
||||||
|
|
||||||
4917. [func] Support 64 RPZ policy zones by default. [GL #123]
|
4917. [func] Support 64 RPZ policy zones by default. [GL #123]
|
||||||
|
|
||||||
4916. [func] Remove IDNA2003 support and the bundled idnkit-1.0
|
4916. [func] Remove IDNA2003 support and the bundled idnkit-1.0
|
||||||
@@ -9,10 +335,10 @@
|
|||||||
like dig without IDN support. libidn2 version 2.0
|
like dig without IDN support. libidn2 version 2.0
|
||||||
or higher is needed for +idnout enabled by default.
|
or higher is needed for +idnout enabled by default.
|
||||||
|
|
||||||
4914. [bug] A bug in zone database reference counting could lead to
|
4914. [security] A bug in zone database reference counting could lead to
|
||||||
a crash when multiple versions of a slave zone were
|
a crash when multiple versions of a slave zone were
|
||||||
transferred from a master in close succession.
|
transferred from a master in close succession.
|
||||||
[GL #134]
|
(CVE-2018-5736) [GL #134]
|
||||||
|
|
||||||
4913. [test] Re-implemented older unit tests in bin/tests as ATF,
|
4913. [test] Re-implemented older unit tests in bin/tests as ATF,
|
||||||
removed the lib/tests unit testing library. [GL #115]
|
removed the lib/tests unit testing library. [GL #115]
|
||||||
@@ -543,8 +869,8 @@
|
|||||||
|
|
||||||
4760. [func] Add glue cache statistics counters. [RT #46028]
|
4760. [func] Add glue cache statistics counters. [RT #46028]
|
||||||
|
|
||||||
4759. [func] Add logging channel "trust-anchor-telementry" to
|
4759. [func] Add logging channel "trust-anchor-telemetry" to
|
||||||
record trust-anchor-telementry in incoming requests.
|
record trust-anchor-telemetry in incoming requests.
|
||||||
Both _ta-XXXX.<anchor>/NULL and EDNS KEY-TAG options
|
Both _ta-XXXX.<anchor>/NULL and EDNS KEY-TAG options
|
||||||
are logged. [RT #46124]
|
are logged. [RT #46124]
|
||||||
|
|
||||||
@@ -613,10 +939,10 @@
|
|||||||
tests when running on terminals that support them.
|
tests when running on terminals that support them.
|
||||||
[RT #45977]
|
[RT #45977]
|
||||||
|
|
||||||
4744. [bug] Suppress trust-anchor-telementry queries if
|
4744. [bug] Suppress trust-anchor-telemetry queries if
|
||||||
validation is disabled. [RT #46131]
|
validation is disabled. [RT #46131]
|
||||||
|
|
||||||
4743. [func] Exclude trust-anchor-telementry queries from
|
4743. [func] Exclude trust-anchor-telemetry queries from
|
||||||
synth-from-dnssec processing. [RT #46123]
|
synth-from-dnssec processing. [RT #46123]
|
||||||
|
|
||||||
4742. [func] Synthesis of responses from DNSSEC-verified records.
|
4742. [func] Synthesis of responses from DNSSEC-verified records.
|
||||||
|
|||||||
@@ -522,4 +522,3 @@ BIND 9.2.0
|
|||||||
DNSSEC implementation is still considered experimental. For detailed
|
DNSSEC implementation is still considered experimental. For detailed
|
||||||
information about the state of the DNSSEC implementation, see the file
|
information about the state of the DNSSEC implementation, see the file
|
||||||
doc/misc/dnssec.
|
doc/misc/dnssec.
|
||||||
|
|
||||||
|
|||||||
+8
-2
@@ -22,7 +22,8 @@ MANPAGES = isc-config.sh.1
|
|||||||
|
|
||||||
HTMLPAGES = isc-config.sh.html
|
HTMLPAGES = isc-config.sh.html
|
||||||
|
|
||||||
MANOBJS = README HISTORY OPTIONS CONTRIBUTING ${MANPAGES} ${HTMLPAGES}
|
MANOBJS = README HISTORY OPTIONS CONTRIBUTING PLATFORMS \
|
||||||
|
${MANPAGES} ${HTMLPAGES}
|
||||||
|
|
||||||
@BIND9_MAKE_RULES@
|
@BIND9_MAKE_RULES@
|
||||||
|
|
||||||
@@ -74,7 +75,7 @@ tags:
|
|||||||
find lib bin -name "*.[ch]" -print | @ETAGS@ -
|
find lib bin -name "*.[ch]" -print | @ETAGS@ -
|
||||||
|
|
||||||
test check:
|
test check:
|
||||||
@if test -n "`${PERL} ${top_srcdir}/bin/tests/system/testsock.pl 2>&- || echo fail`"; then \
|
@if test -n "`${PERL} ${top_srcdir}/bin/tests/system/testsock.pl 2>/dev/null || echo fail`"; then \
|
||||||
echo I: NOTE: The tests were not run because they require that; \
|
echo I: NOTE: The tests were not run because they require that; \
|
||||||
echo I: the IP addresses 10.53.0.1 through 10.53.0.8 are configured; \
|
echo I: the IP addresses 10.53.0.1 through 10.53.0.8 are configured; \
|
||||||
echo I: as alias addresses on the loopback interface. Please run; \
|
echo I: as alias addresses on the loopback interface. Please run; \
|
||||||
@@ -114,6 +115,11 @@ CONTRIBUTING: CONTRIBUTING.md
|
|||||||
${W3M} -dump -cols 75 -O ascii -T text/html | \
|
${W3M} -dump -cols 75 -O ascii -T text/html | \
|
||||||
sed -e '$${/^$$/d;}' > $@
|
sed -e '$${/^$$/d;}' > $@
|
||||||
|
|
||||||
|
PLATFORMS: PLATFORMS.md
|
||||||
|
${PANDOC} --email-obfuscation=none -s -t html PLATFORMS.md | \
|
||||||
|
${W3M} -dump -cols 75 -O ascii -T text/html | \
|
||||||
|
sed -e '$${/^$$/d;}' > $@
|
||||||
|
|
||||||
unit::
|
unit::
|
||||||
sh ${top_builddir}/unit/unittest.sh
|
sh ${top_builddir}/unit/unittest.sh
|
||||||
|
|
||||||
|
|||||||
@@ -24,4 +24,3 @@ Setting Description
|
|||||||
may be useful when debugging
|
may be useful when debugging
|
||||||
-DISC_HEAP_CHECK Test heap consistency after every heap
|
-DISC_HEAP_CHECK Test heap consistency after every heap
|
||||||
operation; used when debugging
|
operation; used when debugging
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
Supported platforms
|
||||||
|
|
||||||
|
In general, this version of BIND will build and run on any POSIX-compliant
|
||||||
|
system with a C99-compliant C compiler, BSD-style sockets, and the OpenSSL
|
||||||
|
cryptography library. To build with multiprocessing support, a
|
||||||
|
C11-compliant C compiler will be needed for standard atomics.
|
||||||
|
|
||||||
|
ISC regularly tests BIND on many operating systems and architectures, but
|
||||||
|
lacks the resources to test all of them. Consequently, ISC is only able to
|
||||||
|
offer support on a "best effort" basis for some.
|
||||||
|
|
||||||
|
Regularly tested platforms
|
||||||
|
|
||||||
|
As of May 2018, BIND 9.13 is tested on the following systems:
|
||||||
|
|
||||||
|
* Debian 8, 9
|
||||||
|
* Ubuntu 16.04, 18.04
|
||||||
|
* Fedora 27, 28
|
||||||
|
* Red Hat/CentOS 6, 7
|
||||||
|
* FreeBSD 10.x, 11.x
|
||||||
|
* OpenBSD 6.3
|
||||||
|
|
||||||
|
The amd64, i386, armhf and arm64 CPU architectures are all fully
|
||||||
|
supported.
|
||||||
|
|
||||||
|
Best effort
|
||||||
|
|
||||||
|
The following are platforms on which BIND is known to build and run, but
|
||||||
|
on which it is not routinely tested. ISC makes every effort to fix bugs on
|
||||||
|
these platforms, but may be unable to do so quickly due to lack of
|
||||||
|
hardware, less familiarity on the part of engineering staff, and other
|
||||||
|
constraints.
|
||||||
|
|
||||||
|
* Windows 10 / x64
|
||||||
|
* Windows Server 2012 R2, 2016 / x64
|
||||||
|
* macOS 10.12+
|
||||||
|
* Solaris 10
|
||||||
|
* FreeBSD 12+
|
||||||
|
* OpenBSD 6.2
|
||||||
|
* NetBSD
|
||||||
|
* Older or less popular Linux distributions still supported by their
|
||||||
|
vendors, such as:
|
||||||
|
+ Ubuntu 14.04, 18.10+
|
||||||
|
+ Gentoo
|
||||||
|
+ ArchLinux
|
||||||
|
+ Alpine Linux
|
||||||
|
* OpenWRT/LEDE 17.0
|
||||||
|
* Other CPU architectures (mips, mipsel, sparc, ...)
|
||||||
|
|
||||||
|
Unsupported platforms
|
||||||
|
|
||||||
|
These are platforms on which BIND is known not to build or run:
|
||||||
|
|
||||||
|
* Platforms without at least OpenSSL 1.0.2
|
||||||
|
* Windows 10 / x86
|
||||||
|
* Windows Server 2012
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
<!--
|
||||||
|
- Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||||
|
-
|
||||||
|
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
-
|
||||||
|
- See the COPYRIGHT file distributed with this work for additional
|
||||||
|
- information regarding copyright ownership.
|
||||||
|
-->
|
||||||
|
## Supported platforms
|
||||||
|
|
||||||
|
In general, this version of BIND will build and run on any POSIX-compliant
|
||||||
|
system with a C99-compliant C compiler, BSD-style sockets, and the OpenSSL
|
||||||
|
cryptography library. To build with multiprocessing support, a
|
||||||
|
C11-compliant C compiler will be needed for standard atomics.
|
||||||
|
|
||||||
|
ISC regularly tests BIND on many operating systems and architectures, but
|
||||||
|
lacks the resources to test all of them. Consequently, ISC is only able to
|
||||||
|
offer support on a "best effort" basis for some.
|
||||||
|
|
||||||
|
### Regularly tested platforms
|
||||||
|
|
||||||
|
As of May 2018, BIND 9.13 is tested on the following systems:
|
||||||
|
|
||||||
|
* Debian 8, 9
|
||||||
|
* Ubuntu 16.04, 18.04
|
||||||
|
* Fedora 27, 28
|
||||||
|
* Red Hat/CentOS 6, 7
|
||||||
|
* FreeBSD 10.x, 11.x
|
||||||
|
* OpenBSD 6.3
|
||||||
|
|
||||||
|
The amd64, i386, armhf and arm64 CPU architectures are all fully supported.
|
||||||
|
|
||||||
|
### Best effort
|
||||||
|
|
||||||
|
The following are platforms on which BIND is known to build and run,
|
||||||
|
but on which it is not routinely tested. ISC makes every effort to fix bugs
|
||||||
|
on these platforms, but may be unable to do so quickly due to lack of
|
||||||
|
hardware, less familiarity on the part of engineering staff, and other
|
||||||
|
constraints.
|
||||||
|
|
||||||
|
* Windows 10 / x64
|
||||||
|
* Windows Server 2012 R2, 2016 / x64
|
||||||
|
* macOS 10.12+
|
||||||
|
* Solaris 10
|
||||||
|
* FreeBSD 12+
|
||||||
|
* OpenBSD 6.2
|
||||||
|
* NetBSD
|
||||||
|
* Older or less popular Linux distributions still supported by their vendors, such as:
|
||||||
|
* Ubuntu 14.04, 18.10+
|
||||||
|
* Gentoo
|
||||||
|
* ArchLinux
|
||||||
|
* Alpine Linux
|
||||||
|
* OpenWRT/LEDE 17.0
|
||||||
|
* Other CPU architectures (mips, mipsel, sparc, ...)
|
||||||
|
|
||||||
|
## Unsupported platforms
|
||||||
|
|
||||||
|
These are platforms on which BIND is known *not* to build or run:
|
||||||
|
|
||||||
|
* Platforms without at least OpenSSL 1.0.2
|
||||||
|
* Windows 10 / x86
|
||||||
|
* Windows Server 2012
|
||||||
@@ -31,9 +31,9 @@ administrative tools, including the dig and delv DNS lookup tools,
|
|||||||
nsupdate for dynamic DNS zone updates, rndc for remote name server
|
nsupdate for dynamic DNS zone updates, rndc for remote name server
|
||||||
administration, and more.
|
administration, and more.
|
||||||
|
|
||||||
BIND 9 is a complete re-write of the BIND architecture that was used in
|
BIND 9 began as a complete re-write of the BIND architecture that was used
|
||||||
versions 4 and 8. Internet Systems Consortium (https://www.isc.org), a 501
|
in versions 4 and 8. Internet Systems Consortium (https://www.isc.org), a
|
||||||
(c)(3) public benefit corporation dedicated to providing software and
|
501(c)(3) public benefit corporation dedicated to providing software and
|
||||||
services in support of the Internet infrastructure, developed BIND 9 and
|
services in support of the Internet infrastructure, developed BIND 9 and
|
||||||
is responsible for its ongoing maintenance and improvement. BIND is open
|
is responsible for its ongoing maintenance and improvement. BIND is open
|
||||||
source software licenced under the terms of the Mozilla Public License,
|
source software licenced under the terms of the Mozilla Public License,
|
||||||
@@ -48,6 +48,8 @@ the file CHANGES. See below for details on the CHANGES file format.
|
|||||||
For up-to-date release notes and errata, see http://www.isc.org/software/
|
For up-to-date release notes and errata, see http://www.isc.org/software/
|
||||||
bind9/releasenotes
|
bind9/releasenotes
|
||||||
|
|
||||||
|
For information about supported platforms, see PLATFORMS.
|
||||||
|
|
||||||
Reporting bugs and getting help
|
Reporting bugs and getting help
|
||||||
|
|
||||||
To report non-security-sensitive bugs or request new features, you may
|
To report non-security-sensitive bugs or request new features, you may
|
||||||
@@ -99,19 +101,40 @@ format-patch.
|
|||||||
|
|
||||||
BIND 9.13 features
|
BIND 9.13 features
|
||||||
|
|
||||||
BIND 9.13.0 is the newest development branch of BIND 9. It includes a
|
BIND 9.13 is the newest development branch of BIND 9. It includes a number
|
||||||
number of changes from BIND 9.12 and earlier releases. New features
|
of changes from BIND 9.12 and earlier releases. New features include:
|
||||||
include:
|
|
||||||
|
|
||||||
* TBD
|
* The default value of "dnssec-validation" is now "auto".
|
||||||
|
* Support for IDNA2008 when linking with libidn2.
|
||||||
|
* "Root key sentinel" support, enabling validating resolvers to indicate
|
||||||
|
via a special query which trust anchors are configured for the root
|
||||||
|
zone.
|
||||||
|
* Secondary zones can now be configured as "mirror" zones; their
|
||||||
|
contents are transferred in as with traditional slave zones, but are
|
||||||
|
subject to DNSSEC validation and are not treated as authoritative data
|
||||||
|
when answering. This makes it easier to configure a local copy of the
|
||||||
|
root zone as described in RFC 7706.
|
||||||
|
|
||||||
|
In addition, cryptographic support has been modernized. BIND now uses the
|
||||||
|
best available pseudo-random number generator for the platform on which
|
||||||
|
it's built. Very old versions of OpenSSL are no longer supported.
|
||||||
|
Cryptography is now mandatory; building BIND without DNSSEC is now longer
|
||||||
|
supported.
|
||||||
|
|
||||||
Building BIND
|
Building BIND
|
||||||
|
|
||||||
BIND requires a UNIX or Linux system with an ANSI C compiler, basic POSIX
|
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler,
|
||||||
support, and a 64-bit integer type. Successful builds have been observed
|
basic POSIX support, and a 64-bit integer type. Successful builds have
|
||||||
on many versions of Linux and UNIX, including RedHat, Fedora, Debian,
|
been observed on many versions of Linux and UNIX, including RedHat,
|
||||||
Ubuntu, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS X, Solaris,
|
Fedora, Debian, Ubuntu, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS
|
||||||
HP-UX, AIX, SCO OpenServer, and OpenWRT.
|
X, Solaris, HP-UX, AIX, SCO OpenServer, and OpenWRT.
|
||||||
|
|
||||||
|
BIND requires a cryptography provider library such as OpenSSL or a
|
||||||
|
hardware service module supporting PKCS#11. On Linux, BIND requires the
|
||||||
|
libcap library to set process privileges, though this requirement can be
|
||||||
|
overridden by disabling capability support at compile time. See
|
||||||
|
Compile-time options below for details on other libraries that may be
|
||||||
|
required to support optional features.
|
||||||
|
|
||||||
BIND is also available for Windows 2008 and higher. See win32utils/
|
BIND is also available for Windows 2008 and higher. See win32utils/
|
||||||
readme1st.txt for details on building for Windows systems.
|
readme1st.txt for details on building for Windows systems.
|
||||||
@@ -182,11 +205,10 @@ smaller systems.
|
|||||||
For the server to support DNSSEC, you need to build it with crypto
|
For the server to support DNSSEC, you need to build it with crypto
|
||||||
support. To use OpenSSL, you should have OpenSSL 1.0.2e or newer
|
support. To use OpenSSL, you should have OpenSSL 1.0.2e or newer
|
||||||
installed. If the OpenSSL library is installed in a nonstandard location,
|
installed. If the OpenSSL library is installed in a nonstandard location,
|
||||||
specify the prefix using "--with-openssl=<PREFIX>" on the configure
|
specify the prefix using --with-openssl=<PREFIX> on the configure command
|
||||||
command line. To use a PKCS#11 hardware service module for cryptographic
|
line. To use a PKCS#11 hardware service module for cryptographic
|
||||||
operations, specify the path to the PKCS#11 provider library using
|
operations, specify the path to the PKCS#11 provider library using
|
||||||
"--with-pkcs11=<PREFIX>", and configure BIND with
|
--with-pkcs11=<PREFIX>, and configure BIND with --enable-native-pkcs11.
|
||||||
"--enable-native-pkcs11".
|
|
||||||
|
|
||||||
To support the HTTP statistics channel, the server must be linked with at
|
To support the HTTP statistics channel, the server must be linked with at
|
||||||
least one of the following: libxml2 http://xmlsoft.org or json-c https://
|
least one of the following: libxml2 http://xmlsoft.org or json-c https://
|
||||||
@@ -199,17 +221,22 @@ specify the prefix using --with-zlib=/prefix.
|
|||||||
|
|
||||||
To support storing configuration data for runtime-added zones in an LMDB
|
To support storing configuration data for runtime-added zones in an LMDB
|
||||||
database, the server must be linked with liblmdb. If this is installed in
|
database, the server must be linked with liblmdb. If this is installed in
|
||||||
a nonstandard location, specify the prefix using "with-lmdb=/prefix".
|
a nonstandard location, specify the prefix using with-lmdb=/prefix.
|
||||||
|
|
||||||
To support GeoIP location-based ACLs, the server must be linked with
|
To support GeoIP location-based ACLs, the server must be linked with
|
||||||
libGeoIP. This is not turned on by default; BIND must be configured with
|
libGeoIP. This is not turned on by default; BIND must be configured with
|
||||||
"--with-geoip". If the library is installed in a nonstandard location, use
|
--with-geoip. If the library is installed in a nonstandard location,
|
||||||
specify the prefix using "--with-geoip=/prefix".
|
specify the prefix using --with-geoip=/prefix.
|
||||||
|
|
||||||
For DNSTAP packet logging, you must have installed libfstrm https://
|
For DNSTAP packet logging, you must have installed libfstrm https://
|
||||||
github.com/farsightsec/fstrm and libprotobuf-c https://
|
github.com/farsightsec/fstrm and libprotobuf-c https://
|
||||||
developers.google.com/protocol-buffers, and BIND must be configured with
|
developers.google.com/protocol-buffers, and BIND must be configured with
|
||||||
"--enable-dnstap".
|
--enable-dnstap.
|
||||||
|
|
||||||
|
On Linux, process capabilities are managed in user space using the libcap
|
||||||
|
library, which can be installed on most Linux systems via the libcap-dev
|
||||||
|
or libcap-devel module. Process capability support can also be disabled by
|
||||||
|
configuring with --disable-linux-caps.
|
||||||
|
|
||||||
Portions of BIND that are written in Python, including dnssec-keymgr,
|
Portions of BIND that are written in Python, including dnssec-keymgr,
|
||||||
dnssec-coverage, dnssec-checkds, and some of the system tests, require the
|
dnssec-coverage, dnssec-checkds, and some of the system tests, require the
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ administrative tools, including the `dig` and `delv` DNS lookup tools,
|
|||||||
`nsupdate` for dynamic DNS zone updates, `rndc` for remote name server
|
`nsupdate` for dynamic DNS zone updates, `rndc` for remote name server
|
||||||
administration, and more.
|
administration, and more.
|
||||||
|
|
||||||
BIND 9 is a complete re-write of the BIND architecture that was used in
|
BIND 9 began as a complete re-write of the BIND architecture that was
|
||||||
versions 4 and 8. Internet Systems Consortium
|
used in versions 4 and 8. Internet Systems Consortium
|
||||||
([https://www.isc.org](https://www.isc.org)), a 501(c)(3) public benefit
|
([https://www.isc.org](https://www.isc.org)), a 501(c)(3) public benefit
|
||||||
corporation dedicated to providing software and services in support of the
|
corporation dedicated to providing software and services in support of the
|
||||||
Internet infrastructure, developed BIND 9 and is responsible for its
|
Internet infrastructure, developed BIND 9 and is responsible for its
|
||||||
@@ -59,6 +59,8 @@ CHANGES file format.
|
|||||||
For up-to-date release notes and errata, see
|
For up-to-date release notes and errata, see
|
||||||
[http://www.isc.org/software/bind9/releasenotes](http://www.isc.org/software/bind9/releasenotes)
|
[http://www.isc.org/software/bind9/releasenotes](http://www.isc.org/software/bind9/releasenotes)
|
||||||
|
|
||||||
|
For information about supported platforms, see [PLATFORMS](PLATFORMS.md).
|
||||||
|
|
||||||
### <a name="help"/> Reporting bugs and getting help
|
### <a name="help"/> Reporting bugs and getting help
|
||||||
|
|
||||||
To report non-security-sensitive bugs or request new features, you may
|
To report non-security-sensitive bugs or request new features, you may
|
||||||
@@ -116,19 +118,40 @@ including your patch as an attachment, preferably generated by
|
|||||||
|
|
||||||
### <a name="features"/> BIND 9.13 features
|
### <a name="features"/> BIND 9.13 features
|
||||||
|
|
||||||
BIND 9.13.0 is the newest development branch of BIND 9. It includes a
|
BIND 9.13 is the newest development branch of BIND 9. It includes a
|
||||||
number of changes from BIND 9.12 and earlier releases. New features
|
number of changes from BIND 9.12 and earlier releases. New features
|
||||||
include:
|
include:
|
||||||
|
|
||||||
* TBD
|
* The default value of "dnssec-validation" is now "auto".
|
||||||
|
* Support for IDNA2008 when linking with `libidn2`.
|
||||||
|
* "Root key sentinel" support, enabling validating resolvers to indicate
|
||||||
|
via a special query which trust anchors are configured for the root zone.
|
||||||
|
* Secondary zones can now be configured as "mirror" zones; their contents
|
||||||
|
are transferred in as with traditional slave zones, but are subject to
|
||||||
|
DNSSEC validation and are not treated as authoritative data when
|
||||||
|
answering. This makes it easier to configure a local copy of the root
|
||||||
|
zone as described in RFC 7706.
|
||||||
|
|
||||||
|
In addition, cryptographic support has been modernized. BIND now uses the
|
||||||
|
best available pseudo-random number generator for the platform on which
|
||||||
|
it's built. Very old versions of OpenSSL are no longer supported.
|
||||||
|
Cryptography is now mandatory; building BIND without DNSSEC is now
|
||||||
|
longer supported.
|
||||||
|
|
||||||
### <a name="build"/> Building BIND
|
### <a name="build"/> Building BIND
|
||||||
|
|
||||||
BIND requires a UNIX or Linux system with an ANSI C compiler, basic POSIX
|
Minimally, BIND requires a UNIX or Linux system with an ANSI C compiler,
|
||||||
support, and a 64-bit integer type. Successful builds have been observed on
|
basic POSIX support, and a 64-bit integer type. Successful builds have been
|
||||||
many versions of Linux and UNIX, including RedHat, Fedora, Debian, Ubuntu,
|
observed on many versions of Linux and UNIX, including RedHat, Fedora,
|
||||||
SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS X, Solaris, HP-UX, AIX,
|
Debian, Ubuntu, SuSE, Slackware, FreeBSD, NetBSD, OpenBSD, Mac OS X,
|
||||||
SCO OpenServer, and OpenWRT.
|
Solaris, HP-UX, AIX, SCO OpenServer, and OpenWRT.
|
||||||
|
|
||||||
|
BIND requires a cryptography provider library such as OpenSSL or a
|
||||||
|
hardware service module supporting PKCS#11. On Linux, BIND requires
|
||||||
|
the `libcap` library to set process privileges, though this requirement
|
||||||
|
can be overridden by disabling capability support at compile time.
|
||||||
|
See [Compile-time options](#opts) below for details on other libraries
|
||||||
|
that may be required to support optional features.
|
||||||
|
|
||||||
BIND is also available for Windows 2008 and higher. See
|
BIND is also available for Windows 2008 and higher. See
|
||||||
`win32utils/readme1st.txt` for details on building for Windows
|
`win32utils/readme1st.txt` for details on building for Windows
|
||||||
@@ -194,10 +217,10 @@ performance on smaller systems.
|
|||||||
For the server to support DNSSEC, you need to build it with crypto support.
|
For the server to support DNSSEC, you need to build it with crypto support.
|
||||||
To use OpenSSL, you should have OpenSSL 1.0.2e or newer installed. If the
|
To use OpenSSL, you should have OpenSSL 1.0.2e or newer installed. If the
|
||||||
OpenSSL library is installed in a nonstandard location, specify the prefix
|
OpenSSL library is installed in a nonstandard location, specify the prefix
|
||||||
using "--with-openssl=<PREFIX>" on the configure command line. To use a
|
using `--with-openssl=<PREFIX>` on the configure command line. To use a
|
||||||
PKCS#11 hardware service module for cryptographic operations, specify the
|
PKCS#11 hardware service module for cryptographic operations, specify the
|
||||||
path to the PKCS#11 provider library using "--with-pkcs11=<PREFIX>", and
|
path to the PKCS#11 provider library using `--with-pkcs11=<PREFIX>`, and
|
||||||
configure BIND with "--enable-native-pkcs11".
|
configure BIND with `--enable-native-pkcs11`.
|
||||||
|
|
||||||
To support the HTTP statistics channel, the server must be linked with at
|
To support the HTTP statistics channel, the server must be linked with at
|
||||||
least one of the following: libxml2
|
least one of the following: libxml2
|
||||||
@@ -212,18 +235,23 @@ specify the prefix using `--with-zlib=/prefix`.
|
|||||||
|
|
||||||
To support storing configuration data for runtime-added zones in an LMDB
|
To support storing configuration data for runtime-added zones in an LMDB
|
||||||
database, the server must be linked with liblmdb. If this is installed in a
|
database, the server must be linked with liblmdb. If this is installed in a
|
||||||
nonstandard location, specify the prefix using "with-lmdb=/prefix".
|
nonstandard location, specify the prefix using `with-lmdb=/prefix`.
|
||||||
|
|
||||||
To support GeoIP location-based ACLs, the server must be linked with
|
To support GeoIP location-based ACLs, the server must be linked with
|
||||||
libGeoIP. This is not turned on by default; BIND must be configured with
|
libGeoIP. This is not turned on by default; BIND must be configured with
|
||||||
"--with-geoip". If the library is installed in a nonstandard location, use
|
`--with-geoip`. If the library is installed in a nonstandard location,
|
||||||
specify the prefix using "--with-geoip=/prefix".
|
specify the prefix using `--with-geoip=/prefix`.
|
||||||
|
|
||||||
For DNSTAP packet logging, you must have installed libfstrm
|
For DNSTAP packet logging, you must have installed libfstrm
|
||||||
[https://github.com/farsightsec/fstrm](https://github.com/farsightsec/fstrm)
|
[https://github.com/farsightsec/fstrm](https://github.com/farsightsec/fstrm)
|
||||||
and libprotobuf-c
|
and libprotobuf-c
|
||||||
[https://developers.google.com/protocol-buffers](https://developers.google.com/protocol-buffers),
|
[https://developers.google.com/protocol-buffers](https://developers.google.com/protocol-buffers),
|
||||||
and BIND must be configured with "--enable-dnstap".
|
and BIND must be configured with `--enable-dnstap`.
|
||||||
|
|
||||||
|
On Linux, process capabilities are managed in user space using
|
||||||
|
the `libcap` library, which can be installed on most Linux systems via
|
||||||
|
the `libcap-dev` or `libcap-devel` module. Process capability support can
|
||||||
|
also be disabled by configuring with `--disable-linux-caps`.
|
||||||
|
|
||||||
Portions of BIND that are written in Python, including
|
Portions of BIND that are written in Python, including
|
||||||
`dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the
|
`dnssec-keymgr`, `dnssec-coverage`, `dnssec-checkds`, and some of the
|
||||||
|
|||||||
@@ -121,12 +121,6 @@ int sigwait(const unsigned int *set, int *sig);
|
|||||||
/** define if you have strerror in the C library. */
|
/** define if you have strerror in the C library. */
|
||||||
#undef HAVE_STRERROR
|
#undef HAVE_STRERROR
|
||||||
|
|
||||||
/* Define if OpenSSL includes DSA support */
|
|
||||||
#undef HAVE_OPENSSL_DSA
|
|
||||||
|
|
||||||
/* Define if you have getpassphrase in the C library. */
|
|
||||||
#undef HAVE_GETPASSPHRASE
|
|
||||||
|
|
||||||
/* Define to the length type used by the socket API (socklen_t, size_t, int). */
|
/* Define to the length type used by the socket API (socklen_t, size_t, int). */
|
||||||
#undef ISC_SOCKADDR_LEN_T
|
#undef ISC_SOCKADDR_LEN_T
|
||||||
|
|
||||||
|
|||||||
Vendored
+294
-15
@@ -1,17 +1,296 @@
|
|||||||
sinclude(libtool.m4/libtool.m4)dnl
|
# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
|
||||||
sinclude(libtool.m4/ltoptions.m4)dnl
|
|
||||||
sinclude(libtool.m4/ltsugar.m4)dnl
|
|
||||||
sinclude(libtool.m4/ltversion.m4)dnl
|
|
||||||
sinclude(libtool.m4/lt~obsolete.m4)dnl
|
|
||||||
|
|
||||||
m4_divert_text(HELP_CANON, [[
|
# Copyright (C) 1996-2017 Free Software Foundation, Inc.
|
||||||
NOTE: If PREFIX is not set, then the default values for --sysconfdir
|
|
||||||
and --localstatedir are /etc and /var, respectively.]])
|
|
||||||
m4_divert_text(HELP_END, [[
|
|
||||||
Professional support for BIND is provided by Internet Systems Consortium,
|
|
||||||
Inc. Information about paid support and training options is available at
|
|
||||||
https://www.isc.org/support.
|
|
||||||
|
|
||||||
Help can also often be found on the BIND Users mailing list
|
# This file is free software; the Free Software Foundation
|
||||||
(https://lists.isc.org/mailman/listinfo/bind-users) or in the #bind
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
channel of the Freenode IRC service.]])
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
|
||||||
|
dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
|
||||||
|
dnl serial 11 (pkg-config-0.29.1)
|
||||||
|
dnl
|
||||||
|
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
|
||||||
|
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
|
||||||
|
dnl
|
||||||
|
dnl This program is free software; you can redistribute it and/or modify
|
||||||
|
dnl it under the terms of the GNU General Public License as published by
|
||||||
|
dnl the Free Software Foundation; either version 2 of the License, or
|
||||||
|
dnl (at your option) any later version.
|
||||||
|
dnl
|
||||||
|
dnl This program is distributed in the hope that it will be useful, but
|
||||||
|
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
dnl General Public License for more details.
|
||||||
|
dnl
|
||||||
|
dnl You should have received a copy of the GNU General Public License
|
||||||
|
dnl along with this program; if not, write to the Free Software
|
||||||
|
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||||
|
dnl 02111-1307, USA.
|
||||||
|
dnl
|
||||||
|
dnl As a special exception to the GNU General Public License, if you
|
||||||
|
dnl distribute this file as part of a program that contains a
|
||||||
|
dnl configuration script generated by Autoconf, you may include it under
|
||||||
|
dnl the same distribution terms that you use for the rest of that
|
||||||
|
dnl program.
|
||||||
|
|
||||||
|
dnl PKG_PREREQ(MIN-VERSION)
|
||||||
|
dnl -----------------------
|
||||||
|
dnl Since: 0.29
|
||||||
|
dnl
|
||||||
|
dnl Verify that the version of the pkg-config macros are at least
|
||||||
|
dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
|
||||||
|
dnl installed version of pkg-config, this checks the developer's version
|
||||||
|
dnl of pkg.m4 when generating configure.
|
||||||
|
dnl
|
||||||
|
dnl To ensure that this macro is defined, also add:
|
||||||
|
dnl m4_ifndef([PKG_PREREQ],
|
||||||
|
dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
|
||||||
|
dnl
|
||||||
|
dnl See the "Since" comment for each macro you use to see what version
|
||||||
|
dnl of the macros you require.
|
||||||
|
m4_defun([PKG_PREREQ],
|
||||||
|
[m4_define([PKG_MACROS_VERSION], [0.29.1])
|
||||||
|
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
|
||||||
|
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
|
||||||
|
])dnl PKG_PREREQ
|
||||||
|
|
||||||
|
dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
|
||||||
|
dnl ----------------------------------
|
||||||
|
dnl Since: 0.16
|
||||||
|
dnl
|
||||||
|
dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
|
||||||
|
dnl first found in the path. Checks that the version of pkg-config found
|
||||||
|
dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
|
||||||
|
dnl used since that's the first version where most current features of
|
||||||
|
dnl pkg-config existed.
|
||||||
|
AC_DEFUN([PKG_PROG_PKG_CONFIG],
|
||||||
|
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
|
||||||
|
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
|
||||||
|
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
|
||||||
|
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
|
||||||
|
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
|
||||||
|
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
|
||||||
|
|
||||||
|
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
||||||
|
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
|
||||||
|
fi
|
||||||
|
if test -n "$PKG_CONFIG"; then
|
||||||
|
_pkg_min_version=m4_default([$1], [0.9.0])
|
||||||
|
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
|
||||||
|
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
PKG_CONFIG=""
|
||||||
|
fi
|
||||||
|
fi[]dnl
|
||||||
|
])dnl PKG_PROG_PKG_CONFIG
|
||||||
|
|
||||||
|
dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||||
|
dnl -------------------------------------------------------------------
|
||||||
|
dnl Since: 0.18
|
||||||
|
dnl
|
||||||
|
dnl Check to see whether a particular set of modules exists. Similar to
|
||||||
|
dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
|
||||||
|
dnl
|
||||||
|
dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||||
|
dnl only at the first occurence in configure.ac, so if the first place
|
||||||
|
dnl it's called might be skipped (such as if it is within an "if", you
|
||||||
|
dnl have to call PKG_CHECK_EXISTS manually
|
||||||
|
AC_DEFUN([PKG_CHECK_EXISTS],
|
||||||
|
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||||
|
if test -n "$PKG_CONFIG" && \
|
||||||
|
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
|
||||||
|
m4_default([$2], [:])
|
||||||
|
m4_ifvaln([$3], [else
|
||||||
|
$3])dnl
|
||||||
|
fi])
|
||||||
|
|
||||||
|
dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
|
||||||
|
dnl ---------------------------------------------
|
||||||
|
dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
|
||||||
|
dnl pkg_failed based on the result.
|
||||||
|
m4_define([_PKG_CONFIG],
|
||||||
|
[if test -n "$$1"; then
|
||||||
|
pkg_cv_[]$1="$$1"
|
||||||
|
elif test -n "$PKG_CONFIG"; then
|
||||||
|
PKG_CHECK_EXISTS([$3],
|
||||||
|
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
|
||||||
|
test "x$?" != "x0" && pkg_failed=yes ],
|
||||||
|
[pkg_failed=yes])
|
||||||
|
else
|
||||||
|
pkg_failed=untried
|
||||||
|
fi[]dnl
|
||||||
|
])dnl _PKG_CONFIG
|
||||||
|
|
||||||
|
dnl _PKG_SHORT_ERRORS_SUPPORTED
|
||||||
|
dnl ---------------------------
|
||||||
|
dnl Internal check to see if pkg-config supports short errors.
|
||||||
|
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
|
||||||
|
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
|
||||||
|
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||||
|
_pkg_short_errors_supported=yes
|
||||||
|
else
|
||||||
|
_pkg_short_errors_supported=no
|
||||||
|
fi[]dnl
|
||||||
|
])dnl _PKG_SHORT_ERRORS_SUPPORTED
|
||||||
|
|
||||||
|
|
||||||
|
dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
||||||
|
dnl [ACTION-IF-NOT-FOUND])
|
||||||
|
dnl --------------------------------------------------------------
|
||||||
|
dnl Since: 0.4.0
|
||||||
|
dnl
|
||||||
|
dnl Note that if there is a possibility the first call to
|
||||||
|
dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
|
||||||
|
dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
|
||||||
|
AC_DEFUN([PKG_CHECK_MODULES],
|
||||||
|
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||||
|
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
|
||||||
|
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
|
||||||
|
|
||||||
|
pkg_failed=no
|
||||||
|
AC_MSG_CHECKING([for $1])
|
||||||
|
|
||||||
|
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
|
||||||
|
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
|
||||||
|
|
||||||
|
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
|
||||||
|
and $1[]_LIBS to avoid the need to call pkg-config.
|
||||||
|
See the pkg-config man page for more details.])
|
||||||
|
|
||||||
|
if test $pkg_failed = yes; then
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
_PKG_SHORT_ERRORS_SUPPORTED
|
||||||
|
if test $_pkg_short_errors_supported = yes; then
|
||||||
|
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
|
||||||
|
else
|
||||||
|
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
|
||||||
|
fi
|
||||||
|
# Put the nasty error message in config.log where it belongs
|
||||||
|
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
|
||||||
|
|
||||||
|
m4_default([$4], [AC_MSG_ERROR(
|
||||||
|
[Package requirements ($2) were not met:
|
||||||
|
|
||||||
|
$$1_PKG_ERRORS
|
||||||
|
|
||||||
|
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
||||||
|
installed software in a non-standard prefix.
|
||||||
|
|
||||||
|
_PKG_TEXT])[]dnl
|
||||||
|
])
|
||||||
|
elif test $pkg_failed = untried; then
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
m4_default([$4], [AC_MSG_FAILURE(
|
||||||
|
[The pkg-config script could not be found or is too old. Make sure it
|
||||||
|
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||||
|
path to pkg-config.
|
||||||
|
|
||||||
|
_PKG_TEXT
|
||||||
|
|
||||||
|
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
|
||||||
|
])
|
||||||
|
else
|
||||||
|
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
||||||
|
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
$3
|
||||||
|
fi[]dnl
|
||||||
|
])dnl PKG_CHECK_MODULES
|
||||||
|
|
||||||
|
|
||||||
|
dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
|
||||||
|
dnl [ACTION-IF-NOT-FOUND])
|
||||||
|
dnl ---------------------------------------------------------------------
|
||||||
|
dnl Since: 0.29
|
||||||
|
dnl
|
||||||
|
dnl Checks for existence of MODULES and gathers its build flags with
|
||||||
|
dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
|
||||||
|
dnl and VARIABLE-PREFIX_LIBS from --libs.
|
||||||
|
dnl
|
||||||
|
dnl Note that if there is a possibility the first call to
|
||||||
|
dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
|
||||||
|
dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
|
||||||
|
dnl configure.ac.
|
||||||
|
AC_DEFUN([PKG_CHECK_MODULES_STATIC],
|
||||||
|
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||||
|
_save_PKG_CONFIG=$PKG_CONFIG
|
||||||
|
PKG_CONFIG="$PKG_CONFIG --static"
|
||||||
|
PKG_CHECK_MODULES($@)
|
||||||
|
PKG_CONFIG=$_save_PKG_CONFIG[]dnl
|
||||||
|
])dnl PKG_CHECK_MODULES_STATIC
|
||||||
|
|
||||||
|
|
||||||
|
dnl PKG_INSTALLDIR([DIRECTORY])
|
||||||
|
dnl -------------------------
|
||||||
|
dnl Since: 0.27
|
||||||
|
dnl
|
||||||
|
dnl Substitutes the variable pkgconfigdir as the location where a module
|
||||||
|
dnl should install pkg-config .pc files. By default the directory is
|
||||||
|
dnl $libdir/pkgconfig, but the default can be changed by passing
|
||||||
|
dnl DIRECTORY. The user can override through the --with-pkgconfigdir
|
||||||
|
dnl parameter.
|
||||||
|
AC_DEFUN([PKG_INSTALLDIR],
|
||||||
|
[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
|
||||||
|
m4_pushdef([pkg_description],
|
||||||
|
[pkg-config installation directory @<:@]pkg_default[@:>@])
|
||||||
|
AC_ARG_WITH([pkgconfigdir],
|
||||||
|
[AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
|
||||||
|
[with_pkgconfigdir=]pkg_default)
|
||||||
|
AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
|
||||||
|
m4_popdef([pkg_default])
|
||||||
|
m4_popdef([pkg_description])
|
||||||
|
])dnl PKG_INSTALLDIR
|
||||||
|
|
||||||
|
|
||||||
|
dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
|
||||||
|
dnl --------------------------------
|
||||||
|
dnl Since: 0.27
|
||||||
|
dnl
|
||||||
|
dnl Substitutes the variable noarch_pkgconfigdir as the location where a
|
||||||
|
dnl module should install arch-independent pkg-config .pc files. By
|
||||||
|
dnl default the directory is $datadir/pkgconfig, but the default can be
|
||||||
|
dnl changed by passing DIRECTORY. The user can override through the
|
||||||
|
dnl --with-noarch-pkgconfigdir parameter.
|
||||||
|
AC_DEFUN([PKG_NOARCH_INSTALLDIR],
|
||||||
|
[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
|
||||||
|
m4_pushdef([pkg_description],
|
||||||
|
[pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
|
||||||
|
AC_ARG_WITH([noarch-pkgconfigdir],
|
||||||
|
[AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
|
||||||
|
[with_noarch_pkgconfigdir=]pkg_default)
|
||||||
|
AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
|
||||||
|
m4_popdef([pkg_default])
|
||||||
|
m4_popdef([pkg_description])
|
||||||
|
])dnl PKG_NOARCH_INSTALLDIR
|
||||||
|
|
||||||
|
|
||||||
|
dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
|
||||||
|
dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||||
|
dnl -------------------------------------------
|
||||||
|
dnl Since: 0.28
|
||||||
|
dnl
|
||||||
|
dnl Retrieves the value of the pkg-config variable for the given module.
|
||||||
|
AC_DEFUN([PKG_CHECK_VAR],
|
||||||
|
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||||
|
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
|
||||||
|
|
||||||
|
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
|
||||||
|
AS_VAR_COPY([$1], [pkg_cv_][$1])
|
||||||
|
|
||||||
|
AS_VAR_IF([$1], [""], [$5], [$4])dnl
|
||||||
|
])dnl PKG_CHECK_VAR
|
||||||
|
|
||||||
|
m4_include([m4/ax_check_openssl.m4])
|
||||||
|
m4_include([m4/libtool.m4])
|
||||||
|
m4_include([m4/ltoptions.m4])
|
||||||
|
m4_include([m4/ltsugar.m4])
|
||||||
|
m4_include([m4/ltversion.m4])
|
||||||
|
m4_include([m4/lt~obsolete.m4])
|
||||||
|
|||||||
+1
-1
@@ -10,4 +10,4 @@
|
|||||||
# information regarding copyright ownership.
|
# information regarding copyright ownership.
|
||||||
|
|
||||||
# Run this script after modifying configure.in to generate configure
|
# Run this script after modifying configure.in to generate configure
|
||||||
autoreconf -i
|
autoreconf -f -i
|
||||||
|
|||||||
@@ -16,15 +16,15 @@ VERSION=@BIND9_VERSION@
|
|||||||
@BIND9_MAKE_INCLUDES@
|
@BIND9_MAKE_INCLUDES@
|
||||||
|
|
||||||
CINCLUDES = ${NS_INCLUDES} ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES} \
|
CINCLUDES = ${NS_INCLUDES} ${BIND9_INCLUDES} ${DNS_INCLUDES} ${ISCCFG_INCLUDES} \
|
||||||
${ISC_INCLUDES} @DST_OPENSSL_INC@
|
${ISC_INCLUDES} @OPENSSL_INCLUDES@
|
||||||
|
|
||||||
CDEFINES = @CRYPTO@ -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
|
CDEFINES = -DNAMED_CONFFILE=\"${sysconfdir}/named.conf\"
|
||||||
CWARNINGS =
|
CWARNINGS =
|
||||||
|
|
||||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||||
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
|
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||||
NSLIBS = ../../lib/ns/libns.@A@
|
NSLIBS = ../../lib/ns/libns.@A@
|
||||||
|
|
||||||
|
|||||||
+62
-64
@@ -9,13 +9,14 @@
|
|||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: check-tool.c,v 1.44 2011/12/22 07:32:39 each Exp $ */
|
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <Winsock2.h>
|
#include <Winsock2.h>
|
||||||
@@ -89,28 +90,27 @@ static const char *dbtype[] = { "rbt" };
|
|||||||
|
|
||||||
int debug = 0;
|
int debug = 0;
|
||||||
const char *journal = NULL;
|
const char *journal = NULL;
|
||||||
isc_boolean_t nomerge = ISC_TRUE;
|
bool nomerge = true;
|
||||||
#if CHECK_LOCAL
|
#if CHECK_LOCAL
|
||||||
isc_boolean_t docheckmx = ISC_TRUE;
|
bool docheckmx = true;
|
||||||
isc_boolean_t dochecksrv = ISC_TRUE;
|
bool dochecksrv = true;
|
||||||
isc_boolean_t docheckns = ISC_TRUE;
|
bool docheckns = true;
|
||||||
#else
|
#else
|
||||||
isc_boolean_t docheckmx = ISC_FALSE;
|
bool docheckmx = false;
|
||||||
isc_boolean_t dochecksrv = ISC_FALSE;
|
bool dochecksrv = false;
|
||||||
isc_boolean_t docheckns = ISC_FALSE;
|
bool docheckns = false;
|
||||||
#endif
|
#endif
|
||||||
unsigned int zone_options = DNS_ZONEOPT_CHECKNS |
|
dns_zoneopt_t zone_options = DNS_ZONEOPT_CHECKNS |
|
||||||
DNS_ZONEOPT_CHECKMX |
|
DNS_ZONEOPT_CHECKMX |
|
||||||
DNS_ZONEOPT_MANYERRORS |
|
DNS_ZONEOPT_MANYERRORS |
|
||||||
DNS_ZONEOPT_CHECKNAMES |
|
DNS_ZONEOPT_CHECKNAMES |
|
||||||
DNS_ZONEOPT_CHECKINTEGRITY |
|
DNS_ZONEOPT_CHECKINTEGRITY |
|
||||||
#if CHECK_SIBLING
|
#if CHECK_SIBLING
|
||||||
DNS_ZONEOPT_CHECKSIBLING |
|
DNS_ZONEOPT_CHECKSIBLING |
|
||||||
#endif
|
#endif
|
||||||
DNS_ZONEOPT_CHECKWILDCARD |
|
DNS_ZONEOPT_CHECKWILDCARD |
|
||||||
DNS_ZONEOPT_WARNMXCNAME |
|
DNS_ZONEOPT_WARNMXCNAME |
|
||||||
DNS_ZONEOPT_WARNSRVCNAME;
|
DNS_ZONEOPT_WARNSRVCNAME;
|
||||||
unsigned int zone_options2 = 0;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This needs to match the list in bin/named/log.c.
|
* This needs to match the list in bin/named/log.c.
|
||||||
@@ -144,7 +144,7 @@ add(char *key, int value) {
|
|||||||
|
|
||||||
if (symtab == NULL) {
|
if (symtab == NULL) {
|
||||||
result = isc_symtab_create(sym_mctx, 100, freekey, sym_mctx,
|
result = isc_symtab_create(sym_mctx, 100, freekey, sym_mctx,
|
||||||
ISC_FALSE, &symtab);
|
false, &symtab);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -160,20 +160,20 @@ add(char *key, int value) {
|
|||||||
isc_mem_free(sym_mctx, key);
|
isc_mem_free(sym_mctx, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
static isc_boolean_t
|
static bool
|
||||||
logged(char *key, int value) {
|
logged(char *key, int value) {
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
|
|
||||||
if (symtab == NULL)
|
if (symtab == NULL)
|
||||||
return (ISC_FALSE);
|
return (false);
|
||||||
|
|
||||||
result = isc_symtab_lookup(symtab, key, value, NULL);
|
result = isc_symtab_lookup(symtab, key, value, NULL);
|
||||||
if (result == ISC_R_SUCCESS)
|
if (result == ISC_R_SUCCESS)
|
||||||
return (ISC_TRUE);
|
return (true);
|
||||||
return (ISC_FALSE);
|
return (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static isc_boolean_t
|
static bool
|
||||||
checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
|
checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
|
||||||
dns_rdataset_t *a, dns_rdataset_t *aaaa)
|
dns_rdataset_t *a, dns_rdataset_t *aaaa)
|
||||||
{
|
{
|
||||||
@@ -184,8 +184,8 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
|
|||||||
char namebuf[DNS_NAME_FORMATSIZE + 1];
|
char namebuf[DNS_NAME_FORMATSIZE + 1];
|
||||||
char ownerbuf[DNS_NAME_FORMATSIZE];
|
char ownerbuf[DNS_NAME_FORMATSIZE];
|
||||||
char addrbuf[sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:123.123.123.123")];
|
char addrbuf[sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:123.123.123.123")];
|
||||||
isc_boolean_t answer = ISC_TRUE;
|
bool answer = true;
|
||||||
isc_boolean_t match;
|
bool match;
|
||||||
const char *type;
|
const char *type;
|
||||||
void *ptr = NULL;
|
void *ptr = NULL;
|
||||||
int result;
|
int result;
|
||||||
@@ -234,7 +234,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
|
|||||||
ownerbuf, namebuf,
|
ownerbuf, namebuf,
|
||||||
cur->ai_canonname);
|
cur->ai_canonname);
|
||||||
/* XXX950 make fatal for 9.5.0 */
|
/* XXX950 make fatal for 9.5.0 */
|
||||||
/* answer = ISC_FALSE; */
|
/* answer = false; */
|
||||||
add(namebuf, ERR_IS_CNAME);
|
add(namebuf, ERR_IS_CNAME);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -250,7 +250,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
|
|||||||
add(namebuf, ERR_NO_ADDRESSES);
|
add(namebuf, ERR_NO_ADDRESSES);
|
||||||
}
|
}
|
||||||
/* XXX950 make fatal for 9.5.0 */
|
/* XXX950 make fatal for 9.5.0 */
|
||||||
return (ISC_TRUE);
|
return (true);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
|
if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
|
||||||
@@ -259,7 +259,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
|
|||||||
namebuf, gai_strerror(result));
|
namebuf, gai_strerror(result));
|
||||||
add(namebuf, ERR_LOOKUP_FAILURE);
|
add(namebuf, ERR_LOOKUP_FAILURE);
|
||||||
}
|
}
|
||||||
return (ISC_TRUE);
|
return (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -270,13 +270,13 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
|
|||||||
result = dns_rdataset_first(a);
|
result = dns_rdataset_first(a);
|
||||||
while (result == ISC_R_SUCCESS) {
|
while (result == ISC_R_SUCCESS) {
|
||||||
dns_rdataset_current(a, &rdata);
|
dns_rdataset_current(a, &rdata);
|
||||||
match = ISC_FALSE;
|
match = false;
|
||||||
for (cur = ai; cur != NULL; cur = cur->ai_next) {
|
for (cur = ai; cur != NULL; cur = cur->ai_next) {
|
||||||
if (cur->ai_family != AF_INET)
|
if (cur->ai_family != AF_INET)
|
||||||
continue;
|
continue;
|
||||||
ptr = &((struct sockaddr_in *)(cur->ai_addr))->sin_addr;
|
ptr = &((struct sockaddr_in *)(cur->ai_addr))->sin_addr;
|
||||||
if (memcmp(ptr, rdata.data, rdata.length) == 0) {
|
if (memcmp(ptr, rdata.data, rdata.length) == 0) {
|
||||||
match = ISC_TRUE;
|
match = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -288,7 +288,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
|
|||||||
addrbuf, sizeof(addrbuf)));
|
addrbuf, sizeof(addrbuf)));
|
||||||
add(namebuf, ERR_EXTRA_A);
|
add(namebuf, ERR_EXTRA_A);
|
||||||
/* XXX950 make fatal for 9.5.0 */
|
/* XXX950 make fatal for 9.5.0 */
|
||||||
/* answer = ISC_FALSE; */
|
/* answer = false; */
|
||||||
}
|
}
|
||||||
dns_rdata_reset(&rdata);
|
dns_rdata_reset(&rdata);
|
||||||
result = dns_rdataset_next(a);
|
result = dns_rdataset_next(a);
|
||||||
@@ -300,13 +300,13 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
|
|||||||
result = dns_rdataset_first(aaaa);
|
result = dns_rdataset_first(aaaa);
|
||||||
while (result == ISC_R_SUCCESS) {
|
while (result == ISC_R_SUCCESS) {
|
||||||
dns_rdataset_current(aaaa, &rdata);
|
dns_rdataset_current(aaaa, &rdata);
|
||||||
match = ISC_FALSE;
|
match = false;
|
||||||
for (cur = ai; cur != NULL; cur = cur->ai_next) {
|
for (cur = ai; cur != NULL; cur = cur->ai_next) {
|
||||||
if (cur->ai_family != AF_INET6)
|
if (cur->ai_family != AF_INET6)
|
||||||
continue;
|
continue;
|
||||||
ptr = &((struct sockaddr_in6 *)(cur->ai_addr))->sin6_addr;
|
ptr = &((struct sockaddr_in6 *)(cur->ai_addr))->sin6_addr;
|
||||||
if (memcmp(ptr, rdata.data, rdata.length) == 0) {
|
if (memcmp(ptr, rdata.data, rdata.length) == 0) {
|
||||||
match = ISC_TRUE;
|
match = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,7 +318,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
|
|||||||
addrbuf, sizeof(addrbuf)));
|
addrbuf, sizeof(addrbuf)));
|
||||||
add(namebuf, ERR_EXTRA_AAAA);
|
add(namebuf, ERR_EXTRA_AAAA);
|
||||||
/* XXX950 make fatal for 9.5.0. */
|
/* XXX950 make fatal for 9.5.0. */
|
||||||
/* answer = ISC_FALSE; */
|
/* answer = false; */
|
||||||
}
|
}
|
||||||
dns_rdata_reset(&rdata);
|
dns_rdata_reset(&rdata);
|
||||||
result = dns_rdataset_next(aaaa);
|
result = dns_rdataset_next(aaaa);
|
||||||
@@ -329,7 +329,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
|
|||||||
* Check that all addresses appear in the glue.
|
* Check that all addresses appear in the glue.
|
||||||
*/
|
*/
|
||||||
if (!logged(namebuf, ERR_MISSING_GLUE)) {
|
if (!logged(namebuf, ERR_MISSING_GLUE)) {
|
||||||
isc_boolean_t missing_glue = ISC_FALSE;
|
bool missing_glue = false;
|
||||||
for (cur = ai; cur != NULL; cur = cur->ai_next) {
|
for (cur = ai; cur != NULL; cur = cur->ai_next) {
|
||||||
switch (cur->ai_family) {
|
switch (cur->ai_family) {
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
@@ -345,7 +345,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
|
|||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
match = ISC_FALSE;
|
match = false;
|
||||||
if (dns_rdataset_isassociated(rdataset))
|
if (dns_rdataset_isassociated(rdataset))
|
||||||
result = dns_rdataset_first(rdataset);
|
result = dns_rdataset_first(rdataset);
|
||||||
else
|
else
|
||||||
@@ -353,7 +353,7 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
|
|||||||
while (result == ISC_R_SUCCESS && !match) {
|
while (result == ISC_R_SUCCESS && !match) {
|
||||||
dns_rdataset_current(rdataset, &rdata);
|
dns_rdataset_current(rdataset, &rdata);
|
||||||
if (memcmp(ptr, rdata.data, rdata.length) == 0)
|
if (memcmp(ptr, rdata.data, rdata.length) == 0)
|
||||||
match = ISC_TRUE;
|
match = true;
|
||||||
dns_rdata_reset(&rdata);
|
dns_rdata_reset(&rdata);
|
||||||
result = dns_rdataset_next(rdataset);
|
result = dns_rdataset_next(rdataset);
|
||||||
}
|
}
|
||||||
@@ -364,8 +364,8 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
|
|||||||
inet_ntop(cur->ai_family, ptr,
|
inet_ntop(cur->ai_family, ptr,
|
||||||
addrbuf, sizeof(addrbuf)));
|
addrbuf, sizeof(addrbuf)));
|
||||||
/* XXX950 make fatal for 9.5.0. */
|
/* XXX950 make fatal for 9.5.0. */
|
||||||
/* answer = ISC_FALSE; */
|
/* answer = false; */
|
||||||
missing_glue = ISC_TRUE;
|
missing_glue = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (missing_glue)
|
if (missing_glue)
|
||||||
@@ -374,11 +374,11 @@ checkns(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner,
|
|||||||
freeaddrinfo(ai);
|
freeaddrinfo(ai);
|
||||||
return (answer);
|
return (answer);
|
||||||
#else
|
#else
|
||||||
return (ISC_TRUE);
|
return (true);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static isc_boolean_t
|
static bool
|
||||||
checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
|
checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
|
||||||
#ifdef USE_GETADDRINFO
|
#ifdef USE_GETADDRINFO
|
||||||
struct addrinfo hints, *ai, *cur;
|
struct addrinfo hints, *ai, *cur;
|
||||||
@@ -386,7 +386,7 @@ checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
|
|||||||
char ownerbuf[DNS_NAME_FORMATSIZE];
|
char ownerbuf[DNS_NAME_FORMATSIZE];
|
||||||
int result;
|
int result;
|
||||||
int level = ISC_LOG_ERROR;
|
int level = ISC_LOG_ERROR;
|
||||||
isc_boolean_t answer = ISC_TRUE;
|
bool answer = true;
|
||||||
|
|
||||||
memset(&hints, 0, sizeof(hints));
|
memset(&hints, 0, sizeof(hints));
|
||||||
hints.ai_flags = AI_CANONNAME;
|
hints.ai_flags = AI_CANONNAME;
|
||||||
@@ -430,7 +430,7 @@ checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
|
|||||||
add(namebuf, ERR_IS_MXCNAME);
|
add(namebuf, ERR_IS_MXCNAME);
|
||||||
}
|
}
|
||||||
if (level == ISC_LOG_ERROR)
|
if (level == ISC_LOG_ERROR)
|
||||||
answer = ISC_FALSE;
|
answer = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
freeaddrinfo(ai);
|
freeaddrinfo(ai);
|
||||||
@@ -448,7 +448,7 @@ checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
|
|||||||
add(namebuf, ERR_NO_ADDRESSES);
|
add(namebuf, ERR_NO_ADDRESSES);
|
||||||
}
|
}
|
||||||
/* XXX950 make fatal for 9.5.0. */
|
/* XXX950 make fatal for 9.5.0. */
|
||||||
return (ISC_TRUE);
|
return (true);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
|
if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
|
||||||
@@ -457,14 +457,14 @@ checkmx(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
|
|||||||
namebuf, gai_strerror(result));
|
namebuf, gai_strerror(result));
|
||||||
add(namebuf, ERR_LOOKUP_FAILURE);
|
add(namebuf, ERR_LOOKUP_FAILURE);
|
||||||
}
|
}
|
||||||
return (ISC_TRUE);
|
return (true);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
return (ISC_TRUE);
|
return (true);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static isc_boolean_t
|
static bool
|
||||||
checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
|
checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
|
||||||
#ifdef USE_GETADDRINFO
|
#ifdef USE_GETADDRINFO
|
||||||
struct addrinfo hints, *ai, *cur;
|
struct addrinfo hints, *ai, *cur;
|
||||||
@@ -472,7 +472,7 @@ checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
|
|||||||
char ownerbuf[DNS_NAME_FORMATSIZE];
|
char ownerbuf[DNS_NAME_FORMATSIZE];
|
||||||
int result;
|
int result;
|
||||||
int level = ISC_LOG_ERROR;
|
int level = ISC_LOG_ERROR;
|
||||||
isc_boolean_t answer = ISC_TRUE;
|
bool answer = true;
|
||||||
|
|
||||||
memset(&hints, 0, sizeof(hints));
|
memset(&hints, 0, sizeof(hints));
|
||||||
hints.ai_flags = AI_CANONNAME;
|
hints.ai_flags = AI_CANONNAME;
|
||||||
@@ -515,7 +515,7 @@ checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
|
|||||||
add(namebuf, ERR_IS_SRVCNAME);
|
add(namebuf, ERR_IS_SRVCNAME);
|
||||||
}
|
}
|
||||||
if (level == ISC_LOG_ERROR)
|
if (level == ISC_LOG_ERROR)
|
||||||
answer = ISC_FALSE;
|
answer = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
freeaddrinfo(ai);
|
freeaddrinfo(ai);
|
||||||
@@ -533,7 +533,7 @@ checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
|
|||||||
add(namebuf, ERR_NO_ADDRESSES);
|
add(namebuf, ERR_NO_ADDRESSES);
|
||||||
}
|
}
|
||||||
/* XXX950 make fatal for 9.5.0. */
|
/* XXX950 make fatal for 9.5.0. */
|
||||||
return (ISC_TRUE);
|
return (true);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
|
if (!logged(namebuf, ERR_LOOKUP_FAILURE)) {
|
||||||
@@ -542,10 +542,10 @@ checksrv(dns_zone_t *zone, const dns_name_t *name, const dns_name_t *owner) {
|
|||||||
namebuf, gai_strerror(result));
|
namebuf, gai_strerror(result));
|
||||||
add(namebuf, ERR_LOOKUP_FAILURE);
|
add(namebuf, ERR_LOOKUP_FAILURE);
|
||||||
}
|
}
|
||||||
return (ISC_TRUE);
|
return (true);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
return (ISC_TRUE);
|
return (true);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -590,8 +590,7 @@ check_ttls(dns_zone_t *zone, dns_ttl_t maxttl) {
|
|||||||
dns_rdataset_t rdataset;
|
dns_rdataset_t rdataset;
|
||||||
dns_fixedname_t fname;
|
dns_fixedname_t fname;
|
||||||
dns_name_t *name;
|
dns_name_t *name;
|
||||||
dns_fixedname_init(&fname);
|
name = dns_fixedname_initname(&fname);
|
||||||
name = dns_fixedname_name(&fname);
|
|
||||||
dns_rdataset_init(&rdataset);
|
dns_rdataset_init(&rdataset);
|
||||||
|
|
||||||
CHECK(dns_zone_getdb(zone, &db));
|
CHECK(dns_zone_getdb(zone, &db));
|
||||||
@@ -653,7 +652,7 @@ check_ttls(dns_zone_t *zone, dns_ttl_t maxttl) {
|
|||||||
if (dbiter != NULL)
|
if (dbiter != NULL)
|
||||||
dns_dbiterator_destroy(&dbiter);
|
dns_dbiterator_destroy(&dbiter);
|
||||||
if (version != NULL)
|
if (version != NULL)
|
||||||
dns_db_closeversion(db, &version, ISC_FALSE);
|
dns_db_closeversion(db, &version, false);
|
||||||
if (db != NULL)
|
if (db != NULL)
|
||||||
dns_db_detach(&db);
|
dns_db_detach(&db);
|
||||||
|
|
||||||
@@ -686,12 +685,12 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
|||||||
|
|
||||||
isc_buffer_constinit(&buffer, zonename, strlen(zonename));
|
isc_buffer_constinit(&buffer, zonename, strlen(zonename));
|
||||||
isc_buffer_add(&buffer, strlen(zonename));
|
isc_buffer_add(&buffer, strlen(zonename));
|
||||||
dns_fixedname_init(&fixorigin);
|
origin = dns_fixedname_initname(&fixorigin);
|
||||||
origin = dns_fixedname_name(&fixorigin);
|
|
||||||
CHECK(dns_name_fromtext(origin, &buffer, dns_rootname, 0, NULL));
|
CHECK(dns_name_fromtext(origin, &buffer, dns_rootname, 0, NULL));
|
||||||
CHECK(dns_zone_setorigin(zone, origin));
|
CHECK(dns_zone_setorigin(zone, origin));
|
||||||
CHECK(dns_zone_setdbtype(zone, 1, (const char * const *) dbtype));
|
CHECK(dns_zone_setdbtype(zone, 1, (const char * const *) dbtype));
|
||||||
CHECK(dns_zone_setfile2(zone, filename, fileformat));
|
CHECK(dns_zone_setfile(zone, filename, fileformat,
|
||||||
|
&dns_master_style_default));
|
||||||
if (journal != NULL)
|
if (journal != NULL)
|
||||||
CHECK(dns_zone_setjournal(zone, journal));
|
CHECK(dns_zone_setjournal(zone, journal));
|
||||||
|
|
||||||
@@ -700,8 +699,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
|||||||
CHECK(dns_rdataclass_fromtext(&rdclass, ®ion));
|
CHECK(dns_rdataclass_fromtext(&rdclass, ®ion));
|
||||||
|
|
||||||
dns_zone_setclass(zone, rdclass);
|
dns_zone_setclass(zone, rdclass);
|
||||||
dns_zone_setoption(zone, zone_options, ISC_TRUE);
|
dns_zone_setoption(zone, zone_options, true);
|
||||||
dns_zone_setoption2(zone, zone_options2, ISC_TRUE);
|
|
||||||
dns_zone_setoption(zone, DNS_ZONEOPT_NOMERGE, nomerge);
|
dns_zone_setoption(zone, DNS_ZONEOPT_NOMERGE, nomerge);
|
||||||
|
|
||||||
dns_zone_setmaxttl(zone, maxttl);
|
dns_zone_setmaxttl(zone, maxttl);
|
||||||
@@ -738,7 +736,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
|||||||
isc_result_t
|
isc_result_t
|
||||||
dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
|
dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
|
||||||
dns_masterformat_t fileformat, const dns_master_style_t *style,
|
dns_masterformat_t fileformat, const dns_master_style_t *style,
|
||||||
const isc_uint32_t rawversion)
|
const uint32_t rawversion)
|
||||||
{
|
{
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
FILE *output = stdout;
|
FILE *output = stdout;
|
||||||
@@ -764,8 +762,8 @@ dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
result = dns_zone_dumptostream3(zone, output, fileformat, style,
|
result = dns_zone_dumptostream(zone, output, fileformat, style,
|
||||||
rawversion);
|
rawversion);
|
||||||
if (output != stdout)
|
if (output != stdout)
|
||||||
(void)isc_stdio_close(output);
|
(void)isc_stdio_close(output);
|
||||||
|
|
||||||
|
|||||||
+10
-8
@@ -9,19 +9,22 @@
|
|||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: check-tool.h,v 1.18 2011/12/09 23:47:02 tbox Exp $ */
|
|
||||||
|
|
||||||
#ifndef CHECK_TOOL_H
|
#ifndef CHECK_TOOL_H
|
||||||
#define CHECK_TOOL_H
|
#define CHECK_TOOL_H
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include <isc/lang.h>
|
#include <isc/lang.h>
|
||||||
#include <isc/stdio.h>
|
#include <isc/stdio.h>
|
||||||
#include <isc/types.h>
|
#include <isc/types.h>
|
||||||
|
|
||||||
#include <dns/masterdump.h>
|
#include <dns/masterdump.h>
|
||||||
#include <dns/types.h>
|
#include <dns/types.h>
|
||||||
|
#include <dns/zone.h>
|
||||||
|
|
||||||
ISC_LANG_BEGINDECLS
|
ISC_LANG_BEGINDECLS
|
||||||
|
|
||||||
@@ -36,7 +39,7 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
|||||||
isc_result_t
|
isc_result_t
|
||||||
dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
|
dump_zone(const char *zonename, dns_zone_t *zone, const char *filename,
|
||||||
dns_masterformat_t fileformat, const dns_master_style_t *style,
|
dns_masterformat_t fileformat, const dns_master_style_t *style,
|
||||||
const isc_uint32_t rawversion);
|
const uint32_t rawversion);
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
void InitSockets(void);
|
void InitSockets(void);
|
||||||
@@ -45,12 +48,11 @@ void DestroySockets(void);
|
|||||||
|
|
||||||
extern int debug;
|
extern int debug;
|
||||||
extern const char *journal;
|
extern const char *journal;
|
||||||
extern isc_boolean_t nomerge;
|
extern bool nomerge;
|
||||||
extern isc_boolean_t docheckmx;
|
extern bool docheckmx;
|
||||||
extern isc_boolean_t docheckns;
|
extern bool docheckns;
|
||||||
extern isc_boolean_t dochecksrv;
|
extern bool dochecksrv;
|
||||||
extern unsigned int zone_options;
|
extern dns_zoneopt_t zone_options;
|
||||||
extern unsigned int zone_options2;
|
|
||||||
|
|
||||||
ISC_LANG_ENDDECLS
|
ISC_LANG_ENDDECLS
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -136,5 +136,5 @@ BIND 9 Administrator Reference Manual\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2000-2002, 2004, 2005, 2007, 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
+24
-33
@@ -9,19 +9,18 @@
|
|||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: named-checkconf.c,v 1.56 2011/03/12 04:59:46 tbox Exp $ */
|
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <isc/commandline.h>
|
#include <isc/commandline.h>
|
||||||
#include <isc/dir.h>
|
#include <isc/dir.h>
|
||||||
#include <isc/entropy.h>
|
|
||||||
#include <isc/hash.h>
|
#include <isc/hash.h>
|
||||||
#include <isc/log.h>
|
#include <isc/log.h>
|
||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
@@ -93,18 +92,18 @@ directory_callback(const char *clausename, const cfg_obj_t *obj, void *arg) {
|
|||||||
return (ISC_R_SUCCESS);
|
return (ISC_R_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
static isc_boolean_t
|
static bool
|
||||||
get_maps(const cfg_obj_t **maps, const char *name, const cfg_obj_t **obj) {
|
get_maps(const cfg_obj_t **maps, const char *name, const cfg_obj_t **obj) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0;; i++) {
|
for (i = 0;; i++) {
|
||||||
if (maps[i] == NULL)
|
if (maps[i] == NULL)
|
||||||
return (ISC_FALSE);
|
return (false);
|
||||||
if (cfg_map_get(maps[i], name, obj) == ISC_R_SUCCESS)
|
if (cfg_map_get(maps[i], name, obj) == ISC_R_SUCCESS)
|
||||||
return (ISC_TRUE);
|
return (true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static isc_boolean_t
|
static bool
|
||||||
get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
|
get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
|
||||||
const cfg_listelt_t *element;
|
const cfg_listelt_t *element;
|
||||||
const cfg_obj_t *checknames;
|
const cfg_obj_t *checknames;
|
||||||
@@ -115,14 +114,14 @@ get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
|
|||||||
|
|
||||||
for (i = 0;; i++) {
|
for (i = 0;; i++) {
|
||||||
if (maps[i] == NULL)
|
if (maps[i] == NULL)
|
||||||
return (ISC_FALSE);
|
return (false);
|
||||||
checknames = NULL;
|
checknames = NULL;
|
||||||
result = cfg_map_get(maps[i], "check-names", &checknames);
|
result = cfg_map_get(maps[i], "check-names", &checknames);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
continue;
|
continue;
|
||||||
if (checknames != NULL && !cfg_obj_islist(checknames)) {
|
if (checknames != NULL && !cfg_obj_islist(checknames)) {
|
||||||
*obj = checknames;
|
*obj = checknames;
|
||||||
return (ISC_TRUE);
|
return (true);
|
||||||
}
|
}
|
||||||
for (element = cfg_list_first(checknames);
|
for (element = cfg_list_first(checknames);
|
||||||
element != NULL;
|
element != NULL;
|
||||||
@@ -137,7 +136,7 @@ get_checknames(const cfg_obj_t **maps, const cfg_obj_t **obj) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
*obj = cfg_tuple_get(value, "mode");
|
*obj = cfg_tuple_get(value, "mode");
|
||||||
return (ISC_TRUE);
|
return (true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -170,7 +169,7 @@ configure_hint(const char *zfile, const char *zclass, isc_mem_t *mctx) {
|
|||||||
static isc_result_t
|
static isc_result_t
|
||||||
configure_zone(const char *vclass, const char *view,
|
configure_zone(const char *vclass, const char *view,
|
||||||
const cfg_obj_t *zconfig, const cfg_obj_t *vconfig,
|
const cfg_obj_t *zconfig, const cfg_obj_t *vconfig,
|
||||||
const cfg_obj_t *config, isc_mem_t *mctx, isc_boolean_t list)
|
const cfg_obj_t *config, isc_mem_t *mctx, bool list)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
@@ -408,7 +407,7 @@ configure_zone(const char *vclass, const char *view,
|
|||||||
obj = NULL;
|
obj = NULL;
|
||||||
if (get_maps(maps, "max-zone-ttl", &obj)) {
|
if (get_maps(maps, "max-zone-ttl", &obj)) {
|
||||||
maxttl = cfg_obj_asuint32(obj);
|
maxttl = cfg_obj_asuint32(obj);
|
||||||
zone_options2 |= DNS_ZONEOPT2_CHECKTTL;
|
zone_options |= DNS_ZONEOPT_CHECKTTL;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = load_zone(mctx, zname, zfile, masterformat,
|
result = load_zone(mctx, zname, zfile, masterformat,
|
||||||
@@ -422,7 +421,7 @@ configure_zone(const char *vclass, const char *view,
|
|||||||
/*% configure a view */
|
/*% configure a view */
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
configure_view(const char *vclass, const char *view, const cfg_obj_t *config,
|
configure_view(const char *vclass, const char *view, const cfg_obj_t *config,
|
||||||
const cfg_obj_t *vconfig, isc_mem_t *mctx, isc_boolean_t list)
|
const cfg_obj_t *vconfig, isc_mem_t *mctx, bool list)
|
||||||
{
|
{
|
||||||
const cfg_listelt_t *element;
|
const cfg_listelt_t *element;
|
||||||
const cfg_obj_t *voptions;
|
const cfg_obj_t *voptions;
|
||||||
@@ -471,7 +470,7 @@ config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
|
|||||||
/*% load zones from the configuration */
|
/*% load zones from the configuration */
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
load_zones_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx,
|
load_zones_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx,
|
||||||
isc_boolean_t list_zones)
|
bool list_zones)
|
||||||
{
|
{
|
||||||
const cfg_listelt_t *element;
|
const cfg_listelt_t *element;
|
||||||
const cfg_obj_t *views;
|
const cfg_obj_t *views;
|
||||||
@@ -539,13 +538,12 @@ main(int argc, char **argv) {
|
|||||||
isc_mem_t *mctx = NULL;
|
isc_mem_t *mctx = NULL;
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
int exit_status = 0;
|
int exit_status = 0;
|
||||||
isc_entropy_t *ectx = NULL;
|
bool load_zones = false;
|
||||||
isc_boolean_t load_zones = ISC_FALSE;
|
bool list_zones = false;
|
||||||
isc_boolean_t list_zones = ISC_FALSE;
|
bool print = false;
|
||||||
isc_boolean_t print = ISC_FALSE;
|
|
||||||
unsigned int flags = 0;
|
unsigned int flags = 0;
|
||||||
|
|
||||||
isc_commandline_errprint = ISC_FALSE;
|
isc_commandline_errprint = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Process memory debugging argument first.
|
* Process memory debugging argument first.
|
||||||
@@ -569,7 +567,7 @@ main(int argc, char **argv) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
isc_commandline_reset = ISC_TRUE;
|
isc_commandline_reset = true;
|
||||||
|
|
||||||
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
|
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
|
||||||
|
|
||||||
@@ -580,11 +578,11 @@ main(int argc, char **argv) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'j':
|
case 'j':
|
||||||
nomerge = ISC_FALSE;
|
nomerge = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'l':
|
case 'l':
|
||||||
list_zones = ISC_TRUE;
|
list_zones = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'm':
|
case 'm':
|
||||||
@@ -600,7 +598,7 @@ main(int argc, char **argv) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'p':
|
case 'p':
|
||||||
print = ISC_TRUE;
|
print = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'v':
|
case 'v':
|
||||||
@@ -612,10 +610,10 @@ main(int argc, char **argv) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'z':
|
case 'z':
|
||||||
load_zones = ISC_TRUE;
|
load_zones = true;
|
||||||
docheckmx = ISC_FALSE;
|
docheckmx = false;
|
||||||
docheckns = ISC_FALSE;
|
docheckns = false;
|
||||||
dochecksrv = ISC_FALSE;
|
dochecksrv = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '?':
|
case '?':
|
||||||
@@ -655,10 +653,6 @@ main(int argc, char **argv) {
|
|||||||
|
|
||||||
RUNTIME_CHECK(setup_logging(mctx, stdout, &logc) == ISC_R_SUCCESS);
|
RUNTIME_CHECK(setup_logging(mctx, stdout, &logc) == ISC_R_SUCCESS);
|
||||||
|
|
||||||
RUNTIME_CHECK(isc_entropy_create(mctx, &ectx) == ISC_R_SUCCESS);
|
|
||||||
RUNTIME_CHECK(isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE)
|
|
||||||
== ISC_R_SUCCESS);
|
|
||||||
|
|
||||||
dns_result_register();
|
dns_result_register();
|
||||||
|
|
||||||
RUNTIME_CHECK(cfg_parser_create(mctx, logc, &parser) == ISC_R_SUCCESS);
|
RUNTIME_CHECK(cfg_parser_create(mctx, logc, &parser) == ISC_R_SUCCESS);
|
||||||
@@ -689,9 +683,6 @@ main(int argc, char **argv) {
|
|||||||
|
|
||||||
isc_log_destroy(&logc);
|
isc_log_destroy(&logc);
|
||||||
|
|
||||||
isc_hash_destroy();
|
|
||||||
isc_entropy_detach(&ectx);
|
|
||||||
|
|
||||||
isc_mem_destroy(&mctx);
|
isc_mem_destroy(&mctx);
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2000-2002, 2004, 2005, 2007, 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2000-2002, 2004-2007, 2009-2016 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -325,5 +325,5 @@ BIND 9 Administrator Reference Manual\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2000-2002, 2004-2007, 2009-2016 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2000-2002, 2004-2007, 2009-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
+26
-32
@@ -9,18 +9,18 @@
|
|||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: named-checkzone.c,v 1.65.32.2 2012/02/07 02:45:21 each Exp $ */
|
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
#include <isc/app.h>
|
#include <isc/app.h>
|
||||||
#include <isc/commandline.h>
|
#include <isc/commandline.h>
|
||||||
#include <isc/dir.h>
|
#include <isc/dir.h>
|
||||||
#include <isc/entropy.h>
|
|
||||||
#include <isc/hash.h>
|
#include <isc/hash.h>
|
||||||
#include <isc/log.h>
|
#include <isc/log.h>
|
||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
@@ -47,7 +47,6 @@
|
|||||||
|
|
||||||
static int quiet = 0;
|
static int quiet = 0;
|
||||||
static isc_mem_t *mctx = NULL;
|
static isc_mem_t *mctx = NULL;
|
||||||
static isc_entropy_t *ectx = NULL;
|
|
||||||
dns_zone_t *zone = NULL;
|
dns_zone_t *zone = NULL;
|
||||||
dns_zonetype_t zonetype = dns_zone_master;
|
dns_zonetype_t zonetype = dns_zone_master;
|
||||||
static int dumpzone = 0;
|
static int dumpzone = 0;
|
||||||
@@ -109,10 +108,10 @@ main(int argc, char **argv) {
|
|||||||
dns_masterformat_t inputformat = dns_masterformat_text;
|
dns_masterformat_t inputformat = dns_masterformat_text;
|
||||||
dns_masterformat_t outputformat = dns_masterformat_text;
|
dns_masterformat_t outputformat = dns_masterformat_text;
|
||||||
dns_masterrawheader_t header;
|
dns_masterrawheader_t header;
|
||||||
isc_uint32_t rawversion = 1, serialnum = 0;
|
uint32_t rawversion = 1, serialnum = 0;
|
||||||
dns_ttl_t maxttl = 0;
|
dns_ttl_t maxttl = 0;
|
||||||
isc_boolean_t snset = ISC_FALSE;
|
bool snset = false;
|
||||||
isc_boolean_t logdump = ISC_FALSE;
|
bool logdump = false;
|
||||||
FILE *errout = stdout;
|
FILE *errout = stdout;
|
||||||
char *endp;
|
char *endp;
|
||||||
|
|
||||||
@@ -162,7 +161,7 @@ main(int argc, char **argv) {
|
|||||||
|
|
||||||
#define ARGCMP(X) (strcmp(isc_commandline_argument, X) == 0)
|
#define ARGCMP(X) (strcmp(isc_commandline_argument, X) == 0)
|
||||||
|
|
||||||
isc_commandline_errprint = ISC_FALSE;
|
isc_commandline_errprint = false;
|
||||||
|
|
||||||
while ((c = isc_commandline_parse(argc, argv,
|
while ((c = isc_commandline_parse(argc, argv,
|
||||||
"c:df:hi:jJ:k:L:l:m:n:qr:s:t:o:vw:DF:M:S:T:W:"))
|
"c:df:hi:jJ:k:L:l:m:n:qr:s:t:o:vw:DF:M:S:T:W:"))
|
||||||
@@ -180,33 +179,33 @@ main(int argc, char **argv) {
|
|||||||
if (ARGCMP("full")) {
|
if (ARGCMP("full")) {
|
||||||
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY |
|
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY |
|
||||||
DNS_ZONEOPT_CHECKSIBLING;
|
DNS_ZONEOPT_CHECKSIBLING;
|
||||||
docheckmx = ISC_TRUE;
|
docheckmx = true;
|
||||||
docheckns = ISC_TRUE;
|
docheckns = true;
|
||||||
dochecksrv = ISC_TRUE;
|
dochecksrv = true;
|
||||||
} else if (ARGCMP("full-sibling")) {
|
} else if (ARGCMP("full-sibling")) {
|
||||||
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
|
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
|
||||||
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
|
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
|
||||||
docheckmx = ISC_TRUE;
|
docheckmx = true;
|
||||||
docheckns = ISC_TRUE;
|
docheckns = true;
|
||||||
dochecksrv = ISC_TRUE;
|
dochecksrv = true;
|
||||||
} else if (ARGCMP("local")) {
|
} else if (ARGCMP("local")) {
|
||||||
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
|
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
|
||||||
zone_options |= DNS_ZONEOPT_CHECKSIBLING;
|
zone_options |= DNS_ZONEOPT_CHECKSIBLING;
|
||||||
docheckmx = ISC_FALSE;
|
docheckmx = false;
|
||||||
docheckns = ISC_FALSE;
|
docheckns = false;
|
||||||
dochecksrv = ISC_FALSE;
|
dochecksrv = false;
|
||||||
} else if (ARGCMP("local-sibling")) {
|
} else if (ARGCMP("local-sibling")) {
|
||||||
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
|
zone_options |= DNS_ZONEOPT_CHECKINTEGRITY;
|
||||||
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
|
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
|
||||||
docheckmx = ISC_FALSE;
|
docheckmx = false;
|
||||||
docheckns = ISC_FALSE;
|
docheckns = false;
|
||||||
dochecksrv = ISC_FALSE;
|
dochecksrv = false;
|
||||||
} else if (ARGCMP("none")) {
|
} else if (ARGCMP("none")) {
|
||||||
zone_options &= ~DNS_ZONEOPT_CHECKINTEGRITY;
|
zone_options &= ~DNS_ZONEOPT_CHECKINTEGRITY;
|
||||||
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
|
zone_options &= ~DNS_ZONEOPT_CHECKSIBLING;
|
||||||
docheckmx = ISC_FALSE;
|
docheckmx = false;
|
||||||
docheckns = ISC_FALSE;
|
docheckns = false;
|
||||||
dochecksrv = ISC_FALSE;
|
dochecksrv = false;
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "invalid argument to -i: %s\n",
|
fprintf(stderr, "invalid argument to -i: %s\n",
|
||||||
isc_commandline_argument);
|
isc_commandline_argument);
|
||||||
@@ -223,12 +222,12 @@ main(int argc, char **argv) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'j':
|
case 'j':
|
||||||
nomerge = ISC_FALSE;
|
nomerge = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'J':
|
case 'J':
|
||||||
journal = isc_commandline_argument;
|
journal = isc_commandline_argument;
|
||||||
nomerge = ISC_FALSE;
|
nomerge = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'k':
|
case 'k':
|
||||||
@@ -249,7 +248,7 @@ main(int argc, char **argv) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'L':
|
case 'L':
|
||||||
snset = ISC_TRUE;
|
snset = true;
|
||||||
endp = NULL;
|
endp = NULL;
|
||||||
serialnum = strtol(isc_commandline_argument, &endp, 0);
|
serialnum = strtol(isc_commandline_argument, &endp, 0);
|
||||||
if (*endp != '\0') {
|
if (*endp != '\0') {
|
||||||
@@ -260,7 +259,7 @@ main(int argc, char **argv) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'l':
|
case 'l':
|
||||||
zone_options2 |= DNS_ZONEOPT2_CHECKTTL;
|
zone_options |= DNS_ZONEOPT_CHECKTTL;
|
||||||
endp = NULL;
|
endp = NULL;
|
||||||
maxttl = strtol(isc_commandline_argument, &endp, 0);
|
maxttl = strtol(isc_commandline_argument, &endp, 0);
|
||||||
if (*endp != '\0') {
|
if (*endp != '\0') {
|
||||||
@@ -508,7 +507,7 @@ main(int argc, char **argv) {
|
|||||||
strcmp(output_filename, "/dev/fd/1") == 0 ||
|
strcmp(output_filename, "/dev/fd/1") == 0 ||
|
||||||
strcmp(output_filename, "/dev/stdout") == 0)) {
|
strcmp(output_filename, "/dev/stdout") == 0)) {
|
||||||
errout = stderr;
|
errout = stderr;
|
||||||
logdump = ISC_FALSE;
|
logdump = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isc_commandline_index + 2 != argc)
|
if (isc_commandline_index + 2 != argc)
|
||||||
@@ -522,9 +521,6 @@ main(int argc, char **argv) {
|
|||||||
if (!quiet)
|
if (!quiet)
|
||||||
RUNTIME_CHECK(setup_logging(mctx, errout, &lctx)
|
RUNTIME_CHECK(setup_logging(mctx, errout, &lctx)
|
||||||
== ISC_R_SUCCESS);
|
== ISC_R_SUCCESS);
|
||||||
RUNTIME_CHECK(isc_entropy_create(mctx, &ectx) == ISC_R_SUCCESS);
|
|
||||||
RUNTIME_CHECK(isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE)
|
|
||||||
== ISC_R_SUCCESS);
|
|
||||||
|
|
||||||
dns_result_register();
|
dns_result_register();
|
||||||
|
|
||||||
@@ -556,8 +552,6 @@ main(int argc, char **argv) {
|
|||||||
destroy();
|
destroy();
|
||||||
if (lctx != NULL)
|
if (lctx != NULL)
|
||||||
isc_log_destroy(&lctx);
|
isc_log_destroy(&lctx);
|
||||||
isc_hash_destroy();
|
|
||||||
isc_entropy_detach(&ectx);
|
|
||||||
isc_mem_destroy(&mctx);
|
isc_mem_destroy(&mctx);
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
DestroySockets();
|
DestroySockets();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2000-2002, 2004-2007, 2009-2016 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2000-2002, 2004-2007, 2009-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
||||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(ProjectName).pch</PrecompiledHeaderOutputFile>
|
||||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
@@ -87,7 +87,7 @@ copy /Y named-checkzone.ilk named-compilezone.ilk
|
|||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ CWARNINGS =
|
|||||||
|
|
||||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||||
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
|
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
|
||||||
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
|
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
ddns-confgen \- ddns key generation tool
|
ddns-confgen \- ddns key generation tool
|
||||||
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
||||||
.HP \w'\fBtsig\-keygen\fR\ 'u
|
.HP \w'\fBtsig\-keygen\fR\ 'u
|
||||||
\fBtsig\-keygen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-h\fR] [\fB\-r\ \fR\fB\fIrandomfile\fR\fR] [name]
|
\fBtsig\-keygen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-h\fR] [name]
|
||||||
.HP \w'\fBddns\-confgen\fR\ 'u
|
.HP \w'\fBddns\-confgen\fR\ 'u
|
||||||
\fBddns\-confgen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-h\fR] [\fB\-k\ \fR\fB\fIkeyname\fR\fR] [\fB\-q\fR] [\fB\-r\ \fR\fB\fIrandomfile\fR\fR] [\-s\ \fIname\fR | \-z\ \fIzone\fR]
|
\fBddns\-confgen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-h\fR] [\fB\-k\ \fR\fB\fIkeyname\fR\fR] [\fB\-q\fR] [\fB\-r\ \fR\fB\fIrandomfile\fR\fR] [\-s\ \fIname\fR | \-z\ \fIzone\fR]
|
||||||
.SH "DESCRIPTION"
|
.SH "DESCRIPTION"
|
||||||
@@ -109,17 +109,6 @@ only\&.) Quiet mode: Print only the key, with no explanatory text or usage examp
|
|||||||
\fBtsig\-keygen\fR\&.
|
\fBtsig\-keygen\fR\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-r \fIrandomfile\fR
|
|
||||||
.RS 4
|
|
||||||
Specifies a source of random data for generating the authorization\&. If the operating system does not provide a
|
|
||||||
/dev/random
|
|
||||||
or equivalent device, the default source of randomness is keyboard input\&.
|
|
||||||
randomdev
|
|
||||||
specifies the name of a character device or file containing random data to be used instead of the default\&. The special value
|
|
||||||
keyboard
|
|
||||||
indicates that keyboard input should be used\&.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
\-s \fIname\fR
|
\-s \fIname\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
(\fBddns\-confgen\fR
|
(\fBddns\-confgen\fR
|
||||||
@@ -155,5 +144,5 @@ BIND 9 Administrator Reference Manual\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
+16
-19
@@ -19,14 +19,14 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <isc/assertions.h>
|
#include <isc/assertions.h>
|
||||||
#include <isc/base64.h>
|
#include <isc/base64.h>
|
||||||
#include <isc/buffer.h>
|
#include <isc/buffer.h>
|
||||||
#include <isc/commandline.h>
|
#include <isc/commandline.h>
|
||||||
#include <isc/entropy.h>
|
|
||||||
#include <isc/file.h>
|
#include <isc/file.h>
|
||||||
#include <isc/keyboard.h>
|
#include <isc/keyboard.h>
|
||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
#include <isc/time.h>
|
#include <isc/time.h>
|
||||||
#include <isc/util.h>
|
#include <isc/util.h>
|
||||||
|
|
||||||
#ifdef PKCS11CRYPTO
|
#if USE_PKCS11
|
||||||
#include <pk11/result.h>
|
#include <pk11/result.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
static char program[256];
|
static char program[256];
|
||||||
const char *progname;
|
const char *progname;
|
||||||
static enum { progmode_keygen, progmode_confgen} progmode;
|
static enum { progmode_keygen, progmode_confgen} progmode;
|
||||||
isc_boolean_t verbose = ISC_FALSE; /* needed by util.c but not used here */
|
bool verbose = false; /* needed by util.c but not used here */
|
||||||
|
|
||||||
ISC_PLATFORM_NORETURN_PRE static void
|
ISC_PLATFORM_NORETURN_PRE static void
|
||||||
usage(int status) ISC_PLATFORM_NORETURN_POST;
|
usage(int status) ISC_PLATFORM_NORETURN_POST;
|
||||||
@@ -67,10 +67,9 @@ usage(int status) {
|
|||||||
if (progmode == progmode_confgen) {
|
if (progmode == progmode_confgen) {
|
||||||
fprintf(stderr, "\
|
fprintf(stderr, "\
|
||||||
Usage:\n\
|
Usage:\n\
|
||||||
%s [-a alg] [-k keyname] [-r randomfile] [-q] [-s name | -z zone]\n\
|
%s [-a alg] [-k keyname] [-q] [-s name | -z zone]\n\
|
||||||
-a alg: algorithm (default hmac-sha256)\n\
|
-a alg: algorithm (default hmac-sha256)\n\
|
||||||
-k keyname: name of the key as it will be used in named.conf\n\
|
-k keyname: name of the key as it will be used in named.conf\n\
|
||||||
-r randomfile: source of random data (use \"keyboard\" for key timing)\n\
|
|
||||||
-s name: domain name to be updated using the created key\n\
|
-s name: domain name to be updated using the created key\n\
|
||||||
-z zone: name of the zone as it will be used in named.conf\n\
|
-z zone: name of the zone as it will be used in named.conf\n\
|
||||||
-q: quiet mode: print the key, with no explanatory text\n",
|
-q: quiet mode: print the key, with no explanatory text\n",
|
||||||
@@ -78,9 +77,8 @@ Usage:\n\
|
|||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "\
|
fprintf(stderr, "\
|
||||||
Usage:\n\
|
Usage:\n\
|
||||||
%s [-a alg] [-r randomfile] [keyname]\n\
|
%s [-a alg] [keyname]\n\
|
||||||
-a alg: algorithm (default hmac-sha256)\n\
|
-a alg: algorithm (default hmac-sha256)\n\n",
|
||||||
-r randomfile: source of random data (use \"keyboard\" for key timing)\n",
|
|
||||||
progname);
|
progname);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,12 +88,11 @@ Usage:\n\
|
|||||||
int
|
int
|
||||||
main(int argc, char **argv) {
|
main(int argc, char **argv) {
|
||||||
isc_result_t result = ISC_R_SUCCESS;
|
isc_result_t result = ISC_R_SUCCESS;
|
||||||
isc_boolean_t show_final_mem = ISC_FALSE;
|
bool show_final_mem = false;
|
||||||
isc_boolean_t quiet = ISC_FALSE;
|
bool quiet = false;
|
||||||
isc_buffer_t key_txtbuffer;
|
isc_buffer_t key_txtbuffer;
|
||||||
char key_txtsecret[256];
|
char key_txtsecret[256];
|
||||||
isc_mem_t *mctx = NULL;
|
isc_mem_t *mctx = NULL;
|
||||||
const char *randomfile = NULL;
|
|
||||||
const char *keyname = NULL;
|
const char *keyname = NULL;
|
||||||
const char *zone = NULL;
|
const char *zone = NULL;
|
||||||
const char *self_domain = NULL;
|
const char *self_domain = NULL;
|
||||||
@@ -106,7 +103,7 @@ main(int argc, char **argv) {
|
|||||||
int len = 0;
|
int len = 0;
|
||||||
int ch;
|
int ch;
|
||||||
|
|
||||||
#ifdef PKCS11CRYPTO
|
#if USE_PKCS11
|
||||||
pk11_result_register();
|
pk11_result_register();
|
||||||
#endif
|
#endif
|
||||||
dns_result_register();
|
dns_result_register();
|
||||||
@@ -128,13 +125,13 @@ main(int argc, char **argv) {
|
|||||||
|
|
||||||
if (PROGCMP("tsig-keygen")) {
|
if (PROGCMP("tsig-keygen")) {
|
||||||
progmode = progmode_keygen;
|
progmode = progmode_keygen;
|
||||||
quiet = ISC_TRUE;
|
quiet = true;
|
||||||
} else if (PROGCMP("ddns-confgen"))
|
} else if (PROGCMP("ddns-confgen"))
|
||||||
progmode = progmode_confgen;
|
progmode = progmode_confgen;
|
||||||
else
|
else
|
||||||
INSIST(0);
|
INSIST(0);
|
||||||
|
|
||||||
isc_commandline_errprint = ISC_FALSE;
|
isc_commandline_errprint = false;
|
||||||
|
|
||||||
while ((ch = isc_commandline_parse(argc, argv,
|
while ((ch = isc_commandline_parse(argc, argv,
|
||||||
"a:hk:Mmr:qs:y:z:")) != -1) {
|
"a:hk:Mmr:qs:y:z:")) != -1) {
|
||||||
@@ -159,16 +156,16 @@ main(int argc, char **argv) {
|
|||||||
isc_mem_debugging = ISC_MEM_DEBUGTRACE;
|
isc_mem_debugging = ISC_MEM_DEBUGTRACE;
|
||||||
break;
|
break;
|
||||||
case 'm':
|
case 'm':
|
||||||
show_final_mem = ISC_TRUE;
|
show_final_mem = true;
|
||||||
break;
|
break;
|
||||||
case 'q':
|
case 'q':
|
||||||
if (progmode == progmode_confgen)
|
if (progmode == progmode_confgen)
|
||||||
quiet = ISC_TRUE;
|
quiet = true;
|
||||||
else
|
else
|
||||||
usage(1);
|
usage(1);
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
randomfile = isc_commandline_argument;
|
fatal("The -r option has been deprecated.");
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
if (progmode == progmode_confgen)
|
if (progmode == progmode_confgen)
|
||||||
@@ -235,7 +232,7 @@ main(int argc, char **argv) {
|
|||||||
|
|
||||||
isc_buffer_init(&key_txtbuffer, &key_txtsecret, sizeof(key_txtsecret));
|
isc_buffer_init(&key_txtbuffer, &key_txtsecret, sizeof(key_txtsecret));
|
||||||
|
|
||||||
generate_key(mctx, randomfile, alg, keysize, &key_txtbuffer);
|
generate_key(mctx, alg, keysize, &key_txtbuffer);
|
||||||
|
|
||||||
|
|
||||||
if (!quiet)
|
if (!quiet)
|
||||||
|
|||||||
@@ -46,7 +46,6 @@
|
|||||||
<command>tsig-keygen</command>
|
<command>tsig-keygen</command>
|
||||||
<arg choice="opt" rep="norepeat"><option>-a <replaceable class="parameter">algorithm</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-a <replaceable class="parameter">algorithm</replaceable></option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-h</option></arg>
|
<arg choice="opt" rep="norepeat"><option>-h</option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">randomfile</replaceable></option></arg>
|
|
||||||
<arg choice="opt" rep="norepeat">name</arg>
|
<arg choice="opt" rep="norepeat">name</arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
<cmdsynopsis sepchar=" ">
|
<cmdsynopsis sepchar=" ">
|
||||||
@@ -157,23 +156,6 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>-r <replaceable class="parameter">randomfile</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Specifies a source of random data for generating the
|
|
||||||
authorization. If the operating system does not provide a
|
|
||||||
<filename>/dev/random</filename> or equivalent device, the
|
|
||||||
default source of randomness is keyboard input.
|
|
||||||
<filename>randomdev</filename> specifies the name of a
|
|
||||||
character device or file containing random data to be used
|
|
||||||
instead of the default. The special value
|
|
||||||
<filename>keyboard</filename> indicates that keyboard input
|
|
||||||
should be used.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-s <replaceable class="parameter">name</replaceable></term>
|
<term>-s <replaceable class="parameter">name</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2009, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2009, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -35,7 +35,6 @@
|
|||||||
<code class="command">tsig-keygen</code>
|
<code class="command">tsig-keygen</code>
|
||||||
[<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>]
|
[<code class="option">-a <em class="replaceable"><code>algorithm</code></em></code>]
|
||||||
[<code class="option">-h</code>]
|
[<code class="option">-h</code>]
|
||||||
[<code class="option">-r <em class="replaceable"><code>randomfile</code></em></code>]
|
|
||||||
[name]
|
[name]
|
||||||
</p></div>
|
</p></div>
|
||||||
<div class="cmdsynopsis"><p>
|
<div class="cmdsynopsis"><p>
|
||||||
@@ -136,20 +135,6 @@
|
|||||||
This is essentially identical to <span class="command"><strong>tsig-keygen</strong></span>.
|
This is essentially identical to <span class="command"><strong>tsig-keygen</strong></span>.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term">-r <em class="replaceable"><code>randomfile</code></em></span></dt>
|
|
||||||
<dd>
|
|
||||||
<p>
|
|
||||||
Specifies a source of random data for generating the
|
|
||||||
authorization. If the operating system does not provide a
|
|
||||||
<code class="filename">/dev/random</code> or equivalent device, the
|
|
||||||
default source of randomness is keyboard input.
|
|
||||||
<code class="filename">randomdev</code> specifies the name of a
|
|
||||||
character device or file containing random data to be used
|
|
||||||
instead of the default. The special value
|
|
||||||
<code class="filename">keyboard</code> indicates that keyboard input
|
|
||||||
should be used.
|
|
||||||
</p>
|
|
||||||
</dd>
|
|
||||||
<dt><span class="term">-s <em class="replaceable"><code>name</code></em></span></dt>
|
<dt><span class="term">-s <em class="replaceable"><code>name</code></em></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: os.h,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
|
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
|
|||||||
+7
-47
@@ -9,7 +9,6 @@
|
|||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: keygen.c,v 1.4 2009/11/12 14:02:38 marka Exp $ */
|
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
@@ -20,7 +19,6 @@
|
|||||||
|
|
||||||
#include <isc/base64.h>
|
#include <isc/base64.h>
|
||||||
#include <isc/buffer.h>
|
#include <isc/buffer.h>
|
||||||
#include <isc/entropy.h>
|
|
||||||
#include <isc/file.h>
|
#include <isc/file.h>
|
||||||
#include <isc/keyboard.h>
|
#include <isc/keyboard.h>
|
||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
@@ -45,10 +43,8 @@
|
|||||||
const char *
|
const char *
|
||||||
alg_totext(dns_secalg_t alg) {
|
alg_totext(dns_secalg_t alg) {
|
||||||
switch (alg) {
|
switch (alg) {
|
||||||
#ifndef PK11_MD5_DISABLE
|
|
||||||
case DST_ALG_HMACMD5:
|
case DST_ALG_HMACMD5:
|
||||||
return "hmac-md5";
|
return "hmac-md5";
|
||||||
#endif
|
|
||||||
case DST_ALG_HMACSHA1:
|
case DST_ALG_HMACSHA1:
|
||||||
return "hmac-sha1";
|
return "hmac-sha1";
|
||||||
case DST_ALG_HMACSHA224:
|
case DST_ALG_HMACSHA224:
|
||||||
@@ -73,10 +69,8 @@ alg_fromtext(const char *name) {
|
|||||||
if (strncasecmp(p, "hmac-", 5) == 0)
|
if (strncasecmp(p, "hmac-", 5) == 0)
|
||||||
p = &name[5];
|
p = &name[5];
|
||||||
|
|
||||||
#ifndef PK11_MD5_DISABLE
|
|
||||||
if (strcasecmp(p, "md5") == 0)
|
if (strcasecmp(p, "md5") == 0)
|
||||||
return DST_ALG_HMACMD5;
|
return DST_ALG_HMACMD5;
|
||||||
#endif
|
|
||||||
if (strcasecmp(p, "sha1") == 0)
|
if (strcasecmp(p, "sha1") == 0)
|
||||||
return DST_ALG_HMACSHA1;
|
return DST_ALG_HMACSHA1;
|
||||||
if (strcasecmp(p, "sha224") == 0)
|
if (strcasecmp(p, "sha224") == 0)
|
||||||
@@ -114,26 +108,19 @@ alg_bits(dns_secalg_t alg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*%
|
/*%
|
||||||
* Generate a key of size 'keysize' using entropy source 'randomfile',
|
* Generate a key of size 'keysize' and place it in 'key_txtbuffer'
|
||||||
* and place it in 'key_txtbuffer'
|
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
generate_key(isc_mem_t *mctx, const char *randomfile, dns_secalg_t alg,
|
generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize,
|
||||||
int keysize, isc_buffer_t *key_txtbuffer) {
|
isc_buffer_t *key_txtbuffer) {
|
||||||
isc_result_t result = ISC_R_SUCCESS;
|
isc_result_t result = ISC_R_SUCCESS;
|
||||||
isc_entropysource_t *entropy_source = NULL;
|
|
||||||
int open_keyboard = ISC_ENTROPY_KEYBOARDMAYBE;
|
|
||||||
int entropy_flags = 0;
|
|
||||||
isc_entropy_t *ectx = NULL;
|
|
||||||
isc_buffer_t key_rawbuffer;
|
isc_buffer_t key_rawbuffer;
|
||||||
isc_region_t key_rawregion;
|
isc_region_t key_rawregion;
|
||||||
char key_rawsecret[64];
|
char key_rawsecret[64];
|
||||||
dst_key_t *key = NULL;
|
dst_key_t *key = NULL;
|
||||||
|
|
||||||
switch (alg) {
|
switch (alg) {
|
||||||
#ifndef PK11_MD5_DISABLE
|
|
||||||
case DST_ALG_HMACMD5:
|
case DST_ALG_HMACMD5:
|
||||||
#endif
|
|
||||||
case DST_ALG_HMACSHA1:
|
case DST_ALG_HMACSHA1:
|
||||||
case DST_ALG_HMACSHA224:
|
case DST_ALG_HMACSHA224:
|
||||||
case DST_ALG_HMACSHA256:
|
case DST_ALG_HMACSHA256:
|
||||||
@@ -151,31 +138,12 @@ generate_key(isc_mem_t *mctx, const char *randomfile, dns_secalg_t alg,
|
|||||||
fatal("unsupported algorithm %d\n", alg);
|
fatal("unsupported algorithm %d\n", alg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DO("initialize dst library", dst_lib_init(mctx, NULL));
|
||||||
DO("create entropy context", isc_entropy_create(mctx, &ectx));
|
|
||||||
|
|
||||||
#ifdef ISC_PLATFORM_CRYPTORANDOM
|
|
||||||
if (randomfile == NULL) {
|
|
||||||
isc_entropy_usehook(ectx, ISC_TRUE);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if (randomfile != NULL && strcmp(randomfile, "keyboard") == 0) {
|
|
||||||
randomfile = NULL;
|
|
||||||
open_keyboard = ISC_ENTROPY_KEYBOARDYES;
|
|
||||||
}
|
|
||||||
DO("start entropy source", isc_entropy_usebestsource(ectx,
|
|
||||||
&entropy_source,
|
|
||||||
randomfile,
|
|
||||||
open_keyboard));
|
|
||||||
|
|
||||||
entropy_flags = ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY;
|
|
||||||
|
|
||||||
DO("initialize dst library", dst_lib_init(mctx, ectx, entropy_flags));
|
|
||||||
|
|
||||||
DO("generate key", dst_key_generate(dns_rootname, alg,
|
DO("generate key", dst_key_generate(dns_rootname, alg,
|
||||||
keysize, 0, 0,
|
keysize, 0, 0, DNS_KEYPROTO_ANY,
|
||||||
DNS_KEYPROTO_ANY,
|
dns_rdataclass_in, mctx, &key,
|
||||||
dns_rdataclass_in, mctx, &key));
|
NULL));
|
||||||
|
|
||||||
isc_buffer_init(&key_rawbuffer, &key_rawsecret, sizeof(key_rawsecret));
|
isc_buffer_init(&key_rawbuffer, &key_rawsecret, sizeof(key_rawsecret));
|
||||||
|
|
||||||
@@ -186,17 +154,9 @@ generate_key(isc_mem_t *mctx, const char *randomfile, dns_secalg_t alg,
|
|||||||
DO("bsse64 encode secret", isc_base64_totext(&key_rawregion, -1, "",
|
DO("bsse64 encode secret", isc_base64_totext(&key_rawregion, -1, "",
|
||||||
key_txtbuffer));
|
key_txtbuffer));
|
||||||
|
|
||||||
/*
|
|
||||||
* Shut down the entropy source now so the "stop typing" message
|
|
||||||
* does not muck with the output.
|
|
||||||
*/
|
|
||||||
if (entropy_source != NULL)
|
|
||||||
isc_entropy_destroysource(&entropy_source);
|
|
||||||
|
|
||||||
if (key != NULL)
|
if (key != NULL)
|
||||||
dst_key_free(&key);
|
dst_key_free(&key);
|
||||||
|
|
||||||
isc_entropy_detach(&ectx);
|
|
||||||
dst_lib_destroy();
|
dst_lib_destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: keygen.h,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
|
|
||||||
|
|
||||||
#ifndef RNDC_KEYGEN_H
|
#ifndef RNDC_KEYGEN_H
|
||||||
#define RNDC_KEYGEN_H 1
|
#define RNDC_KEYGEN_H 1
|
||||||
@@ -20,8 +19,8 @@
|
|||||||
|
|
||||||
ISC_LANG_BEGINDECLS
|
ISC_LANG_BEGINDECLS
|
||||||
|
|
||||||
void generate_key(isc_mem_t *mctx, const char *randomfile, dns_secalg_t alg,
|
void generate_key(isc_mem_t *mctx, dns_secalg_t alg, int keysize,
|
||||||
int keysize, isc_buffer_t *key_txtbuffer);
|
isc_buffer_t *key_txtbuffer);
|
||||||
|
|
||||||
void write_key_file(const char *keyfile, const char *user,
|
void write_key_file(const char *keyfile, const char *user,
|
||||||
const char *keyname, isc_buffer_t *secret,
|
const char *keyname, isc_buffer_t *secret,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
rndc-confgen \- rndc key generation tool
|
rndc-confgen \- rndc key generation tool
|
||||||
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
||||||
.HP \w'\fBrndc\-confgen\fR\ 'u
|
.HP \w'\fBrndc\-confgen\fR\ 'u
|
||||||
\fBrndc\-confgen\fR [\fB\-a\fR] [\fB\-A\ \fR\fB\fIalgorithm\fR\fR] [\fB\-b\ \fR\fB\fIkeysize\fR\fR] [\fB\-c\ \fR\fB\fIkeyfile\fR\fR] [\fB\-h\fR] [\fB\-k\ \fR\fB\fIkeyname\fR\fR] [\fB\-p\ \fR\fB\fIport\fR\fR] [\fB\-r\ \fR\fB\fIrandomfile\fR\fR] [\fB\-s\ \fR\fB\fIaddress\fR\fR] [\fB\-t\ \fR\fB\fIchrootdir\fR\fR] [\fB\-u\ \fR\fB\fIuser\fR\fR]
|
\fBrndc\-confgen\fR [\fB\-a\fR] [\fB\-A\ \fR\fB\fIalgorithm\fR\fR] [\fB\-b\ \fR\fB\fIkeysize\fR\fR] [\fB\-c\ \fR\fB\fIkeyfile\fR\fR] [\fB\-h\fR] [\fB\-k\ \fR\fB\fIkeyname\fR\fR] [\fB\-p\ \fR\fB\fIport\fR\fR] [\fB\-s\ \fR\fB\fIaddress\fR\fR] [\fB\-t\ \fR\fB\fIchrootdir\fR\fR] [\fB\-u\ \fR\fB\fIuser\fR\fR]
|
||||||
.SH "DESCRIPTION"
|
.SH "DESCRIPTION"
|
||||||
.PP
|
.PP
|
||||||
\fBrndc\-confgen\fR
|
\fBrndc\-confgen\fR
|
||||||
@@ -147,17 +147,6 @@ listens for connections from
|
|||||||
\fBrndc\fR\&. The default is 953\&.
|
\fBrndc\fR\&. The default is 953\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-r \fIrandomfile\fR
|
|
||||||
.RS 4
|
|
||||||
Specifies a source of random data for generating the authorization\&. If the operating system does not provide a
|
|
||||||
/dev/random
|
|
||||||
or equivalent device, the default source of randomness is keyboard input\&.
|
|
||||||
randomdev
|
|
||||||
specifies the name of a character device or file containing random data to be used instead of the default\&. The special value
|
|
||||||
keyboard
|
|
||||||
indicates that keyboard input should be used\&.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
\-s \fIaddress\fR
|
\-s \fIaddress\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Specifies the IP address where
|
Specifies the IP address where
|
||||||
@@ -217,5 +206,5 @@ BIND 9 Administrator Reference Manual\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2001, 2003-2005, 2007, 2009, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2001, 2003-2005, 2007, 2009, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
+12
-14
@@ -22,14 +22,14 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <isc/assertions.h>
|
#include <isc/assertions.h>
|
||||||
#include <isc/base64.h>
|
#include <isc/base64.h>
|
||||||
#include <isc/buffer.h>
|
#include <isc/buffer.h>
|
||||||
#include <isc/commandline.h>
|
#include <isc/commandline.h>
|
||||||
#include <isc/entropy.h>
|
|
||||||
#include <isc/file.h>
|
#include <isc/file.h>
|
||||||
#include <isc/keyboard.h>
|
#include <isc/keyboard.h>
|
||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
static char program[256];
|
static char program[256];
|
||||||
const char *progname;
|
const char *progname;
|
||||||
|
|
||||||
isc_boolean_t verbose = ISC_FALSE;
|
bool verbose = false;
|
||||||
|
|
||||||
const char *keyfile, *keydef;
|
const char *keyfile, *keydef;
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ usage(int status) {
|
|||||||
|
|
||||||
fprintf(stderr, "\
|
fprintf(stderr, "\
|
||||||
Usage:\n\
|
Usage:\n\
|
||||||
%s [-a] [-b bits] [-c keyfile] [-k keyname] [-p port] [-r randomfile] \
|
%s [-a] [-b bits] [-c keyfile] [-k keyname] [-p port] \
|
||||||
[-s addr] [-t chrootdir] [-u user]\n\
|
[-s addr] [-t chrootdir] [-u user]\n\
|
||||||
-a: generate just the key clause and write it to keyfile (%s)\n\
|
-a: generate just the key clause and write it to keyfile (%s)\n\
|
||||||
-A alg: algorithm (default hmac-sha256)\n\
|
-A alg: algorithm (default hmac-sha256)\n\
|
||||||
@@ -78,7 +78,6 @@ Usage:\n\
|
|||||||
-c keyfile: specify an alternate key file (requires -a)\n\
|
-c keyfile: specify an alternate key file (requires -a)\n\
|
||||||
-k keyname: the name as it will be used in named.conf and rndc.conf\n\
|
-k keyname: the name as it will be used in named.conf and rndc.conf\n\
|
||||||
-p port: the port named will listen on and rndc will connect to\n\
|
-p port: the port named will listen on and rndc will connect to\n\
|
||||||
-r randomfile: source of random data (use \"keyboard\" for key timing)\n\
|
|
||||||
-s addr: the address to which rndc should connect\n\
|
-s addr: the address to which rndc should connect\n\
|
||||||
-t chrootdir: write a keyfile in chrootdir as well (requires -a)\n\
|
-t chrootdir: write a keyfile in chrootdir as well (requires -a)\n\
|
||||||
-u user: set the keyfile owner to \"user\" (requires -a)\n",
|
-u user: set the keyfile owner to \"user\" (requires -a)\n",
|
||||||
@@ -89,13 +88,12 @@ Usage:\n\
|
|||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char **argv) {
|
main(int argc, char **argv) {
|
||||||
isc_boolean_t show_final_mem = ISC_FALSE;
|
bool show_final_mem = false;
|
||||||
isc_buffer_t key_txtbuffer;
|
isc_buffer_t key_txtbuffer;
|
||||||
char key_txtsecret[256];
|
char key_txtsecret[256];
|
||||||
isc_mem_t *mctx = NULL;
|
isc_mem_t *mctx = NULL;
|
||||||
isc_result_t result = ISC_R_SUCCESS;
|
isc_result_t result = ISC_R_SUCCESS;
|
||||||
const char *keyname = NULL;
|
const char *keyname = NULL;
|
||||||
const char *randomfile = NULL;
|
|
||||||
const char *serveraddr = NULL;
|
const char *serveraddr = NULL;
|
||||||
dns_secalg_t alg;
|
dns_secalg_t alg;
|
||||||
const char *algname;
|
const char *algname;
|
||||||
@@ -107,7 +105,7 @@ main(int argc, char **argv) {
|
|||||||
struct in6_addr addr6_dummy;
|
struct in6_addr addr6_dummy;
|
||||||
char *chrootdir = NULL;
|
char *chrootdir = NULL;
|
||||||
char *user = NULL;
|
char *user = NULL;
|
||||||
isc_boolean_t keyonly = ISC_FALSE;
|
bool keyonly = false;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
keydef = keyfile = RNDC_KEYFILE;
|
keydef = keyfile = RNDC_KEYFILE;
|
||||||
@@ -122,14 +120,14 @@ main(int argc, char **argv) {
|
|||||||
serveraddr = DEFAULT_SERVER;
|
serveraddr = DEFAULT_SERVER;
|
||||||
port = DEFAULT_PORT;
|
port = DEFAULT_PORT;
|
||||||
|
|
||||||
isc_commandline_errprint = ISC_FALSE;
|
isc_commandline_errprint = false;
|
||||||
|
|
||||||
while ((ch = isc_commandline_parse(argc, argv,
|
while ((ch = isc_commandline_parse(argc, argv,
|
||||||
"aA:b:c:hk:Mmp:r:s:t:u:Vy")) != -1)
|
"aA:b:c:hk:Mmp:r:s:t:u:Vy")) != -1)
|
||||||
{
|
{
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 'a':
|
case 'a':
|
||||||
keyonly = ISC_TRUE;
|
keyonly = true;
|
||||||
break;
|
break;
|
||||||
case 'A':
|
case 'A':
|
||||||
algname = isc_commandline_argument;
|
algname = isc_commandline_argument;
|
||||||
@@ -156,7 +154,7 @@ main(int argc, char **argv) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'm':
|
case 'm':
|
||||||
show_final_mem = ISC_TRUE;
|
show_final_mem = true;
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
port = strtol(isc_commandline_argument, &p, 10);
|
port = strtol(isc_commandline_argument, &p, 10);
|
||||||
@@ -165,7 +163,7 @@ main(int argc, char **argv) {
|
|||||||
isc_commandline_argument);
|
isc_commandline_argument);
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
randomfile = isc_commandline_argument;
|
fatal("The -r option has been deprecated.");
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
serveraddr = isc_commandline_argument;
|
serveraddr = isc_commandline_argument;
|
||||||
@@ -180,7 +178,7 @@ main(int argc, char **argv) {
|
|||||||
user = isc_commandline_argument;
|
user = isc_commandline_argument;
|
||||||
break;
|
break;
|
||||||
case 'V':
|
case 'V':
|
||||||
verbose = ISC_TRUE;
|
verbose = true;
|
||||||
break;
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
if (isc_commandline_option != '?') {
|
if (isc_commandline_option != '?') {
|
||||||
@@ -217,7 +215,7 @@ main(int argc, char **argv) {
|
|||||||
DO("create memory context", isc_mem_create(0, 0, &mctx));
|
DO("create memory context", isc_mem_create(0, 0, &mctx));
|
||||||
isc_buffer_init(&key_txtbuffer, &key_txtsecret, sizeof(key_txtsecret));
|
isc_buffer_init(&key_txtbuffer, &key_txtsecret, sizeof(key_txtsecret));
|
||||||
|
|
||||||
generate_key(mctx, randomfile, alg, keysize, &key_txtbuffer);
|
generate_key(mctx, alg, keysize, &key_txtbuffer);
|
||||||
|
|
||||||
if (keyonly) {
|
if (keyonly) {
|
||||||
write_key_file(keyfile, chrootdir == NULL ? user : NULL,
|
write_key_file(keyfile, chrootdir == NULL ? user : NULL,
|
||||||
|
|||||||
@@ -58,7 +58,6 @@
|
|||||||
<arg choice="opt" rep="norepeat"><option>-h</option></arg>
|
<arg choice="opt" rep="norepeat"><option>-h</option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-k <replaceable class="parameter">keyname</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-k <replaceable class="parameter">keyname</replaceable></option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-p <replaceable class="parameter">port</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-p <replaceable class="parameter">port</replaceable></option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">randomfile</replaceable></option></arg>
|
|
||||||
<arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">address</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">address</replaceable></option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">chrootdir</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">chrootdir</replaceable></option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-u <replaceable class="parameter">user</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-u <replaceable class="parameter">user</replaceable></option></arg>
|
||||||
@@ -191,24 +190,6 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>-r <replaceable class="parameter">randomfile</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Specifies a source of random data for generating the
|
|
||||||
authorization. If the operating
|
|
||||||
system does not provide a <filename>/dev/random</filename>
|
|
||||||
or equivalent device, the default source of randomness
|
|
||||||
is keyboard input. <filename>randomdev</filename>
|
|
||||||
specifies
|
|
||||||
the name of a character device or file containing random
|
|
||||||
data to be used instead of the default. The special value
|
|
||||||
<filename>keyboard</filename> indicates that keyboard
|
|
||||||
input should be used.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-s <replaceable class="parameter">address</replaceable></term>
|
<term>-s <replaceable class="parameter">address</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2001, 2003-2005, 2007, 2009, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -40,7 +40,6 @@
|
|||||||
[<code class="option">-h</code>]
|
[<code class="option">-h</code>]
|
||||||
[<code class="option">-k <em class="replaceable"><code>keyname</code></em></code>]
|
[<code class="option">-k <em class="replaceable"><code>keyname</code></em></code>]
|
||||||
[<code class="option">-p <em class="replaceable"><code>port</code></em></code>]
|
[<code class="option">-p <em class="replaceable"><code>port</code></em></code>]
|
||||||
[<code class="option">-r <em class="replaceable"><code>randomfile</code></em></code>]
|
|
||||||
[<code class="option">-s <em class="replaceable"><code>address</code></em></code>]
|
[<code class="option">-s <em class="replaceable"><code>address</code></em></code>]
|
||||||
[<code class="option">-t <em class="replaceable"><code>chrootdir</code></em></code>]
|
[<code class="option">-t <em class="replaceable"><code>chrootdir</code></em></code>]
|
||||||
[<code class="option">-u <em class="replaceable"><code>user</code></em></code>]
|
[<code class="option">-u <em class="replaceable"><code>user</code></em></code>]
|
||||||
@@ -154,21 +153,6 @@
|
|||||||
The default is 953.
|
The default is 953.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term">-r <em class="replaceable"><code>randomfile</code></em></span></dt>
|
|
||||||
<dd>
|
|
||||||
<p>
|
|
||||||
Specifies a source of random data for generating the
|
|
||||||
authorization. If the operating
|
|
||||||
system does not provide a <code class="filename">/dev/random</code>
|
|
||||||
or equivalent device, the default source of randomness
|
|
||||||
is keyboard input. <code class="filename">randomdev</code>
|
|
||||||
specifies
|
|
||||||
the name of a character device or file containing random
|
|
||||||
data to be used instead of the default. The special value
|
|
||||||
<code class="filename">keyboard</code> indicates that keyboard
|
|
||||||
input should be used.
|
|
||||||
</p>
|
|
||||||
</dd>
|
|
||||||
<dt><span class="term">-s <em class="replaceable"><code>address</code></em></span></dt>
|
<dt><span class="term">-s <em class="replaceable"><code>address</code></em></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -7,8 +7,6 @@
|
|||||||
# See the COPYRIGHT file distributed with this work for additional
|
# See the COPYRIGHT file distributed with this work for additional
|
||||||
# information regarding copyright ownership.
|
# information regarding copyright ownership.
|
||||||
|
|
||||||
# $Id: Makefile.in,v 1.3 2009/06/11 23:47:55 tbox Exp $
|
|
||||||
|
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: os.c,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
|
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
|
|||||||
+2
-3
@@ -9,22 +9,21 @@
|
|||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: util.c,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
|
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <isc/boolean.h>
|
|
||||||
#include <isc/print.h>
|
#include <isc/print.h>
|
||||||
|
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
extern isc_boolean_t verbose;
|
extern bool verbose;
|
||||||
extern const char *progname;
|
extern const char *progname;
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: util.h,v 1.4 2009/09/29 15:06:05 fdupont Exp $ */
|
|
||||||
|
|
||||||
#ifndef RNDC_UTIL_H
|
#ifndef RNDC_UTIL_H
|
||||||
#define RNDC_UTIL_H 1
|
#define RNDC_UTIL_H 1
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: os.c,v 1.3 2009/06/11 23:47:55 tbox Exp $ */
|
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
|||||||
@@ -16,16 +16,16 @@ VERSION=@BIND9_VERSION@
|
|||||||
@BIND9_MAKE_INCLUDES@
|
@BIND9_MAKE_INCLUDES@
|
||||||
|
|
||||||
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} ${ISC_INCLUDES} \
|
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} ${ISC_INCLUDES} \
|
||||||
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @DST_OPENSSL_INC@
|
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @OPENSSL_INCLUDES@
|
||||||
|
|
||||||
CDEFINES = @CRYPTO@ -DVERSION=\"${VERSION}\" \
|
CDEFINES = -DVERSION=\"${VERSION}\" \
|
||||||
-DSYSCONFDIR=\"${sysconfdir}\"
|
-DSYSCONFDIR=\"${sysconfdir}\"
|
||||||
CWARNINGS =
|
CWARNINGS =
|
||||||
|
|
||||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
|
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||||
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||||
IRSLIBS = ../../lib/irs/libirs.@A@
|
IRSLIBS = ../../lib/irs/libirs.@A@
|
||||||
|
|
||||||
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -437,5 +437,5 @@ RFC5155\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
+97
-109
@@ -24,7 +24,9 @@
|
|||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <inttypes.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@@ -94,40 +96,40 @@ static const char *port = "53";
|
|||||||
static isc_sockaddr_t *srcaddr4 = NULL, *srcaddr6 = NULL;
|
static isc_sockaddr_t *srcaddr4 = NULL, *srcaddr6 = NULL;
|
||||||
static isc_sockaddr_t a4, a6;
|
static isc_sockaddr_t a4, a6;
|
||||||
static char *curqname = NULL, *qname = NULL;
|
static char *curqname = NULL, *qname = NULL;
|
||||||
static isc_boolean_t classset = ISC_FALSE;
|
static bool classset = false;
|
||||||
static dns_rdatatype_t qtype = dns_rdatatype_none;
|
static dns_rdatatype_t qtype = dns_rdatatype_none;
|
||||||
static isc_boolean_t typeset = ISC_FALSE;
|
static bool typeset = false;
|
||||||
|
|
||||||
static unsigned int styleflags = 0;
|
static unsigned int styleflags = 0;
|
||||||
static isc_uint32_t splitwidth = 0xffffffff;
|
static uint32_t splitwidth = 0xffffffff;
|
||||||
static isc_boolean_t
|
static bool
|
||||||
showcomments = ISC_TRUE,
|
showcomments = true,
|
||||||
showdnssec = ISC_TRUE,
|
showdnssec = true,
|
||||||
showtrust = ISC_TRUE,
|
showtrust = true,
|
||||||
rrcomments = ISC_TRUE,
|
rrcomments = true,
|
||||||
noclass = ISC_FALSE,
|
noclass = false,
|
||||||
nocrypto = ISC_FALSE,
|
nocrypto = false,
|
||||||
nottl = ISC_FALSE,
|
nottl = false,
|
||||||
multiline = ISC_FALSE,
|
multiline = false,
|
||||||
short_form = ISC_FALSE,
|
short_form = false,
|
||||||
print_unknown_format = ISC_FALSE;
|
print_unknown_format = false;
|
||||||
|
|
||||||
static isc_boolean_t
|
static bool
|
||||||
resolve_trace = ISC_FALSE,
|
resolve_trace = false,
|
||||||
validator_trace = ISC_FALSE,
|
validator_trace = false,
|
||||||
message_trace = ISC_FALSE;
|
message_trace = false;
|
||||||
|
|
||||||
static isc_boolean_t
|
static bool
|
||||||
use_ipv4 = ISC_TRUE,
|
use_ipv4 = true,
|
||||||
use_ipv6 = ISC_TRUE;
|
use_ipv6 = true;
|
||||||
|
|
||||||
static isc_boolean_t
|
static bool
|
||||||
cdflag = ISC_FALSE,
|
cdflag = false,
|
||||||
no_sigs = ISC_FALSE,
|
no_sigs = false,
|
||||||
root_validation = ISC_TRUE,
|
root_validation = true,
|
||||||
dlv_validation = ISC_TRUE;
|
dlv_validation = true;
|
||||||
|
|
||||||
static isc_boolean_t use_tcp = ISC_FALSE;
|
static bool use_tcp = false;
|
||||||
|
|
||||||
static char *anchorfile = NULL;
|
static char *anchorfile = NULL;
|
||||||
static char *trust_anchor = NULL;
|
static char *trust_anchor = NULL;
|
||||||
@@ -144,10 +146,10 @@ static char anchortext[] = MANAGED_KEYS;
|
|||||||
* Static function prototypes
|
* Static function prototypes
|
||||||
*/
|
*/
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
get_reverse(char *reverse, size_t len, char *value, isc_boolean_t strict);
|
get_reverse(char *reverse, size_t len, char *value, bool strict);
|
||||||
|
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
parse_uint(isc_uint32_t *uip, const char *value, isc_uint32_t max,
|
parse_uint(uint32_t *uip, const char *value, uint32_t max,
|
||||||
const char *desc);
|
const char *desc);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -408,7 +410,7 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner,
|
|||||||
{
|
{
|
||||||
isc_result_t result = ISC_R_SUCCESS;
|
isc_result_t result = ISC_R_SUCCESS;
|
||||||
static dns_trust_t trust;
|
static dns_trust_t trust;
|
||||||
static isc_boolean_t first = ISC_TRUE;
|
static bool first = true;
|
||||||
isc_buffer_t target;
|
isc_buffer_t target;
|
||||||
isc_region_t r;
|
isc_region_t r;
|
||||||
char *t = NULL;
|
char *t = NULL;
|
||||||
@@ -430,7 +432,7 @@ printdata(dns_rdataset_t *rdataset, dns_name_t *owner,
|
|||||||
putchar('\n');
|
putchar('\n');
|
||||||
print_status(rdataset);
|
print_status(rdataset);
|
||||||
trust = rdataset->trust;
|
trust = rdataset->trust;
|
||||||
first = ISC_FALSE;
|
first = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
@@ -521,17 +523,17 @@ setup_style(dns_master_style_t **stylep) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (multiline || (nottl && noclass))
|
if (multiline || (nottl && noclass))
|
||||||
result = dns_master_stylecreate2(&style, styleflags,
|
result = dns_master_stylecreate(&style, styleflags,
|
||||||
24, 24, 24, 32, 80, 8,
|
24, 24, 24, 32, 80, 8,
|
||||||
splitwidth, mctx);
|
splitwidth, mctx);
|
||||||
else if (nottl || noclass)
|
else if (nottl || noclass)
|
||||||
result = dns_master_stylecreate2(&style, styleflags,
|
result = dns_master_stylecreate(&style, styleflags,
|
||||||
24, 24, 32, 40, 80, 8,
|
24, 24, 32, 40, 80, 8,
|
||||||
splitwidth, mctx);
|
splitwidth, mctx);
|
||||||
else
|
else
|
||||||
result = dns_master_stylecreate2(&style, styleflags,
|
result = dns_master_stylecreate(&style, styleflags,
|
||||||
24, 32, 40, 48, 80, 8,
|
24, 32, 40, 48, 80, 8,
|
||||||
splitwidth, mctx);
|
splitwidth, mctx);
|
||||||
|
|
||||||
if (result == ISC_R_SUCCESS)
|
if (result == ISC_R_SUCCESS)
|
||||||
*stylep = style;
|
*stylep = style;
|
||||||
@@ -550,8 +552,7 @@ convert_name(dns_fixedname_t *fn, dns_name_t **name, const char *text) {
|
|||||||
|
|
||||||
isc_buffer_constinit(&b, text, len);
|
isc_buffer_constinit(&b, text, len);
|
||||||
isc_buffer_add(&b, len);
|
isc_buffer_add(&b, len);
|
||||||
dns_fixedname_init(fn);
|
n = dns_fixedname_initname(fn);
|
||||||
n = dns_fixedname_name(fn);
|
|
||||||
|
|
||||||
result = dns_name_fromtext(n, &b, dns_rootname, 0, NULL);
|
result = dns_name_fromtext(n, &b, dns_rootname, 0, NULL);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
@@ -567,7 +568,7 @@ convert_name(dns_fixedname_t *fn, dns_name_t **name, const char *text) {
|
|||||||
static isc_result_t
|
static isc_result_t
|
||||||
key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
|
key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
|
||||||
dns_rdata_dnskey_t keystruct;
|
dns_rdata_dnskey_t keystruct;
|
||||||
isc_uint32_t flags, proto, alg;
|
uint32_t flags, proto, alg;
|
||||||
const char *keystr, *keynamestr;
|
const char *keystr, *keynamestr;
|
||||||
unsigned char keydata[4096];
|
unsigned char keydata[4096];
|
||||||
isc_buffer_t keydatabuf;
|
isc_buffer_t keydatabuf;
|
||||||
@@ -577,7 +578,7 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
|
|||||||
dns_fixedname_t fkeyname;
|
dns_fixedname_t fkeyname;
|
||||||
dns_name_t *keyname;
|
dns_name_t *keyname;
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
isc_boolean_t match_root = ISC_FALSE, match_dlv = ISC_FALSE;
|
bool match_root = false, match_dlv = false;
|
||||||
|
|
||||||
keynamestr = cfg_obj_asstring(cfg_tuple_get(key, "name"));
|
keynamestr = cfg_obj_asstring(cfg_tuple_get(key, "name"));
|
||||||
CHECK(convert_name(&fkeyname, &keyname, keynamestr));
|
CHECK(convert_name(&fkeyname, &keyname, keynamestr));
|
||||||
@@ -622,9 +623,9 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client) {
|
|||||||
if (alg > 0xff)
|
if (alg > 0xff)
|
||||||
CHECK(ISC_R_RANGE);
|
CHECK(ISC_R_RANGE);
|
||||||
|
|
||||||
keystruct.flags = (isc_uint16_t)flags;
|
keystruct.flags = (uint16_t)flags;
|
||||||
keystruct.protocol = (isc_uint8_t)proto;
|
keystruct.protocol = (uint8_t)proto;
|
||||||
keystruct.algorithm = (isc_uint8_t)alg;
|
keystruct.algorithm = (uint8_t)alg;
|
||||||
|
|
||||||
isc_buffer_init(&keydatabuf, keydata, sizeof(keydata));
|
isc_buffer_init(&keydatabuf, keydata, sizeof(keydata));
|
||||||
isc_buffer_init(&rrdatabuf, rrdata, sizeof(rrdata));
|
isc_buffer_init(&rrdatabuf, rrdata, sizeof(rrdata));
|
||||||
@@ -779,7 +780,7 @@ addserver(dns_client_t *client) {
|
|||||||
struct in6_addr in6;
|
struct in6_addr in6;
|
||||||
isc_sockaddr_t *sa;
|
isc_sockaddr_t *sa;
|
||||||
isc_sockaddrlist_t servers;
|
isc_sockaddrlist_t servers;
|
||||||
isc_uint32_t destport;
|
uint32_t destport;
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
dns_name_t *name = NULL;
|
dns_name_t *name = NULL;
|
||||||
|
|
||||||
@@ -870,7 +871,7 @@ findserver(dns_client_t *client) {
|
|||||||
irs_resconf_t *resconf = NULL;
|
irs_resconf_t *resconf = NULL;
|
||||||
isc_sockaddrlist_t *nameservers;
|
isc_sockaddrlist_t *nameservers;
|
||||||
isc_sockaddr_t *sa, *next;
|
isc_sockaddr_t *sa, *next;
|
||||||
isc_uint32_t destport;
|
uint32_t destport;
|
||||||
|
|
||||||
result = parse_uint(&destport, port, 0xffff, "port");
|
result = parse_uint(&destport, port, 0xffff, "port");
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
@@ -944,22 +945,10 @@ cleanup:
|
|||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
|
||||||
next_token(char **stringp, const char *delim) {
|
|
||||||
char *res;
|
|
||||||
|
|
||||||
do {
|
|
||||||
res = strsep(stringp, delim);
|
|
||||||
if (res == NULL)
|
|
||||||
break;
|
|
||||||
} while (*res == '\0');
|
|
||||||
return (res);
|
|
||||||
}
|
|
||||||
|
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
parse_uint(isc_uint32_t *uip, const char *value, isc_uint32_t max,
|
parse_uint(uint32_t *uip, const char *value, uint32_t max,
|
||||||
const char *desc) {
|
const char *desc) {
|
||||||
isc_uint32_t n;
|
uint32_t n;
|
||||||
isc_result_t result = isc_parse_uint32(&n, value, 10);
|
isc_result_t result = isc_parse_uint32(&n, value, 10);
|
||||||
if (result == ISC_R_SUCCESS && n > max)
|
if (result == ISC_R_SUCCESS && n > max)
|
||||||
result = ISC_R_RANGE;
|
result = ISC_R_RANGE;
|
||||||
@@ -975,23 +964,23 @@ parse_uint(isc_uint32_t *uip, const char *value, isc_uint32_t max,
|
|||||||
static void
|
static void
|
||||||
plus_option(char *option) {
|
plus_option(char *option) {
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
char option_store[256];
|
char *cmd, *value, *last = NULL;
|
||||||
char *cmd, *value, *ptr;
|
bool state = true;
|
||||||
isc_boolean_t state = ISC_TRUE;
|
|
||||||
|
|
||||||
strlcpy(option_store, option, sizeof(option_store));
|
INSIST(option != NULL);
|
||||||
ptr = option_store;
|
|
||||||
cmd = next_token(&ptr,"=");
|
cmd = strtok_r(option, "=", &last);
|
||||||
if (cmd == NULL) {
|
if (cmd == NULL) {
|
||||||
printf(";; Invalid option %s\n", option_store);
|
printf(";; Invalid option %s\n", option);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
value = ptr;
|
|
||||||
if (strncasecmp(cmd, "no", 2)==0) {
|
if (strncasecmp(cmd, "no", 2)==0) {
|
||||||
cmd += 2;
|
cmd += 2;
|
||||||
state = ISC_FALSE;
|
state = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
value = strtok_r(NULL, "\0", &last);
|
||||||
|
|
||||||
#define FULLCHECK(A) \
|
#define FULLCHECK(A) \
|
||||||
do { \
|
do { \
|
||||||
size_t _l = strlen(cmd); \
|
size_t _l = strlen(cmd); \
|
||||||
@@ -1014,7 +1003,7 @@ plus_option(char *option) {
|
|||||||
break;
|
break;
|
||||||
case 'l': /* class */
|
case 'l': /* class */
|
||||||
FULLCHECK("class");
|
FULLCHECK("class");
|
||||||
noclass = ISC_TF(!state);
|
noclass = !state;
|
||||||
break;
|
break;
|
||||||
case 'o': /* comments */
|
case 'o': /* comments */
|
||||||
FULLCHECK("comments");
|
FULLCHECK("comments");
|
||||||
@@ -1022,7 +1011,7 @@ plus_option(char *option) {
|
|||||||
break;
|
break;
|
||||||
case 'r': /* crypto */
|
case 'r': /* crypto */
|
||||||
FULLCHECK("crypto");
|
FULLCHECK("crypto");
|
||||||
nocrypto = ISC_TF(!state);
|
nocrypto = !state;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
goto invalid_option;
|
goto invalid_option;
|
||||||
@@ -1095,10 +1084,10 @@ plus_option(char *option) {
|
|||||||
FULLCHECK("short");
|
FULLCHECK("short");
|
||||||
short_form = state;
|
short_form = state;
|
||||||
if (short_form) {
|
if (short_form) {
|
||||||
multiline = ISC_FALSE;
|
multiline = false;
|
||||||
showcomments = ISC_FALSE;
|
showcomments = false;
|
||||||
showtrust = ISC_FALSE;
|
showtrust = false;
|
||||||
showdnssec = ISC_FALSE;
|
showdnssec = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'p': /* split */
|
case 'p': /* split */
|
||||||
@@ -1150,7 +1139,7 @@ plus_option(char *option) {
|
|||||||
break;
|
break;
|
||||||
case 't': /* ttl */
|
case 't': /* ttl */
|
||||||
FULLCHECK("ttl");
|
FULLCHECK("ttl");
|
||||||
nottl = ISC_TF(!state);
|
nottl = !state;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
goto invalid_option;
|
goto invalid_option;
|
||||||
@@ -1178,11 +1167,11 @@ plus_option(char *option) {
|
|||||||
* options: "46a:b:c:d:himp:q:t:vx:";
|
* options: "46a:b:c:d:himp:q:t:vx:";
|
||||||
*/
|
*/
|
||||||
static const char *single_dash_opts = "46himv";
|
static const char *single_dash_opts = "46himv";
|
||||||
static isc_boolean_t
|
static bool
|
||||||
dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
|
dash_option(char *option, char *next, bool *open_type_class) {
|
||||||
char opt, *value;
|
char opt, *value;
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
isc_boolean_t value_from_next;
|
bool value_from_next;
|
||||||
isc_textregion_t tr;
|
isc_textregion_t tr;
|
||||||
dns_rdatatype_t rdtype;
|
dns_rdatatype_t rdtype;
|
||||||
dns_rdataclass_t rdclass;
|
dns_rdataclass_t rdclass;
|
||||||
@@ -1190,7 +1179,7 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
|
|||||||
struct in_addr in4;
|
struct in_addr in4;
|
||||||
struct in6_addr in6;
|
struct in6_addr in6;
|
||||||
in_port_t srcport;
|
in_port_t srcport;
|
||||||
isc_uint32_t num;
|
uint32_t num;
|
||||||
char *hash;
|
char *hash;
|
||||||
|
|
||||||
while (strpbrk(option, single_dash_opts) == &option[0]) {
|
while (strpbrk(option, single_dash_opts) == &option[0]) {
|
||||||
@@ -1206,7 +1195,7 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
|
|||||||
fatal("IPv4 networking not available");
|
fatal("IPv4 networking not available");
|
||||||
if (use_ipv6) {
|
if (use_ipv6) {
|
||||||
isc_net_disableipv6();
|
isc_net_disableipv6();
|
||||||
use_ipv6 = ISC_FALSE;
|
use_ipv6 = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case '6':
|
case '6':
|
||||||
@@ -1214,7 +1203,7 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
|
|||||||
fatal("IPv6 networking not available");
|
fatal("IPv6 networking not available");
|
||||||
if (use_ipv4) {
|
if (use_ipv4) {
|
||||||
isc_net_disableipv4();
|
isc_net_disableipv4();
|
||||||
use_ipv4 = ISC_FALSE;
|
use_ipv4 = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
@@ -1222,9 +1211,9 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
|
|||||||
exit(0);
|
exit(0);
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
case 'i':
|
case 'i':
|
||||||
no_sigs = ISC_TRUE;
|
no_sigs = true;
|
||||||
dlv_validation = ISC_FALSE;
|
dlv_validation = false;
|
||||||
root_validation = ISC_FALSE;
|
root_validation = false;
|
||||||
break;
|
break;
|
||||||
case 'm':
|
case 'm':
|
||||||
/* handled in preparse_args() */
|
/* handled in preparse_args() */
|
||||||
@@ -1239,14 +1228,14 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
|
|||||||
if (strlen(option) > 1U)
|
if (strlen(option) > 1U)
|
||||||
option = &option[1];
|
option = &option[1];
|
||||||
else
|
else
|
||||||
return (ISC_FALSE);
|
return (false);
|
||||||
}
|
}
|
||||||
opt = option[0];
|
opt = option[0];
|
||||||
if (strlen(option) > 1U) {
|
if (strlen(option) > 1U) {
|
||||||
value_from_next = ISC_FALSE;
|
value_from_next = false;
|
||||||
value = &option[1];
|
value = &option[1];
|
||||||
} else {
|
} else {
|
||||||
value_from_next = ISC_TRUE;
|
value_from_next = true;
|
||||||
value = next;
|
value = next;
|
||||||
}
|
}
|
||||||
if (value == NULL)
|
if (value == NULL)
|
||||||
@@ -1292,13 +1281,13 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
|
|||||||
if (classset)
|
if (classset)
|
||||||
warn("extra query class");
|
warn("extra query class");
|
||||||
|
|
||||||
*open_type_class = ISC_FALSE;
|
*open_type_class = false;
|
||||||
tr.base = value;
|
tr.base = value;
|
||||||
tr.length = strlen(value);
|
tr.length = strlen(value);
|
||||||
result = dns_rdataclass_fromtext(&rdclass,
|
result = dns_rdataclass_fromtext(&rdclass,
|
||||||
(isc_textregion_t *)&tr);
|
(isc_textregion_t *)&tr);
|
||||||
if (result == ISC_R_SUCCESS)
|
if (result == ISC_R_SUCCESS)
|
||||||
classset = ISC_TRUE;
|
classset = true;
|
||||||
else if (rdclass != dns_rdataclass_in)
|
else if (rdclass != dns_rdataclass_in)
|
||||||
warn("ignoring non-IN query class");
|
warn("ignoring non-IN query class");
|
||||||
else
|
else
|
||||||
@@ -1323,7 +1312,7 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
|
|||||||
fatal("out of memory");
|
fatal("out of memory");
|
||||||
return (value_from_next);
|
return (value_from_next);
|
||||||
case 't':
|
case 't':
|
||||||
*open_type_class = ISC_FALSE;
|
*open_type_class = false;
|
||||||
tr.base = value;
|
tr.base = value;
|
||||||
tr.length = strlen(value);
|
tr.length = strlen(value);
|
||||||
result = dns_rdatatype_fromtext(&rdtype,
|
result = dns_rdatatype_fromtext(&rdtype,
|
||||||
@@ -1335,13 +1324,13 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
|
|||||||
rdtype == dns_rdatatype_axfr)
|
rdtype == dns_rdatatype_axfr)
|
||||||
fatal("Transfer not supported");
|
fatal("Transfer not supported");
|
||||||
qtype = rdtype;
|
qtype = rdtype;
|
||||||
typeset = ISC_TRUE;
|
typeset = true;
|
||||||
} else
|
} else
|
||||||
warn("ignoring invalid type");
|
warn("ignoring invalid type");
|
||||||
return (value_from_next);
|
return (value_from_next);
|
||||||
case 'x':
|
case 'x':
|
||||||
result = get_reverse(textname, sizeof(textname), value,
|
result = get_reverse(textname, sizeof(textname), value,
|
||||||
ISC_FALSE);
|
false);
|
||||||
if (result == ISC_R_SUCCESS) {
|
if (result == ISC_R_SUCCESS) {
|
||||||
if (curqname != NULL) {
|
if (curqname != NULL) {
|
||||||
isc_mem_free(mctx, curqname);
|
isc_mem_free(mctx, curqname);
|
||||||
@@ -1353,7 +1342,7 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
|
|||||||
if (typeset)
|
if (typeset)
|
||||||
warn("extra query type");
|
warn("extra query type");
|
||||||
qtype = dns_rdatatype_ptr;
|
qtype = dns_rdatatype_ptr;
|
||||||
typeset = ISC_TRUE;
|
typeset = true;
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr, "Invalid IP address %s\n", value);
|
fprintf(stderr, "Invalid IP address %s\n", value);
|
||||||
exit(1);
|
exit(1);
|
||||||
@@ -1365,7 +1354,7 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
|
|||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
return (ISC_FALSE);
|
return (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1374,7 +1363,7 @@ dash_option(char *option, char *next, isc_boolean_t *open_type_class) {
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
preparse_args(int argc, char **argv) {
|
preparse_args(int argc, char **argv) {
|
||||||
isc_boolean_t ipv4only = ISC_FALSE, ipv6only = ISC_FALSE;
|
bool ipv4only = false, ipv6only = false;
|
||||||
char *option;
|
char *option;
|
||||||
|
|
||||||
for (argc--, argv++; argc > 0; argc--, argv++) {
|
for (argc--, argv++; argc > 0; argc--, argv++) {
|
||||||
@@ -1391,13 +1380,13 @@ preparse_args(int argc, char **argv) {
|
|||||||
if (ipv6only) {
|
if (ipv6only) {
|
||||||
fatal("only one of -4 and -6 allowed");
|
fatal("only one of -4 and -6 allowed");
|
||||||
}
|
}
|
||||||
ipv4only = ISC_TRUE;
|
ipv4only = true;
|
||||||
break;
|
break;
|
||||||
case '6':
|
case '6':
|
||||||
if (ipv4only) {
|
if (ipv4only) {
|
||||||
fatal("only one of -4 and -6 allowed");
|
fatal("only one of -4 and -6 allowed");
|
||||||
}
|
}
|
||||||
ipv6only = ISC_TRUE;
|
ipv6only = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
option = &option[1];
|
option = &option[1];
|
||||||
@@ -1417,7 +1406,7 @@ parse_args(int argc, char **argv) {
|
|||||||
isc_textregion_t tr;
|
isc_textregion_t tr;
|
||||||
dns_rdatatype_t rdtype;
|
dns_rdatatype_t rdtype;
|
||||||
dns_rdataclass_t rdclass;
|
dns_rdataclass_t rdclass;
|
||||||
isc_boolean_t open_type_class = ISC_TRUE;
|
bool open_type_class = true;
|
||||||
|
|
||||||
for (; argc > 0; argc--, argv++) {
|
for (; argc > 0; argc--, argv++) {
|
||||||
if (argv[0][0] == '@') {
|
if (argv[0][0] == '@') {
|
||||||
@@ -1456,7 +1445,7 @@ parse_args(int argc, char **argv) {
|
|||||||
rdtype == dns_rdatatype_axfr)
|
rdtype == dns_rdatatype_axfr)
|
||||||
fatal("Transfer not supported");
|
fatal("Transfer not supported");
|
||||||
qtype = rdtype;
|
qtype = rdtype;
|
||||||
typeset = ISC_TRUE;
|
typeset = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
result = dns_rdataclass_fromtext(&rdclass,
|
result = dns_rdataclass_fromtext(&rdclass,
|
||||||
@@ -1525,7 +1514,7 @@ reverse_octets(const char *in, char **p, char *end) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
get_reverse(char *reverse, size_t len, char *value, isc_boolean_t strict) {
|
get_reverse(char *reverse, size_t len, char *value, bool strict) {
|
||||||
int r;
|
int r;
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
isc_netaddr_t addr;
|
isc_netaddr_t addr;
|
||||||
@@ -1538,9 +1527,8 @@ get_reverse(char *reverse, size_t len, char *value, isc_boolean_t strict) {
|
|||||||
dns_name_t *name;
|
dns_name_t *name;
|
||||||
unsigned int options = 0;
|
unsigned int options = 0;
|
||||||
|
|
||||||
dns_fixedname_init(&fname);
|
name = dns_fixedname_initname(&fname);
|
||||||
name = dns_fixedname_name(&fname);
|
result = dns_byaddr_createptrname(&addr, options, name);
|
||||||
result = dns_byaddr_createptrname2(&addr, options, name);
|
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
return (result);
|
return (result);
|
||||||
dns_name_format(name, reverse, (unsigned int)len);
|
dns_name_format(name, reverse, (unsigned int)len);
|
||||||
@@ -1624,8 +1612,8 @@ main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
/* Create client */
|
/* Create client */
|
||||||
clopt = DNS_CLIENTCREATEOPT_USECACHE;
|
clopt = DNS_CLIENTCREATEOPT_USECACHE;
|
||||||
result = dns_client_createx2(mctx, actx, taskmgr, socketmgr, timermgr,
|
result = dns_client_createx(mctx, actx, taskmgr, socketmgr, timermgr,
|
||||||
clopt, &client, srcaddr4, srcaddr6);
|
clopt, &client, srcaddr4, srcaddr6);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
delv_log(ISC_LOG_ERROR, "dns_client_create: %s",
|
delv_log(ISC_LOG_ERROR, "dns_client_create: %s",
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
|
|||||||
+6
-4
@@ -19,16 +19,16 @@ READLINE_LIB = @READLINE_LIB@
|
|||||||
|
|
||||||
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} \
|
CINCLUDES = -I${srcdir}/include ${DNS_INCLUDES} \
|
||||||
${BIND9_INCLUDES} ${ISC_INCLUDES} \
|
${BIND9_INCLUDES} ${ISC_INCLUDES} \
|
||||||
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ @DST_OPENSSL_INC@
|
${IRS_INCLUDES} ${ISCCFG_INCLUDES} @LIBIDN2_CFLAGS@ @OPENSSL_INCLUDES@
|
||||||
|
|
||||||
CDEFINES = -DVERSION=\"${VERSION}\" @CRYPTO@
|
CDEFINES = -DVERSION=\"${VERSION}\"
|
||||||
CWARNINGS =
|
CWARNINGS =
|
||||||
|
|
||||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||||
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
|
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||||
IRSLIBS = ../../lib/irs/libirs.@A@
|
IRSLIBS = ../../lib/irs/libirs.@A@
|
||||||
|
|
||||||
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||||
@@ -64,6 +64,8 @@ MANOBJS = ${MANPAGES} ${HTMLPAGES}
|
|||||||
|
|
||||||
@BIND9_MAKE_RULES@
|
@BIND9_MAKE_RULES@
|
||||||
|
|
||||||
|
LDFLAGS = @LDFLAGS@ @LIBIDN2_LDFLAGS@
|
||||||
|
|
||||||
dig@EXEEXT@: dig.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
|
dig@EXEEXT@: dig.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
|
||||||
export BASEOBJS="dig.@O@ dighost.@O@ ${UOBJS}"; \
|
export BASEOBJS="dig.@O@ dighost.@O@ ${UOBJS}"; \
|
||||||
export LIBS0="${DNSLIBS} ${IRSLIBS}"; \
|
export LIBS0="${DNSLIBS} ${IRSLIBS}"; \
|
||||||
|
|||||||
+25
-9
@@ -176,7 +176,7 @@ using the command\-line interface\&.
|
|||||||
.PP
|
.PP
|
||||||
\-i
|
\-i
|
||||||
.RS 4
|
.RS 4
|
||||||
Do reverse IPv6 lookups using the obsolete RFC1886 IP6\&.INT domain, which is no longer in use\&. Obsolete bit string label queries (RFC2874) are not attempted\&.
|
Do reverse IPv6 lookups using the obsolete RFC 1886 IP6\&.INT domain, which is no longer in use\&. Obsolete bit string label queries (RFC 2874) are not attempted\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-k \fIkeyfile\fR
|
\-k \fIkeyfile\fR
|
||||||
@@ -210,13 +210,15 @@ from other arguments\&.
|
|||||||
.PP
|
.PP
|
||||||
\-t \fItype\fR
|
\-t \fItype\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
The resource record type to query\&. It can be any valid query type which is supported in BIND 9\&. The default query type is "A", unless the
|
The resource record type to query\&. It can be any valid query type\&. If it is a resource record type supported in BIND 9, it can be given by the type mnemonic (such as "NS" or "AAAA")\&. The default query type is "A", unless the
|
||||||
\fB\-x\fR
|
\fB\-x\fR
|
||||||
option is supplied to indicate a reverse lookup\&. A zone transfer can be requested by specifying a type of AXFR\&. When an incremental zone transfer (IXFR) is required, set the
|
option is supplied to indicate a reverse lookup\&. A zone transfer can be requested by specifying a type of AXFR\&. When an incremental zone transfer (IXFR) is required, set the
|
||||||
\fItype\fR
|
\fItype\fR
|
||||||
to
|
to
|
||||||
ixfr=N\&. The incremental zone transfer will contain the changes made to the zone since the serial number in the zone\*(Aqs SOA record was
|
ixfr=N\&. The incremental zone transfer will contain the changes made to the zone since the serial number in the zone\*(Aqs SOA record was
|
||||||
\fIN\fR\&.
|
\fIN\fR\&.
|
||||||
|
.sp
|
||||||
|
All resource record types can be expressed as "TYPEnn", where "nn" is the number of the type\&. If the resource record type is not supported in BIND 9, the result will be displayed as described in RFC 3597\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-u
|
\-u
|
||||||
@@ -464,6 +466,11 @@ Show [or do not show] the IP address and port number that supplied the answer wh
|
|||||||
option is enabled\&. If short form answers are requested, the default is not to show the source address and port number of the server that provided the answer\&.
|
option is enabled\&. If short form answers are requested, the default is not to show the source address and port number of the server that provided the answer\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
|
\fB+[no]idnin\fR
|
||||||
|
.RS 4
|
||||||
|
Process [do not process] IDN domain names on input\&. This requires IDN SUPPORT to have been enabled at compile time\&. The default is to process IDN input\&.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
\fB+[no]idnout\fR
|
\fB+[no]idnout\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Convert [do not convert] puny code on output\&. This requires IDN SUPPORT to have been enabled at compile time\&. The default is to convert output\&.
|
Convert [do not convert] puny code on output\&. This requires IDN SUPPORT to have been enabled at compile time\&. The default is to convert output\&.
|
||||||
@@ -525,7 +532,7 @@ Include an EDNS name server ID request when sending a query\&.
|
|||||||
.RS 4
|
.RS 4
|
||||||
When this option is set,
|
When this option is set,
|
||||||
\fBdig\fR
|
\fBdig\fR
|
||||||
attempts to find the authoritative name servers for the zone containing the name being looked up and display the SOA record that each name server has for the zone\&.
|
attempts to find the authoritative name servers for the zone containing the name being looked up and display the SOA record that each name server has for the zone\&. Addresses of servers that that did not respond are also printed\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\fB+[no]onesoa\fR
|
\fB+[no]onesoa\fR
|
||||||
@@ -557,6 +564,11 @@ Print [do not print] the query as it is sent\&. By default, the query is not pri
|
|||||||
Print [do not print] the question section of a query when an answer is returned\&. The default is to print the question section as a comment\&.
|
Print [do not print] the question section of a query when an answer is returned\&. The default is to print the question section as a comment\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
|
\fB+[no]raflag\fR
|
||||||
|
.RS 4
|
||||||
|
Set [do not set] the RA (Recursion Available) bit in the query\&. The default is +noraflag\&. This bit should be ignored by the server for QUERY\&.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
\fB+[no]rdflag\fR
|
\fB+[no]rdflag\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
A synonym for
|
A synonym for
|
||||||
@@ -646,6 +658,11 @@ for short, sends an EDNS CLIENT\-SUBNET option with an empty address and a sourc
|
|||||||
be used when resolving this query\&.
|
be used when resolving this query\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
|
\fB+[no]tcflag\fR
|
||||||
|
.RS 4
|
||||||
|
Set [do not set] the TC (TrunCation) bit in the query\&. The default is +notcflag\&. This bit should be ignored by the server for QUERY\&.
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
\fB+[no]tcp\fR
|
\fB+[no]tcp\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Use [do not use] TCP when querying name servers\&. The default behavior is to use UDP unless a type
|
Use [do not use] TCP when querying name servers\&. The default behavior is to use UDP unless a type
|
||||||
@@ -775,11 +792,10 @@ If
|
|||||||
\fBdig\fR
|
\fBdig\fR
|
||||||
has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names\&.
|
has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names\&.
|
||||||
\fBdig\fR
|
\fBdig\fR
|
||||||
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server\&. If you\*(Aqd like to turn off the IDN support for some reason, defines the
|
appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server\&. If you\*(Aqd like to turn off the IDN support for some reason, use parameters
|
||||||
\fBIDN_DISABLE\fR
|
\fI+noidnin\fR
|
||||||
environment variable\&. The IDN support is disabled if the variable is set when
|
and
|
||||||
\fBdig\fR
|
\fI+noidnout\fR\&.
|
||||||
runs\&.
|
|
||||||
.SH "FILES"
|
.SH "FILES"
|
||||||
.PP
|
.PP
|
||||||
/etc/resolv\&.conf
|
/etc/resolv\&.conf
|
||||||
@@ -791,7 +807,7 @@ ${HOME}/\&.digrc
|
|||||||
\fBhost\fR(1),
|
\fBhost\fR(1),
|
||||||
\fBnamed\fR(8),
|
\fBnamed\fR(8),
|
||||||
\fBdnssec-keygen\fR(8),
|
\fBdnssec-keygen\fR(8),
|
||||||
RFC1035\&.
|
RFC 1035\&.
|
||||||
.SH "BUGS"
|
.SH "BUGS"
|
||||||
.PP
|
.PP
|
||||||
There are probably too many query options\&.
|
There are probably too many query options\&.
|
||||||
|
|||||||
+233
-227
@@ -12,6 +12,9 @@
|
|||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@@ -61,10 +64,10 @@ static int addresscount = 0;
|
|||||||
static char domainopt[DNS_NAME_MAXTEXT];
|
static char domainopt[DNS_NAME_MAXTEXT];
|
||||||
static char hexcookie[81];
|
static char hexcookie[81];
|
||||||
|
|
||||||
static isc_boolean_t short_form = ISC_FALSE, printcmd = ISC_TRUE,
|
static bool short_form = false, printcmd = true,
|
||||||
ip6_int = ISC_FALSE, plusquest = ISC_FALSE, pluscomm = ISC_FALSE,
|
ip6_int = false, plusquest = false, pluscomm = false,
|
||||||
ipv4only = ISC_FALSE, ipv6only = ISC_FALSE;
|
ipv4only = false, ipv6only = false;
|
||||||
static isc_uint32_t splitwidth = 0xffffffff;
|
static uint32_t splitwidth = 0xffffffff;
|
||||||
|
|
||||||
/*% opcode text */
|
/*% opcode text */
|
||||||
static const char * const opcodetext[] = {
|
static const char * const opcodetext[] = {
|
||||||
@@ -205,6 +208,7 @@ help(void) {
|
|||||||
" +padding=### (Set padding block size [0])\n"
|
" +padding=### (Set padding block size [0])\n"
|
||||||
" +[no]qr (Print question before sending)\n"
|
" +[no]qr (Print question before sending)\n"
|
||||||
" +[no]question (Control display of question section)\n"
|
" +[no]question (Control display of question section)\n"
|
||||||
|
" +[no]raflag (Set RA flag in query (+[no]raflag))\n"
|
||||||
" +[no]rdflag (Recursive mode (+[no]recurse))\n"
|
" +[no]rdflag (Recursive mode (+[no]recurse))\n"
|
||||||
" +[no]recurse (Recursive mode (+[no]rdflag))\n"
|
" +[no]recurse (Recursive mode (+[no]rdflag))\n"
|
||||||
" +retry=### (Set number of UDP retries) [2]\n"
|
" +retry=### (Set number of UDP retries) [2]\n"
|
||||||
@@ -217,6 +221,7 @@ help(void) {
|
|||||||
" +[no]split=## (Split hex/base64 fields into chunks)\n"
|
" +[no]split=## (Split hex/base64 fields into chunks)\n"
|
||||||
" +[no]stats (Control display of statistics)\n"
|
" +[no]stats (Control display of statistics)\n"
|
||||||
" +subnet=addr (Set edns-client-subnet option)\n"
|
" +subnet=addr (Set edns-client-subnet option)\n"
|
||||||
|
" +[no]tcflag (Set TC flag in query (+[no]tcflag))\n"
|
||||||
" +[no]tcp (TCP mode (+[no]vc))\n"
|
" +[no]tcp (TCP mode (+[no]vc))\n"
|
||||||
" +timeout=### (Set query timeout) [5]\n"
|
" +timeout=### (Set query timeout) [5]\n"
|
||||||
" +[no]trace (Trace delegation down from root [+dnssec])\n"
|
" +[no]trace (Trace delegation down from root [+dnssec])\n"
|
||||||
@@ -238,7 +243,7 @@ help(void) {
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
|
received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
|
||||||
isc_uint64_t diff;
|
uint64_t diff;
|
||||||
time_t tnow;
|
time_t tnow;
|
||||||
struct tm tmnow;
|
struct tm tmnow;
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
@@ -258,7 +263,7 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
|
|||||||
printf(";; Query time: %ld msec\n", (long) diff / 1000);
|
printf(";; Query time: %ld msec\n", (long) diff / 1000);
|
||||||
printf(";; SERVER: %s(%s)\n", fromtext, query->servname);
|
printf(";; SERVER: %s(%s)\n", fromtext, query->servname);
|
||||||
time(&tnow);
|
time(&tnow);
|
||||||
#if defined(ISC_PLATFORM_USETHREADS) && !defined(WIN32)
|
#if !defined(WIN32)
|
||||||
(void)localtime_r(&tnow, &tmnow);
|
(void)localtime_r(&tnow, &tmnow);
|
||||||
#else
|
#else
|
||||||
tmnow = *localtime(&tnow);
|
tmnow = *localtime(&tnow);
|
||||||
@@ -279,36 +284,36 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
|
|||||||
#endif
|
#endif
|
||||||
if (query->lookup->doing_xfr) {
|
if (query->lookup->doing_xfr) {
|
||||||
printf(";; XFR size: %u records (messages %u, "
|
printf(";; XFR size: %u records (messages %u, "
|
||||||
"bytes %" ISC_PRINT_QUADFORMAT "u)\n",
|
"bytes %" PRIu64 ")\n",
|
||||||
query->rr_count, query->msg_count,
|
query->rr_count, query->msg_count,
|
||||||
query->byte_count);
|
query->byte_count);
|
||||||
} else {
|
} else {
|
||||||
printf(";; MSG SIZE rcvd: %u\n", bytes);
|
printf(";; MSG SIZE rcvd: %u\n", bytes);
|
||||||
}
|
}
|
||||||
if (key != NULL) {
|
if (tsigkey != NULL) {
|
||||||
if (!validated)
|
if (!validated)
|
||||||
puts(";; WARNING -- Some TSIG could not "
|
puts(";; WARNING -- Some TSIG could not "
|
||||||
"be validated");
|
"be validated");
|
||||||
}
|
}
|
||||||
if ((key == NULL) && (keysecret[0] != 0)) {
|
if ((tsigkey == NULL) && (keysecret[0] != 0)) {
|
||||||
puts(";; WARNING -- TSIG key was not used.");
|
puts(";; WARNING -- TSIG key was not used.");
|
||||||
}
|
}
|
||||||
puts("");
|
puts("");
|
||||||
} else if (query->lookup->identify && !short_form) {
|
} else if (query->lookup->identify && !short_form) {
|
||||||
diff = isc_time_microdiff(&query->time_recv, &query->time_sent);
|
diff = isc_time_microdiff(&query->time_recv, &query->time_sent);
|
||||||
if (query->lookup->use_usec)
|
if (query->lookup->use_usec)
|
||||||
printf(";; Received %" ISC_PRINT_QUADFORMAT "u bytes "
|
printf(";; Received %" PRIu64 " bytes "
|
||||||
"from %s(%s) in %ld us\n\n",
|
"from %s(%s) in %ld us\n\n",
|
||||||
query->lookup->doing_xfr
|
query->lookup->doing_xfr
|
||||||
? query->byte_count
|
? query->byte_count
|
||||||
: (isc_uint64_t)bytes,
|
: (uint64_t)bytes,
|
||||||
fromtext, query->userarg, (long) diff);
|
fromtext, query->userarg, (long) diff);
|
||||||
else
|
else
|
||||||
printf(";; Received %" ISC_PRINT_QUADFORMAT "u bytes "
|
printf(";; Received %" PRIu64 " bytes "
|
||||||
"from %s(%s) in %ld ms\n\n",
|
"from %s(%s) in %ld ms\n\n",
|
||||||
query->lookup->doing_xfr
|
query->lookup->doing_xfr
|
||||||
? query->byte_count
|
? query->byte_count
|
||||||
: (isc_uint64_t)bytes,
|
: (uint64_t)bytes,
|
||||||
fromtext, query->userarg, (long) diff / 1000);
|
fromtext, query->userarg, (long) diff / 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -330,7 +335,7 @@ trying(char *frm, dig_lookup_t *lookup) {
|
|||||||
static isc_result_t
|
static isc_result_t
|
||||||
say_message(dns_rdata_t *rdata, dig_query_t *query, isc_buffer_t *buf) {
|
say_message(dns_rdata_t *rdata, dig_query_t *query, isc_buffer_t *buf) {
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
isc_uint64_t diff;
|
uint64_t diff;
|
||||||
char store[sizeof(" in 18446744073709551616 us.")];
|
char store[sizeof(" in 18446744073709551616 us.")];
|
||||||
unsigned int styleflags = 0;
|
unsigned int styleflags = 0;
|
||||||
|
|
||||||
@@ -358,10 +363,11 @@ say_message(dns_rdata_t *rdata, dig_query_t *query, isc_buffer_t *buf) {
|
|||||||
diff = isc_time_microdiff(&query->time_recv, &query->time_sent);
|
diff = isc_time_microdiff(&query->time_recv, &query->time_sent);
|
||||||
ADD_STRING(buf, " from server ");
|
ADD_STRING(buf, " from server ");
|
||||||
ADD_STRING(buf, query->servname);
|
ADD_STRING(buf, query->servname);
|
||||||
if (query->lookup->use_usec)
|
if (query->lookup->use_usec) {
|
||||||
snprintf(store, sizeof(store), " in %" ISC_PLATFORM_QUADFORMAT "u us.", diff);
|
snprintf(store, sizeof(store), " in %" PRIu64 " us.", diff);
|
||||||
else
|
} else {
|
||||||
snprintf(store, sizeof(store), " in %" ISC_PLATFORM_QUADFORMAT "u ms.", diff / 1000);
|
snprintf(store, sizeof(store), " in %" PRIu64 " ms.", diff / 1000);
|
||||||
|
}
|
||||||
ADD_STRING(buf, store);
|
ADD_STRING(buf, store);
|
||||||
}
|
}
|
||||||
ADD_STRING(buf, "\n");
|
ADD_STRING(buf, "\n");
|
||||||
@@ -419,7 +425,7 @@ short_answer(dns_message_t *msg, dns_messagetextflag_t flags,
|
|||||||
return (ISC_R_SUCCESS);
|
return (ISC_R_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
static isc_boolean_t
|
static bool
|
||||||
isdotlocal(dns_message_t *msg) {
|
isdotlocal(dns_message_t *msg) {
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
static unsigned char local_ndata[] = { "\005local\0" };
|
static unsigned char local_ndata[] = { "\005local\0" };
|
||||||
@@ -434,16 +440,16 @@ isdotlocal(dns_message_t *msg) {
|
|||||||
dns_name_t *name = NULL;
|
dns_name_t *name = NULL;
|
||||||
dns_message_currentname(msg, DNS_SECTION_QUESTION, &name);
|
dns_message_currentname(msg, DNS_SECTION_QUESTION, &name);
|
||||||
if (dns_name_issubdomain(name, &local))
|
if (dns_name_issubdomain(name, &local))
|
||||||
return (ISC_TRUE);
|
return (true);
|
||||||
}
|
}
|
||||||
return (ISC_FALSE);
|
return (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Callback from dighost.c to print the reply from a server
|
* Callback from dighost.c to print the reply from a server
|
||||||
*/
|
*/
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
dns_messagetextflag_t flags;
|
dns_messagetextflag_t flags;
|
||||||
isc_buffer_t *buf = NULL;
|
isc_buffer_t *buf = NULL;
|
||||||
@@ -480,17 +486,17 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
|||||||
}
|
}
|
||||||
if (query->lookup->multiline ||
|
if (query->lookup->multiline ||
|
||||||
(query->lookup->nottl && query->lookup->noclass))
|
(query->lookup->nottl && query->lookup->noclass))
|
||||||
result = dns_master_stylecreate2(&style, styleflags,
|
result = dns_master_stylecreate(&style, styleflags,
|
||||||
24, 24, 24, 32, 80, 8,
|
24, 24, 24, 32, 80, 8,
|
||||||
splitwidth, mctx);
|
splitwidth, mctx);
|
||||||
else if (query->lookup->nottl || query->lookup->noclass)
|
else if (query->lookup->nottl || query->lookup->noclass)
|
||||||
result = dns_master_stylecreate2(&style, styleflags,
|
result = dns_master_stylecreate(&style, styleflags,
|
||||||
24, 24, 32, 40, 80, 8,
|
24, 24, 32, 40, 80, 8,
|
||||||
splitwidth, mctx);
|
splitwidth, mctx);
|
||||||
else
|
else
|
||||||
result = dns_master_stylecreate2(&style, styleflags,
|
result = dns_master_stylecreate(&style, styleflags,
|
||||||
24, 32, 40, 48, 80, 8,
|
24, 32, 40, 48, 80, 8,
|
||||||
splitwidth, mctx);
|
splitwidth, mctx);
|
||||||
check_result(result, "dns_master_stylecreate");
|
check_result(result, "dns_master_stylecreate");
|
||||||
|
|
||||||
if (query->lookup->cmdline[0] != 0) {
|
if (query->lookup->cmdline[0] != 0) {
|
||||||
@@ -687,7 +693,7 @@ cleanup:
|
|||||||
static void
|
static void
|
||||||
printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
|
printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
|
||||||
int i;
|
int i;
|
||||||
static isc_boolean_t first = ISC_TRUE;
|
static bool first = true;
|
||||||
char append[MXNAME];
|
char append[MXNAME];
|
||||||
|
|
||||||
if (printcmd) {
|
if (printcmd) {
|
||||||
@@ -714,7 +720,7 @@ printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
|
|||||||
";; global options:%s%s\n",
|
";; global options:%s%s\n",
|
||||||
short_form ? " +short" : "",
|
short_form ? " +short" : "",
|
||||||
printcmd ? " +cmd" : "");
|
printcmd ? " +cmd" : "");
|
||||||
first = ISC_FALSE;
|
first = false;
|
||||||
strlcat(lookup->cmdline, append,
|
strlcat(lookup->cmdline, append,
|
||||||
sizeof(lookup->cmdline));
|
sizeof(lookup->cmdline));
|
||||||
}
|
}
|
||||||
@@ -729,28 +735,27 @@ printgreeting(int argc, char **argv, dig_lookup_t *lookup) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
plus_option(const char *option, isc_boolean_t is_batchfile,
|
plus_option(char *option, bool is_batchfile,
|
||||||
dig_lookup_t *lookup)
|
dig_lookup_t *lookup)
|
||||||
{
|
{
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
char option_store[256];
|
char *cmd, *value, *last = NULL, *code, *extra;
|
||||||
char *cmd, *value, *ptr, *code;
|
uint32_t num;
|
||||||
isc_uint32_t num;
|
bool state = true;
|
||||||
isc_boolean_t state = ISC_TRUE;
|
|
||||||
size_t n;
|
size_t n;
|
||||||
|
|
||||||
strlcpy(option_store, option, sizeof(option_store));
|
INSIST(option != NULL);
|
||||||
ptr = option_store;
|
|
||||||
cmd = next_token(&ptr, "=");
|
if ((cmd = strtok_r(option, "=", &last)) == NULL) {
|
||||||
if (cmd == NULL) {
|
printf(";; Invalid option %s\n", option);
|
||||||
printf(";; Invalid option %s\n", option_store);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
value = ptr;
|
|
||||||
if (strncasecmp(cmd, "no", 2)==0) {
|
if (strncasecmp(cmd, "no", 2)==0) {
|
||||||
cmd += 2;
|
cmd += 2;
|
||||||
state = ISC_FALSE;
|
state = false;
|
||||||
}
|
}
|
||||||
|
/* parse the rest of the string */
|
||||||
|
value = strtok_r(NULL, "", &last);
|
||||||
|
|
||||||
#define FULLCHECK(A) \
|
#define FULLCHECK(A) \
|
||||||
do { \
|
do { \
|
||||||
@@ -854,7 +859,7 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
|
|||||||
case 'l': /* class */
|
case 'l': /* class */
|
||||||
/* keep +cl for backwards compatibility */
|
/* keep +cl for backwards compatibility */
|
||||||
FULLCHECK2("cl", "class");
|
FULLCHECK2("cl", "class");
|
||||||
lookup->noclass = ISC_TF(!state);
|
lookup->noclass = !state;
|
||||||
break;
|
break;
|
||||||
case 'm': /* cmd */
|
case 'm': /* cmd */
|
||||||
FULLCHECK("cmd");
|
FULLCHECK("cmd");
|
||||||
@@ -890,7 +895,7 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
|
|||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
FULLCHECK("crypto");
|
FULLCHECK("crypto");
|
||||||
lookup->nocrypto = ISC_TF(!state);
|
lookup->nocrypto = !state;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
goto invalid_option;
|
goto invalid_option;
|
||||||
@@ -1000,14 +1005,21 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
|
|||||||
lookup->ednsoptscnt = 0;
|
lookup->ednsoptscnt = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (value == NULL) {
|
code = NULL;
|
||||||
|
if (value != NULL) {
|
||||||
|
code = strtok_r(value,
|
||||||
|
":",
|
||||||
|
&last);
|
||||||
|
}
|
||||||
|
if (code == NULL) {
|
||||||
warn("ednsopt no "
|
warn("ednsopt no "
|
||||||
"code point "
|
"code point "
|
||||||
"specified");
|
"specified");
|
||||||
goto exit_or_usage;
|
goto exit_or_usage;
|
||||||
}
|
}
|
||||||
code = next_token(&value, ":");
|
extra = strtok_r(NULL, "\0",
|
||||||
save_opt(lookup, code, value);
|
&last);
|
||||||
|
save_opt(lookup, code, extra);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
goto invalid_option;
|
goto invalid_option;
|
||||||
@@ -1049,18 +1061,18 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
|
|||||||
switch (cmd[3]) {
|
switch (cmd[3]) {
|
||||||
case 'i':
|
case 'i':
|
||||||
FULLCHECK("idnin");
|
FULLCHECK("idnin");
|
||||||
#ifndef WITH_IDN_SUPPORT
|
#ifndef HAVE_LIBIDN2
|
||||||
fprintf(stderr, ";; IDN input support"
|
fprintf(stderr, ";; IDN input support"
|
||||||
" not enabled\n");
|
" not enabled\n");
|
||||||
#else
|
#else
|
||||||
lookup->idnin = state;
|
lookup->idnin = state;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case 'o':
|
case 'o':
|
||||||
FULLCHECK("idnout");
|
FULLCHECK("idnout");
|
||||||
#ifndef WITH_IDN_OUT_SUPPORT
|
#ifndef HAVE_LIBIDN2
|
||||||
fprintf(stderr, ";; IDN output support"
|
fprintf(stderr, ";; IDN output support"
|
||||||
" not enabled\n");
|
" not enabled\n");
|
||||||
#else
|
#else
|
||||||
lookup->idnout = state;
|
lookup->idnout = state;
|
||||||
#endif
|
#endif
|
||||||
@@ -1154,17 +1166,17 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
|
|||||||
FULLCHECK("nssearch");
|
FULLCHECK("nssearch");
|
||||||
lookup->ns_search_only = state;
|
lookup->ns_search_only = state;
|
||||||
if (state) {
|
if (state) {
|
||||||
lookup->trace_root = ISC_TRUE;
|
lookup->trace_root = true;
|
||||||
lookup->recurse = ISC_TRUE;
|
lookup->recurse = true;
|
||||||
lookup->identify = ISC_TRUE;
|
lookup->identify = true;
|
||||||
lookup->stats = ISC_FALSE;
|
lookup->stats = false;
|
||||||
lookup->comments = ISC_FALSE;
|
lookup->comments = false;
|
||||||
lookup->section_additional = ISC_FALSE;
|
lookup->section_additional = false;
|
||||||
lookup->section_authority = ISC_FALSE;
|
lookup->section_authority = false;
|
||||||
lookup->section_question = ISC_FALSE;
|
lookup->section_question = false;
|
||||||
lookup->rdtype = dns_rdatatype_ns;
|
lookup->rdtype = dns_rdatatype_ns;
|
||||||
lookup->rdtypeset = ISC_TRUE;
|
lookup->rdtypeset = true;
|
||||||
short_form = ISC_TRUE;
|
short_form = true;
|
||||||
lookup->rrcomments = 0;
|
lookup->rrcomments = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1222,7 +1234,7 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
|
|||||||
warn("Couldn't parse padding");
|
warn("Couldn't parse padding");
|
||||||
goto exit_or_usage;
|
goto exit_or_usage;
|
||||||
}
|
}
|
||||||
lookup->padding = (isc_uint16_t)num;
|
lookup->padding = (uint16_t)num;
|
||||||
break;
|
break;
|
||||||
case 'q':
|
case 'q':
|
||||||
switch (cmd[1]) {
|
switch (cmd[1]) {
|
||||||
@@ -1242,6 +1254,10 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
|
|||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
switch (cmd[1]) {
|
switch (cmd[1]) {
|
||||||
|
case 'a': /* raflag */
|
||||||
|
FULLCHECK("raflag");
|
||||||
|
lookup->raflag = state;
|
||||||
|
break;
|
||||||
case 'd': /* rdflag */
|
case 'd': /* rdflag */
|
||||||
FULLCHECK("rdflag");
|
FULLCHECK("rdflag");
|
||||||
lookup->recurse = state;
|
lookup->recurse = state;
|
||||||
@@ -1294,13 +1310,13 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
|
|||||||
FULLCHECK("short");
|
FULLCHECK("short");
|
||||||
short_form = state;
|
short_form = state;
|
||||||
if (state) {
|
if (state) {
|
||||||
printcmd = ISC_FALSE;
|
printcmd = false;
|
||||||
lookup->section_additional = ISC_FALSE;
|
lookup->section_additional = false;
|
||||||
lookup->section_answer = ISC_TRUE;
|
lookup->section_answer = true;
|
||||||
lookup->section_authority = ISC_FALSE;
|
lookup->section_authority = false;
|
||||||
lookup->section_question = ISC_FALSE;
|
lookup->section_question = false;
|
||||||
lookup->comments = ISC_FALSE;
|
lookup->comments = false;
|
||||||
lookup->stats = ISC_FALSE;
|
lookup->stats = false;
|
||||||
lookup->rrcomments = -1;
|
lookup->rrcomments = -1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1385,10 +1401,20 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
|
|||||||
case 't':
|
case 't':
|
||||||
switch (cmd[1]) {
|
switch (cmd[1]) {
|
||||||
case 'c': /* tcp */
|
case 'c': /* tcp */
|
||||||
FULLCHECK("tcp");
|
switch (cmd[2]) {
|
||||||
if (!is_batchfile) {
|
case 'f':
|
||||||
lookup->tcp_mode = state;
|
FULLCHECK("tcflag");
|
||||||
lookup->tcp_mode_set = ISC_TRUE;
|
lookup->tcflag = state;
|
||||||
|
break;
|
||||||
|
case 'p':
|
||||||
|
FULLCHECK("tcp");
|
||||||
|
if (!is_batchfile) {
|
||||||
|
lookup->tcp_mode = state;
|
||||||
|
lookup->tcp_mode_set = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
goto invalid_option;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'i': /* timeout */
|
case 'i': /* timeout */
|
||||||
@@ -1417,17 +1443,17 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
|
|||||||
lookup->trace = state;
|
lookup->trace = state;
|
||||||
lookup->trace_root = state;
|
lookup->trace_root = state;
|
||||||
if (state) {
|
if (state) {
|
||||||
lookup->recurse = ISC_FALSE;
|
lookup->recurse = false;
|
||||||
lookup->identify = ISC_TRUE;
|
lookup->identify = true;
|
||||||
lookup->comments = ISC_FALSE;
|
lookup->comments = false;
|
||||||
lookup->rrcomments = 0;
|
lookup->rrcomments = 0;
|
||||||
lookup->stats = ISC_FALSE;
|
lookup->stats = false;
|
||||||
lookup->section_additional = ISC_FALSE;
|
lookup->section_additional = false;
|
||||||
lookup->section_authority = ISC_TRUE;
|
lookup->section_authority = true;
|
||||||
lookup->section_question = ISC_FALSE;
|
lookup->section_question = false;
|
||||||
lookup->dnssec = ISC_TRUE;
|
lookup->dnssec = true;
|
||||||
lookup->sendcookie = ISC_TRUE;
|
lookup->sendcookie = true;
|
||||||
usesearch = ISC_FALSE;
|
usesearch = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'i': /* tries */
|
case 'i': /* tries */
|
||||||
@@ -1461,12 +1487,12 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
|
|||||||
case 0:
|
case 0:
|
||||||
case 'i': /* ttlid */
|
case 'i': /* ttlid */
|
||||||
FULLCHECK2("ttl", "ttlid");
|
FULLCHECK2("ttl", "ttlid");
|
||||||
lookup->nottl = ISC_TF(!state);
|
lookup->nottl = !state;
|
||||||
break;
|
break;
|
||||||
case 'u': /* ttlunits */
|
case 'u': /* ttlunits */
|
||||||
FULLCHECK("ttlunits");
|
FULLCHECK("ttlunits");
|
||||||
lookup->nottl = ISC_FALSE;
|
lookup->nottl = false;
|
||||||
lookup->ttlunits = ISC_TF(state);
|
lookup->ttlunits = state;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
goto invalid_option;
|
goto invalid_option;
|
||||||
@@ -1488,7 +1514,7 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
|
|||||||
FULLCHECK("vc");
|
FULLCHECK("vc");
|
||||||
if (!is_batchfile) {
|
if (!is_batchfile) {
|
||||||
lookup->tcp_mode = state;
|
lookup->tcp_mode = state;
|
||||||
lookup->tcp_mode_set = ISC_TRUE;
|
lookup->tcp_mode_set = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'z': /* zflag */
|
case 'z': /* zflag */
|
||||||
@@ -1514,19 +1540,19 @@ plus_option(const char *option, isc_boolean_t is_batchfile,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*%
|
/*%
|
||||||
* #ISC_TRUE returned if value was used
|
* #true returned if value was used
|
||||||
*/
|
*/
|
||||||
static const char *single_dash_opts = "46dhimnuv";
|
static const char *single_dash_opts = "46dhimnuv";
|
||||||
static const char *dash_opts = "46bcdfhikmnptvyx";
|
static const char *dash_opts = "46bcdfhikmnptvyx";
|
||||||
static isc_boolean_t
|
static bool
|
||||||
dash_option(char *option, char *next, dig_lookup_t **lookup,
|
dash_option(char *option, char *next, dig_lookup_t **lookup,
|
||||||
isc_boolean_t *open_type_class, isc_boolean_t *need_clone,
|
bool *open_type_class, bool *need_clone,
|
||||||
isc_boolean_t config_only, int argc, char **argv,
|
bool config_only, int argc, char **argv,
|
||||||
isc_boolean_t *firstarg)
|
bool *firstarg)
|
||||||
{
|
{
|
||||||
char opt, *value, *ptr, *ptr2, *ptr3;
|
char opt, *value, *ptr, *ptr2, *ptr3, *last;
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
isc_boolean_t value_from_next;
|
bool value_from_next;
|
||||||
isc_textregion_t tr;
|
isc_textregion_t tr;
|
||||||
dns_rdatatype_t rdtype;
|
dns_rdatatype_t rdtype;
|
||||||
dns_rdataclass_t rdclass;
|
dns_rdataclass_t rdclass;
|
||||||
@@ -1535,7 +1561,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
|||||||
struct in6_addr in6;
|
struct in6_addr in6;
|
||||||
in_port_t srcport;
|
in_port_t srcport;
|
||||||
char *hash, *cmd;
|
char *hash, *cmd;
|
||||||
isc_uint32_t num;
|
uint32_t num;
|
||||||
|
|
||||||
while (strpbrk(option, single_dash_opts) == &option[0]) {
|
while (strpbrk(option, single_dash_opts) == &option[0]) {
|
||||||
/*
|
/*
|
||||||
@@ -1548,21 +1574,21 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
|||||||
case '4':
|
case '4':
|
||||||
if (have_ipv4) {
|
if (have_ipv4) {
|
||||||
isc_net_disableipv6();
|
isc_net_disableipv6();
|
||||||
have_ipv6 = ISC_FALSE;
|
have_ipv6 = false;
|
||||||
} else {
|
} else {
|
||||||
fatal("can't find IPv4 networking");
|
fatal("can't find IPv4 networking");
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
return (ISC_FALSE);
|
return (false);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case '6':
|
case '6':
|
||||||
if (have_ipv6) {
|
if (have_ipv6) {
|
||||||
isc_net_disableipv4();
|
isc_net_disableipv4();
|
||||||
have_ipv4 = ISC_FALSE;
|
have_ipv4 = false;
|
||||||
} else {
|
} else {
|
||||||
fatal("can't find IPv6 networking");
|
fatal("can't find IPv6 networking");
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
return (ISC_FALSE);
|
return (false);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
@@ -1570,17 +1596,17 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
|||||||
if (ptr != &option[1]) {
|
if (ptr != &option[1]) {
|
||||||
cmd = option;
|
cmd = option;
|
||||||
FULLCHECK("debug");
|
FULLCHECK("debug");
|
||||||
debugging = ISC_TRUE;
|
debugging = true;
|
||||||
return (ISC_FALSE);
|
return (false);
|
||||||
} else
|
} else
|
||||||
debugging = ISC_TRUE;
|
debugging = true;
|
||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
help();
|
help();
|
||||||
exit(0);
|
exit(0);
|
||||||
break;
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
ip6_int = ISC_TRUE;
|
ip6_int = true;
|
||||||
break;
|
break;
|
||||||
case 'm': /* memdebug */
|
case 'm': /* memdebug */
|
||||||
/* memdebug is handled in preparse_args() */
|
/* memdebug is handled in preparse_args() */
|
||||||
@@ -1589,7 +1615,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
|||||||
/* deprecated */
|
/* deprecated */
|
||||||
break;
|
break;
|
||||||
case 'u':
|
case 'u':
|
||||||
(*lookup)->use_usec = ISC_TRUE;
|
(*lookup)->use_usec = true;
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
version();
|
version();
|
||||||
@@ -1599,14 +1625,14 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
|||||||
if (strlen(option) > 1U)
|
if (strlen(option) > 1U)
|
||||||
option = &option[1];
|
option = &option[1];
|
||||||
else
|
else
|
||||||
return (ISC_FALSE);
|
return (false);
|
||||||
}
|
}
|
||||||
opt = option[0];
|
opt = option[0];
|
||||||
if (strlen(option) > 1U) {
|
if (strlen(option) > 1U) {
|
||||||
value_from_next = ISC_FALSE;
|
value_from_next = false;
|
||||||
value = &option[1];
|
value = &option[1];
|
||||||
} else {
|
} else {
|
||||||
value_from_next = ISC_TRUE;
|
value_from_next = true;
|
||||||
value = next;
|
value = next;
|
||||||
}
|
}
|
||||||
if (value == NULL)
|
if (value == NULL)
|
||||||
@@ -1636,20 +1662,20 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
|||||||
}
|
}
|
||||||
if (hash != NULL)
|
if (hash != NULL)
|
||||||
*hash = '#';
|
*hash = '#';
|
||||||
specified_source = ISC_TRUE;
|
specified_source = true;
|
||||||
return (value_from_next);
|
return (value_from_next);
|
||||||
case 'c':
|
case 'c':
|
||||||
if ((*lookup)->rdclassset) {
|
if ((*lookup)->rdclassset) {
|
||||||
fprintf(stderr, ";; Warning, extra class option\n");
|
fprintf(stderr, ";; Warning, extra class option\n");
|
||||||
}
|
}
|
||||||
*open_type_class = ISC_FALSE;
|
*open_type_class = false;
|
||||||
tr.base = value;
|
tr.base = value;
|
||||||
tr.length = (unsigned int) strlen(value);
|
tr.length = (unsigned int) strlen(value);
|
||||||
result = dns_rdataclass_fromtext(&rdclass,
|
result = dns_rdataclass_fromtext(&rdclass,
|
||||||
(isc_textregion_t *)&tr);
|
(isc_textregion_t *)&tr);
|
||||||
if (result == ISC_R_SUCCESS) {
|
if (result == ISC_R_SUCCESS) {
|
||||||
(*lookup)->rdclass = rdclass;
|
(*lookup)->rdclass = rdclass;
|
||||||
(*lookup)->rdclassset = ISC_TRUE;
|
(*lookup)->rdclassset = true;
|
||||||
} else
|
} else
|
||||||
fprintf(stderr, ";; Warning, ignoring "
|
fprintf(stderr, ";; Warning, ignoring "
|
||||||
"invalid class %s\n",
|
"invalid class %s\n",
|
||||||
@@ -1671,23 +1697,23 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
|||||||
if (!config_only) {
|
if (!config_only) {
|
||||||
if (*need_clone)
|
if (*need_clone)
|
||||||
(*lookup) = clone_lookup(default_lookup,
|
(*lookup) = clone_lookup(default_lookup,
|
||||||
ISC_TRUE);
|
true);
|
||||||
*need_clone = ISC_TRUE;
|
*need_clone = true;
|
||||||
strlcpy((*lookup)->textname, value,
|
strlcpy((*lookup)->textname, value,
|
||||||
sizeof((*lookup)->textname));
|
sizeof((*lookup)->textname));
|
||||||
(*lookup)->trace_root = ISC_TF((*lookup)->trace ||
|
(*lookup)->trace_root = ((*lookup)->trace ||
|
||||||
(*lookup)->ns_search_only);
|
(*lookup)->ns_search_only);
|
||||||
(*lookup)->new_search = ISC_TRUE;
|
(*lookup)->new_search = true;
|
||||||
if (*firstarg) {
|
if (*firstarg) {
|
||||||
printgreeting(argc, argv, *lookup);
|
printgreeting(argc, argv, *lookup);
|
||||||
*firstarg = ISC_FALSE;
|
*firstarg = false;
|
||||||
}
|
}
|
||||||
ISC_LIST_APPEND(lookup_list, (*lookup), link);
|
ISC_LIST_APPEND(lookup_list, (*lookup), link);
|
||||||
debug("looking up %s", (*lookup)->textname);
|
debug("looking up %s", (*lookup)->textname);
|
||||||
}
|
}
|
||||||
return (value_from_next);
|
return (value_from_next);
|
||||||
case 't':
|
case 't':
|
||||||
*open_type_class = ISC_FALSE;
|
*open_type_class = false;
|
||||||
if (strncasecmp(value, "ixfr=", 5) == 0) {
|
if (strncasecmp(value, "ixfr=", 5) == 0) {
|
||||||
rdtype = dns_rdatatype_ixfr;
|
rdtype = dns_rdatatype_ixfr;
|
||||||
result = ISC_R_SUCCESS;
|
result = ISC_R_SUCCESS;
|
||||||
@@ -1707,9 +1733,9 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
|||||||
"extra type option\n");
|
"extra type option\n");
|
||||||
}
|
}
|
||||||
if (rdtype == dns_rdatatype_ixfr) {
|
if (rdtype == dns_rdatatype_ixfr) {
|
||||||
isc_uint32_t serial;
|
uint32_t serial;
|
||||||
(*lookup)->rdtype = dns_rdatatype_ixfr;
|
(*lookup)->rdtype = dns_rdatatype_ixfr;
|
||||||
(*lookup)->rdtypeset = ISC_TRUE;
|
(*lookup)->rdtypeset = true;
|
||||||
result = parse_uint(&serial, &value[5],
|
result = parse_uint(&serial, &value[5],
|
||||||
MAXSERIAL, "serial number");
|
MAXSERIAL, "serial number");
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
@@ -1718,19 +1744,19 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
|||||||
(*lookup)->section_question = plusquest;
|
(*lookup)->section_question = plusquest;
|
||||||
(*lookup)->comments = pluscomm;
|
(*lookup)->comments = pluscomm;
|
||||||
if (!(*lookup)->tcp_mode_set)
|
if (!(*lookup)->tcp_mode_set)
|
||||||
(*lookup)->tcp_mode = ISC_TRUE;
|
(*lookup)->tcp_mode = true;
|
||||||
} else {
|
} else {
|
||||||
(*lookup)->rdtype = rdtype;
|
(*lookup)->rdtype = rdtype;
|
||||||
if (!config_only)
|
if (!config_only)
|
||||||
(*lookup)->rdtypeset = ISC_TRUE;
|
(*lookup)->rdtypeset = true;
|
||||||
if (rdtype == dns_rdatatype_axfr) {
|
if (rdtype == dns_rdatatype_axfr) {
|
||||||
(*lookup)->section_question = plusquest;
|
(*lookup)->section_question = plusquest;
|
||||||
(*lookup)->comments = pluscomm;
|
(*lookup)->comments = pluscomm;
|
||||||
} else if (rdtype == dns_rdatatype_any) {
|
} else if (rdtype == dns_rdatatype_any) {
|
||||||
if (!(*lookup)->tcp_mode_set)
|
if (!(*lookup)->tcp_mode_set)
|
||||||
(*lookup)->tcp_mode = ISC_TRUE;
|
(*lookup)->tcp_mode = true;
|
||||||
}
|
}
|
||||||
(*lookup)->ixfr_serial = ISC_FALSE;
|
(*lookup)->ixfr_serial = false;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
fprintf(stderr, ";; Warning, ignoring "
|
fprintf(stderr, ";; Warning, ignoring "
|
||||||
@@ -1738,49 +1764,44 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
|||||||
value);
|
value);
|
||||||
return (value_from_next);
|
return (value_from_next);
|
||||||
case 'y':
|
case 'y':
|
||||||
ptr = next_token(&value, ":"); /* hmac type or name */
|
if ((ptr = strtok_r(value, ":", &last)) == NULL) {
|
||||||
if (ptr == NULL) {
|
|
||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
ptr2 = next_token(&value, ":"); /* name or secret */
|
if ((ptr2 = strtok_r(NULL, ":", &last)) == NULL) { /* name or secret */
|
||||||
if (ptr2 == NULL)
|
|
||||||
usage();
|
usage();
|
||||||
ptr3 = next_token(&value, ":"); /* secret or NULL */
|
}
|
||||||
if (ptr3 != NULL) {
|
if ((ptr3 = strtok_r(NULL, ":", &last)) != NULL) { /* secret or NULL */
|
||||||
parse_hmac(ptr);
|
parse_hmac(ptr);
|
||||||
ptr = ptr2;
|
ptr = ptr2;
|
||||||
ptr2 = ptr3;
|
ptr2 = ptr3;
|
||||||
} else {
|
} else {
|
||||||
#ifndef PK11_MD5_DISABLE
|
|
||||||
hmacname = DNS_TSIG_HMACMD5_NAME;
|
hmacname = DNS_TSIG_HMACMD5_NAME;
|
||||||
#else
|
|
||||||
hmacname = DNS_TSIG_HMACSHA256_NAME;
|
|
||||||
#endif
|
|
||||||
digestbits = 0;
|
digestbits = 0;
|
||||||
}
|
}
|
||||||
|
/* XXXONDREJ: FIXME */
|
||||||
strlcpy(keynametext, ptr, sizeof(keynametext));
|
strlcpy(keynametext, ptr, sizeof(keynametext));
|
||||||
strlcpy(keysecret, ptr2, sizeof(keysecret));
|
strlcpy(keysecret, ptr2, sizeof(keysecret));
|
||||||
return (value_from_next);
|
return (value_from_next);
|
||||||
case 'x':
|
case 'x':
|
||||||
if (*need_clone)
|
if (*need_clone)
|
||||||
*lookup = clone_lookup(default_lookup, ISC_TRUE);
|
*lookup = clone_lookup(default_lookup, true);
|
||||||
*need_clone = ISC_TRUE;
|
*need_clone = true;
|
||||||
if (get_reverse(textname, sizeof(textname), value,
|
if (get_reverse(textname, sizeof(textname), value,
|
||||||
ip6_int, ISC_FALSE) == ISC_R_SUCCESS) {
|
ip6_int, false) == ISC_R_SUCCESS) {
|
||||||
strlcpy((*lookup)->textname, textname,
|
strlcpy((*lookup)->textname, textname,
|
||||||
sizeof((*lookup)->textname));
|
sizeof((*lookup)->textname));
|
||||||
debug("looking up %s", (*lookup)->textname);
|
debug("looking up %s", (*lookup)->textname);
|
||||||
(*lookup)->trace_root = ISC_TF((*lookup)->trace ||
|
(*lookup)->trace_root = ((*lookup)->trace ||
|
||||||
(*lookup)->ns_search_only);
|
(*lookup)->ns_search_only);
|
||||||
(*lookup)->ip6_int = ip6_int;
|
(*lookup)->ip6_int = ip6_int;
|
||||||
if (!(*lookup)->rdtypeset)
|
if (!(*lookup)->rdtypeset)
|
||||||
(*lookup)->rdtype = dns_rdatatype_ptr;
|
(*lookup)->rdtype = dns_rdatatype_ptr;
|
||||||
if (!(*lookup)->rdclassset)
|
if (!(*lookup)->rdclassset)
|
||||||
(*lookup)->rdclass = dns_rdataclass_in;
|
(*lookup)->rdclass = dns_rdataclass_in;
|
||||||
(*lookup)->new_search = ISC_TRUE;
|
(*lookup)->new_search = true;
|
||||||
if (*firstarg) {
|
if (*firstarg) {
|
||||||
printgreeting(argc, argv, *lookup);
|
printgreeting(argc, argv, *lookup);
|
||||||
*firstarg = ISC_FALSE;
|
*firstarg = false;
|
||||||
}
|
}
|
||||||
ISC_LIST_APPEND(lookup_list, *lookup, link);
|
ISC_LIST_APPEND(lookup_list, *lookup, link);
|
||||||
} else {
|
} else {
|
||||||
@@ -1794,7 +1815,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup,
|
|||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
/* NOTREACHED */
|
/* NOTREACHED */
|
||||||
return (ISC_FALSE);
|
return (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*%
|
/*%
|
||||||
@@ -1821,19 +1842,19 @@ preparse_args(int argc, char **argv) {
|
|||||||
while (strpbrk(option, single_dash_opts) == &option[0]) {
|
while (strpbrk(option, single_dash_opts) == &option[0]) {
|
||||||
switch (option[0]) {
|
switch (option[0]) {
|
||||||
case 'm':
|
case 'm':
|
||||||
memdebugging = ISC_TRUE;
|
memdebugging = true;
|
||||||
isc_mem_debugging = ISC_MEM_DEBUGTRACE |
|
isc_mem_debugging = ISC_MEM_DEBUGTRACE |
|
||||||
ISC_MEM_DEBUGRECORD;
|
ISC_MEM_DEBUGRECORD;
|
||||||
break;
|
break;
|
||||||
case '4':
|
case '4':
|
||||||
if (ipv6only)
|
if (ipv6only)
|
||||||
fatal("only one of -4 and -6 allowed");
|
fatal("only one of -4 and -6 allowed");
|
||||||
ipv4only = ISC_TRUE;
|
ipv4only = true;
|
||||||
break;
|
break;
|
||||||
case '6':
|
case '6':
|
||||||
if (ipv4only)
|
if (ipv4only)
|
||||||
fatal("only one of -4 and -6 allowed");
|
fatal("only one of -4 and -6 allowed");
|
||||||
ipv6only = ISC_TRUE;
|
ipv6only = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
option = &option[1];
|
option = &option[1];
|
||||||
@@ -1841,17 +1862,33 @@ preparse_args(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
split_batchline(char *batchline, char **bargv, int len, const char *msg) {
|
||||||
|
int bargc;
|
||||||
|
char *last = NULL;
|
||||||
|
|
||||||
|
REQUIRE(batchline != NULL);
|
||||||
|
|
||||||
|
for (bargc = 1, bargv[bargc] = strtok_r(batchline, " \t\r\n", &last);
|
||||||
|
bargc < len && bargv[bargc];
|
||||||
|
bargv[++bargc] = strtok_r(NULL, " \t\r\n", &last))
|
||||||
|
{
|
||||||
|
debug("%s %d: %s", msg, bargc, bargv[bargc]);
|
||||||
|
}
|
||||||
|
return (bargc);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
parse_args(bool is_batchfile, bool config_only,
|
||||||
int argc, char **argv)
|
int argc, char **argv)
|
||||||
{
|
{
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
isc_textregion_t tr;
|
isc_textregion_t tr;
|
||||||
isc_boolean_t firstarg = ISC_TRUE;
|
bool firstarg = true;
|
||||||
dig_lookup_t *lookup = NULL;
|
dig_lookup_t *lookup = NULL;
|
||||||
dns_rdatatype_t rdtype;
|
dns_rdatatype_t rdtype;
|
||||||
dns_rdataclass_t rdclass;
|
dns_rdataclass_t rdclass;
|
||||||
isc_boolean_t open_type_class = ISC_TRUE;
|
bool open_type_class = true;
|
||||||
char batchline[MXNAME];
|
char batchline[MXNAME];
|
||||||
int bargc;
|
int bargc;
|
||||||
char *bargv[64];
|
char *bargv[64];
|
||||||
@@ -1859,11 +1896,9 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
|||||||
char **rv;
|
char **rv;
|
||||||
#ifndef NOPOSIX
|
#ifndef NOPOSIX
|
||||||
char *homedir;
|
char *homedir;
|
||||||
char rcfile[256];
|
char rcfile[PATH_MAX];
|
||||||
#endif
|
#endif
|
||||||
char *input;
|
bool need_clone = true;
|
||||||
int i;
|
|
||||||
isc_boolean_t need_clone = ISC_TRUE;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The semantics for parsing the args is a bit complex; if
|
* The semantics for parsing the args is a bit complex; if
|
||||||
@@ -1880,9 +1915,9 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
|||||||
if (!is_batchfile) {
|
if (!is_batchfile) {
|
||||||
debug("making new lookup");
|
debug("making new lookup");
|
||||||
default_lookup = make_empty_lookup();
|
default_lookup = make_empty_lookup();
|
||||||
default_lookup->adflag = ISC_TRUE;
|
default_lookup->adflag = true;
|
||||||
default_lookup->edns = 0;
|
default_lookup->edns = 0;
|
||||||
default_lookup->sendcookie = ISC_TRUE;
|
default_lookup->sendcookie = true;
|
||||||
|
|
||||||
#ifndef NOPOSIX
|
#ifndef NOPOSIX
|
||||||
/*
|
/*
|
||||||
@@ -1894,30 +1929,21 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
|||||||
unsigned int n;
|
unsigned int n;
|
||||||
n = snprintf(rcfile, sizeof(rcfile), "%s/.digrc",
|
n = snprintf(rcfile, sizeof(rcfile), "%s/.digrc",
|
||||||
homedir);
|
homedir);
|
||||||
if (n < sizeof(rcfile))
|
if (n < sizeof(rcfile)) {
|
||||||
batchfp = fopen(rcfile, "r");
|
batchfp = fopen(rcfile, "r");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (batchfp != NULL) {
|
if (batchfp != NULL) {
|
||||||
while (fgets(batchline, sizeof(batchline),
|
while (fgets(batchline, sizeof(batchline),
|
||||||
batchfp) != 0) {
|
batchfp) != 0)
|
||||||
|
{
|
||||||
debug("config line %s", batchline);
|
debug("config line %s", batchline);
|
||||||
bargc = 1;
|
bargc = split_batchline(batchline, bargv, 62,
|
||||||
input = batchline;
|
".digrc argv");
|
||||||
bargv[bargc] = next_token(&input, " \t\r\n");
|
|
||||||
while ((bargc < 62) && (bargv[bargc] != NULL)) {
|
|
||||||
bargc++;
|
|
||||||
bargv[bargc] =
|
|
||||||
next_token(&input, " \t\r\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
bargv[0] = argv[0];
|
bargv[0] = argv[0];
|
||||||
argv0 = argv[0];
|
argv0 = argv[0];
|
||||||
|
parse_args(true, true,
|
||||||
for(i = 0; i < bargc; i++)
|
bargc, (char **)bargv);
|
||||||
debug(".digrc argv %d: %s",
|
|
||||||
i, bargv[i]);
|
|
||||||
parse_args(ISC_TRUE, ISC_TRUE, bargc,
|
|
||||||
(char **)bargv);
|
|
||||||
}
|
}
|
||||||
fclose(batchfp);
|
fclose(batchfp);
|
||||||
}
|
}
|
||||||
@@ -1926,10 +1952,11 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
|||||||
|
|
||||||
if (is_batchfile && !config_only) {
|
if (is_batchfile && !config_only) {
|
||||||
/* Processing '-f batchfile'. */
|
/* Processing '-f batchfile'. */
|
||||||
lookup = clone_lookup(default_lookup, ISC_TRUE);
|
lookup = clone_lookup(default_lookup, true);
|
||||||
need_clone = ISC_FALSE;
|
need_clone = false;
|
||||||
} else
|
} else {
|
||||||
lookup = default_lookup;
|
lookup = default_lookup;
|
||||||
|
}
|
||||||
|
|
||||||
rc = argc;
|
rc = argc;
|
||||||
rv = argv;
|
rv = argv;
|
||||||
@@ -2009,10 +2036,10 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
|||||||
"extra type option\n");
|
"extra type option\n");
|
||||||
}
|
}
|
||||||
if (rdtype == dns_rdatatype_ixfr) {
|
if (rdtype == dns_rdatatype_ixfr) {
|
||||||
isc_uint32_t serial;
|
uint32_t serial;
|
||||||
lookup->rdtype =
|
lookup->rdtype =
|
||||||
dns_rdatatype_ixfr;
|
dns_rdatatype_ixfr;
|
||||||
lookup->rdtypeset = ISC_TRUE;
|
lookup->rdtypeset = true;
|
||||||
result = parse_uint(&serial,
|
result = parse_uint(&serial,
|
||||||
&rv[0][5],
|
&rv[0][5],
|
||||||
MAXSERIAL,
|
MAXSERIAL,
|
||||||
@@ -2025,10 +2052,10 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
|||||||
plusquest;
|
plusquest;
|
||||||
lookup->comments = pluscomm;
|
lookup->comments = pluscomm;
|
||||||
if (!lookup->tcp_mode_set)
|
if (!lookup->tcp_mode_set)
|
||||||
lookup->tcp_mode = ISC_TRUE;
|
lookup->tcp_mode = true;
|
||||||
} else {
|
} else {
|
||||||
lookup->rdtype = rdtype;
|
lookup->rdtype = rdtype;
|
||||||
lookup->rdtypeset = ISC_TRUE;
|
lookup->rdtypeset = true;
|
||||||
if (rdtype ==
|
if (rdtype ==
|
||||||
dns_rdatatype_axfr) {
|
dns_rdatatype_axfr) {
|
||||||
lookup->section_question =
|
lookup->section_question =
|
||||||
@@ -2038,8 +2065,8 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
|||||||
if (rdtype ==
|
if (rdtype ==
|
||||||
dns_rdatatype_any &&
|
dns_rdatatype_any &&
|
||||||
!lookup->tcp_mode_set)
|
!lookup->tcp_mode_set)
|
||||||
lookup->tcp_mode = ISC_TRUE;
|
lookup->tcp_mode = true;
|
||||||
lookup->ixfr_serial = ISC_FALSE;
|
lookup->ixfr_serial = false;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -2051,7 +2078,7 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
|||||||
"extra class option\n");
|
"extra class option\n");
|
||||||
}
|
}
|
||||||
lookup->rdclass = rdclass;
|
lookup->rdclass = rdclass;
|
||||||
lookup->rdclassset = ISC_TRUE;
|
lookup->rdclassset = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2059,16 +2086,16 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
|||||||
if (!config_only) {
|
if (!config_only) {
|
||||||
if (need_clone)
|
if (need_clone)
|
||||||
lookup = clone_lookup(default_lookup,
|
lookup = clone_lookup(default_lookup,
|
||||||
ISC_TRUE);
|
true);
|
||||||
need_clone = ISC_TRUE;
|
need_clone = true;
|
||||||
strlcpy(lookup->textname, rv[0],
|
strlcpy(lookup->textname, rv[0],
|
||||||
sizeof(lookup->textname));
|
sizeof(lookup->textname));
|
||||||
lookup->trace_root = ISC_TF(lookup->trace ||
|
lookup->trace_root = (lookup->trace ||
|
||||||
lookup->ns_search_only);
|
lookup->ns_search_only);
|
||||||
lookup->new_search = ISC_TRUE;
|
lookup->new_search = true;
|
||||||
if (firstarg) {
|
if (firstarg) {
|
||||||
printgreeting(argc, argv, lookup);
|
printgreeting(argc, argv, lookup);
|
||||||
firstarg = ISC_FALSE;
|
firstarg = false;
|
||||||
}
|
}
|
||||||
ISC_LIST_APPEND(lookup_list, lookup, link);
|
ISC_LIST_APPEND(lookup_list, lookup, link);
|
||||||
debug("looking up %s", lookup->textname);
|
debug("looking up %s", lookup->textname);
|
||||||
@@ -2096,24 +2123,15 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
|||||||
/* XXX Remove code dup from shutdown code */
|
/* XXX Remove code dup from shutdown code */
|
||||||
next_line:
|
next_line:
|
||||||
if (fgets(batchline, sizeof(batchline), batchfp) != 0) {
|
if (fgets(batchline, sizeof(batchline), batchfp) != 0) {
|
||||||
bargc = 1;
|
|
||||||
debug("batch line %s", batchline);
|
debug("batch line %s", batchline);
|
||||||
if (batchline[0] == '\r' || batchline[0] == '\n'
|
if (batchline[0] == '\r' || batchline[0] == '\n' ||
|
||||||
|| batchline[0] == '#' || batchline[0] == ';')
|
batchline[0] == '#' || batchline[0] == ';')
|
||||||
goto next_line;
|
goto next_line;
|
||||||
input = batchline;
|
bargc = split_batchline(batchline, bargv, 14,
|
||||||
bargv[bargc] = next_token(&input, " \t\r\n");
|
"batch argv");
|
||||||
while ((bargc < 14) && (bargv[bargc] != NULL)) {
|
|
||||||
bargc++;
|
|
||||||
bargv[bargc] = next_token(&input, " \t\r\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
bargv[0] = argv[0];
|
bargv[0] = argv[0];
|
||||||
argv0 = argv[0];
|
argv0 = argv[0];
|
||||||
|
parse_args(true, false, bargc, (char **)bargv);
|
||||||
for(i = 0; i < bargc; i++)
|
|
||||||
debug("batch argv %d: %s", i, bargv[i]);
|
|
||||||
parse_args(ISC_TRUE, ISC_FALSE, bargc, (char **)bargv);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@@ -2123,17 +2141,17 @@ parse_args(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
|||||||
*/
|
*/
|
||||||
if ((lookup_list.head == NULL) && !config_only) {
|
if ((lookup_list.head == NULL) && !config_only) {
|
||||||
if (need_clone)
|
if (need_clone)
|
||||||
lookup = clone_lookup(default_lookup, ISC_TRUE);
|
lookup = clone_lookup(default_lookup, true);
|
||||||
need_clone = ISC_TRUE;
|
need_clone = true;
|
||||||
lookup->trace_root = ISC_TF(lookup->trace ||
|
lookup->trace_root = (lookup->trace ||
|
||||||
lookup->ns_search_only);
|
lookup->ns_search_only);
|
||||||
lookup->new_search = ISC_TRUE;
|
lookup->new_search = true;
|
||||||
strlcpy(lookup->textname, ".", sizeof(lookup->textname));
|
strlcpy(lookup->textname, ".", sizeof(lookup->textname));
|
||||||
lookup->rdtype = dns_rdatatype_ns;
|
lookup->rdtype = dns_rdatatype_ns;
|
||||||
lookup->rdtypeset = ISC_TRUE;
|
lookup->rdtypeset = true;
|
||||||
if (firstarg) {
|
if (firstarg) {
|
||||||
printgreeting(argc, argv, lookup);
|
printgreeting(argc, argv, lookup);
|
||||||
firstarg = ISC_FALSE;
|
firstarg = false;
|
||||||
}
|
}
|
||||||
ISC_LIST_APPEND(lookup_list, lookup, link);
|
ISC_LIST_APPEND(lookup_list, lookup, link);
|
||||||
}
|
}
|
||||||
@@ -2151,8 +2169,6 @@ query_finished(void) {
|
|||||||
char batchline[MXNAME];
|
char batchline[MXNAME];
|
||||||
int bargc;
|
int bargc;
|
||||||
char *bargv[16];
|
char *bargv[16];
|
||||||
char *input;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
if (batchname == NULL) {
|
if (batchname == NULL) {
|
||||||
isc_app_shutdown();
|
isc_app_shutdown();
|
||||||
@@ -2170,19 +2186,9 @@ query_finished(void) {
|
|||||||
|
|
||||||
if (fgets(batchline, sizeof(batchline), batchfp) != 0) {
|
if (fgets(batchline, sizeof(batchline), batchfp) != 0) {
|
||||||
debug("batch line %s", batchline);
|
debug("batch line %s", batchline);
|
||||||
bargc = 1;
|
bargc = split_batchline(batchline, bargv, 14, "batch argv");
|
||||||
input = batchline;
|
|
||||||
bargv[bargc] = next_token(&input, " \t\r\n");
|
|
||||||
while ((bargc < 14) && (bargv[bargc] != NULL)) {
|
|
||||||
bargc++;
|
|
||||||
bargv[bargc] = next_token(&input, " \t\r\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
bargv[0] = argv0;
|
bargv[0] = argv0;
|
||||||
|
parse_args(true, false, bargc, (char **)bargv);
|
||||||
for(i = 0; i < bargc; i++)
|
|
||||||
debug("batch argv %d: %s", i, bargv[i]);
|
|
||||||
parse_args(ISC_TRUE, ISC_FALSE, bargc, (char **)bargv);
|
|
||||||
start_lookup();
|
start_lookup();
|
||||||
} else {
|
} else {
|
||||||
batchname = NULL;
|
batchname = NULL;
|
||||||
@@ -2219,7 +2225,7 @@ void dig_setup(int argc, char **argv)
|
|||||||
setup_system(ipv4only, ipv6only);
|
setup_system(ipv4only, ipv6only);
|
||||||
}
|
}
|
||||||
|
|
||||||
void dig_query_setup(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
void dig_query_setup(bool is_batchfile, bool config_only,
|
||||||
int argc, char **argv)
|
int argc, char **argv)
|
||||||
{
|
{
|
||||||
debug("dig_query_setup");
|
debug("dig_query_setup");
|
||||||
@@ -2231,7 +2237,7 @@ void dig_query_setup(isc_boolean_t is_batchfile, isc_boolean_t config_only,
|
|||||||
setup_text_key();
|
setup_text_key();
|
||||||
if (domainopt[0] != '\0') {
|
if (domainopt[0] != '\0') {
|
||||||
set_search_domain(domainopt);
|
set_search_domain(domainopt);
|
||||||
usesearch = ISC_TRUE;
|
usesearch = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2268,7 +2274,7 @@ int
|
|||||||
main(int argc, char **argv) {
|
main(int argc, char **argv) {
|
||||||
|
|
||||||
dig_setup(argc, argv);
|
dig_setup(argc, argv);
|
||||||
dig_query_setup(ISC_FALSE, ISC_FALSE, argc, argv);
|
dig_query_setup(false, false, argc, argv);
|
||||||
dig_startup();
|
dig_startup();
|
||||||
dig_shutdown();
|
dig_shutdown();
|
||||||
|
|
||||||
|
|||||||
+44
-15
@@ -275,9 +275,9 @@
|
|||||||
<term>-i</term>
|
<term>-i</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Do reverse IPv6 lookups using the obsolete RFC1886 IP6.INT
|
Do reverse IPv6 lookups using the obsolete RFC 1886 IP6.INT
|
||||||
domain, which is no longer in use. Obsolete bit string
|
domain, which is no longer in use. Obsolete bit string
|
||||||
label queries (RFC2874) are not attempted.
|
label queries (RFC 2874) are not attempted.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@@ -338,11 +338,12 @@
|
|||||||
<term>-t <replaceable class="parameter">type</replaceable></term>
|
<term>-t <replaceable class="parameter">type</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The resource record type to query. It can be any valid query type
|
The resource record type to query. It can be any valid query
|
||||||
which is
|
type. If it is a resource record type supported in BIND 9, it
|
||||||
supported in BIND 9. The default query type is "A", unless the
|
can be given by the type mnemonic (such as "NS" or "AAAA").
|
||||||
<option>-x</option> option is supplied to indicate a reverse lookup.
|
The default query type is "A", unless the <option>-x</option>
|
||||||
A zone transfer can be requested by specifying a type of AXFR. When
|
option is supplied to indicate a reverse lookup. A zone
|
||||||
|
transfer can be requested by specifying a type of AXFR. When
|
||||||
an incremental zone transfer (IXFR) is required, set the
|
an incremental zone transfer (IXFR) is required, set the
|
||||||
<parameter>type</parameter> to <literal>ixfr=N</literal>.
|
<parameter>type</parameter> to <literal>ixfr=N</literal>.
|
||||||
The incremental zone transfer will contain the changes
|
The incremental zone transfer will contain the changes
|
||||||
@@ -350,6 +351,12 @@
|
|||||||
record was
|
record was
|
||||||
<parameter>N</parameter>.
|
<parameter>N</parameter>.
|
||||||
</para>
|
</para>
|
||||||
|
<para>
|
||||||
|
All resource record types can be expressed as "TYPEnn", where
|
||||||
|
"nn" is the number of the type. If the resource record type is
|
||||||
|
not supported in BIND 9, the result will be displayed as
|
||||||
|
described in RFC 3597.
|
||||||
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@@ -953,6 +960,17 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>+[no]raflag</option></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Set [do not set] the RA (Recursion Available) bit in
|
||||||
|
the query. The default is +noraflag. This bit should
|
||||||
|
be ignored by the server for QUERY.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>+[no]rdflag</option></term>
|
<term><option>+[no]rdflag</option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
@@ -1044,7 +1062,7 @@
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
This feature is now obsolete and has been removed;
|
This feature is now obsolete and has been removed;
|
||||||
use <command>delv</command> instead.
|
use <command>delv</command> instead.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@@ -1096,6 +1114,17 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>+[no]tcflag</option></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Set [do not set] the TC (TrunCation) bit in the query.
|
||||||
|
The default is +notcflag. This bit should be ignored
|
||||||
|
by the server for QUERY.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>+[no]tcp</option></term>
|
<term><option>+[no]tcp</option></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
@@ -1129,8 +1158,8 @@
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
This feature is related to <command>dig +sigchase</command>,
|
This feature is related to <command>dig +sigchase</command>,
|
||||||
which is obsolete and has been removed. Use
|
which is obsolete and has been removed. Use
|
||||||
<command>delv</command> instead.
|
<command>delv</command> instead.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@@ -1175,9 +1204,9 @@
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Formerly specified trusted keys for use with
|
Formerly specified trusted keys for use with
|
||||||
<command>dig +sigchase</command>. This feature is now
|
<command>dig +sigchase</command>. This feature is now
|
||||||
obsolete and has been removed; use
|
obsolete and has been removed; use
|
||||||
<command>delv</command> instead.
|
<command>delv</command> instead.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@@ -1299,7 +1328,7 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
|
|||||||
<command>dig</command> appropriately converts character encoding of
|
<command>dig</command> appropriately converts character encoding of
|
||||||
domain name before sending a request to DNS server or displaying a
|
domain name before sending a request to DNS server or displaying a
|
||||||
reply from the server.
|
reply from the server.
|
||||||
If you'd like to turn off the IDN support for some reason, use
|
If you'd like to turn off the IDN support for some reason, use
|
||||||
parameters <parameter>+noidnin</parameter> and
|
parameters <parameter>+noidnin</parameter> and
|
||||||
<parameter>+noidnout</parameter>.
|
<parameter>+noidnout</parameter>.
|
||||||
</para>
|
</para>
|
||||||
@@ -1327,7 +1356,7 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
|
|||||||
<citerefentry>
|
<citerefentry>
|
||||||
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
|
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
|
||||||
</citerefentry>,
|
</citerefentry>,
|
||||||
<citetitle>RFC1035</citetitle>.
|
<citetitle>RFC 1035</citetitle>.
|
||||||
</para>
|
</para>
|
||||||
</refsection>
|
</refsection>
|
||||||
|
|
||||||
|
|||||||
+50
-19
@@ -230,9 +230,9 @@
|
|||||||
<dt><span class="term">-i</span></dt>
|
<dt><span class="term">-i</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
Do reverse IPv6 lookups using the obsolete RFC1886 IP6.INT
|
Do reverse IPv6 lookups using the obsolete RFC 1886 IP6.INT
|
||||||
domain, which is no longer in use. Obsolete bit string
|
domain, which is no longer in use. Obsolete bit string
|
||||||
label queries (RFC2874) are not attempted.
|
label queries (RFC 2874) are not attempted.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term">-k <em class="replaceable"><code>keyfile</code></em></span></dt>
|
<dt><span class="term">-k <em class="replaceable"><code>keyfile</code></em></span></dt>
|
||||||
@@ -277,11 +277,12 @@
|
|||||||
<dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt>
|
<dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
The resource record type to query. It can be any valid query type
|
The resource record type to query. It can be any valid query
|
||||||
which is
|
type. If it is a resource record type supported in BIND 9, it
|
||||||
supported in BIND 9. The default query type is "A", unless the
|
can be given by the type mnemonic (such as "NS" or "AAAA").
|
||||||
<code class="option">-x</code> option is supplied to indicate a reverse lookup.
|
The default query type is "A", unless the <code class="option">-x</code>
|
||||||
A zone transfer can be requested by specifying a type of AXFR. When
|
option is supplied to indicate a reverse lookup. A zone
|
||||||
|
transfer can be requested by specifying a type of AXFR. When
|
||||||
an incremental zone transfer (IXFR) is required, set the
|
an incremental zone transfer (IXFR) is required, set the
|
||||||
<em class="parameter"><code>type</code></em> to <code class="literal">ixfr=N</code>.
|
<em class="parameter"><code>type</code></em> to <code class="literal">ixfr=N</code>.
|
||||||
The incremental zone transfer will contain the changes
|
The incremental zone transfer will contain the changes
|
||||||
@@ -289,6 +290,12 @@
|
|||||||
record was
|
record was
|
||||||
<em class="parameter"><code>N</code></em>.
|
<em class="parameter"><code>N</code></em>.
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
All resource record types can be expressed as "TYPEnn", where
|
||||||
|
"nn" is the number of the type. If the resource record type is
|
||||||
|
not supported in BIND 9, the result will be displayed as
|
||||||
|
described in RFC 3597.
|
||||||
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term">-u</span></dt>
|
<dt><span class="term">-u</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
@@ -619,6 +626,14 @@
|
|||||||
server that provided the answer.
|
server that provided the answer.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt><span class="term"><code class="option">+[no]idnin</code></span></dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Process [do not process] IDN domain names on input.
|
||||||
|
This requires IDN SUPPORT to have been enabled at
|
||||||
|
compile time. The default is to process IDN input.
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
<dt><span class="term"><code class="option">+[no]idnout</code></span></dt>
|
<dt><span class="term"><code class="option">+[no]idnout</code></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
@@ -695,7 +710,8 @@
|
|||||||
attempts to find the authoritative name servers for
|
attempts to find the authoritative name servers for
|
||||||
the zone containing the name being looked up and
|
the zone containing the name being looked up and
|
||||||
display the SOA record that each name server has for
|
display the SOA record that each name server has for
|
||||||
the zone.
|
the zone. Addresses of servers that that did not
|
||||||
|
respond are also printed.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term"><code class="option">+[no]onesoa</code></span></dt>
|
<dt><span class="term"><code class="option">+[no]onesoa</code></span></dt>
|
||||||
@@ -742,6 +758,14 @@
|
|||||||
the question section as a comment.
|
the question section as a comment.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt><span class="term"><code class="option">+[no]raflag</code></span></dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Set [do not set] the RA (Recursion Available) bit in
|
||||||
|
the query. The default is +noraflag. This bit should
|
||||||
|
be ignored by the server for QUERY.
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
<dt><span class="term"><code class="option">+[no]rdflag</code></span></dt>
|
<dt><span class="term"><code class="option">+[no]rdflag</code></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
@@ -811,7 +835,7 @@
|
|||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
This feature is now obsolete and has been removed;
|
This feature is now obsolete and has been removed;
|
||||||
use <span class="command"><strong>delv</strong></span> instead.
|
use <span class="command"><strong>delv</strong></span> instead.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term"><code class="option">+split=W</code></span></dt>
|
<dt><span class="term"><code class="option">+split=W</code></span></dt>
|
||||||
@@ -852,6 +876,14 @@
|
|||||||
this query.
|
this query.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt><span class="term"><code class="option">+[no]tcflag</code></span></dt>
|
||||||
|
<dd>
|
||||||
|
<p>
|
||||||
|
Set [do not set] the TC (TrunCation) bit in the query.
|
||||||
|
The default is +notcflag. This bit should be ignored
|
||||||
|
by the server for QUERY.
|
||||||
|
</p>
|
||||||
|
</dd>
|
||||||
<dt><span class="term"><code class="option">+[no]tcp</code></span></dt>
|
<dt><span class="term"><code class="option">+[no]tcp</code></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
@@ -878,8 +910,8 @@
|
|||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
This feature is related to <span class="command"><strong>dig +sigchase</strong></span>,
|
This feature is related to <span class="command"><strong>dig +sigchase</strong></span>,
|
||||||
which is obsolete and has been removed. Use
|
which is obsolete and has been removed. Use
|
||||||
<span class="command"><strong>delv</strong></span> instead.
|
<span class="command"><strong>delv</strong></span> instead.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term"><code class="option">+[no]trace</code></span></dt>
|
<dt><span class="term"><code class="option">+[no]trace</code></span></dt>
|
||||||
@@ -915,9 +947,9 @@
|
|||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
Formerly specified trusted keys for use with
|
Formerly specified trusted keys for use with
|
||||||
<span class="command"><strong>dig +sigchase</strong></span>. This feature is now
|
<span class="command"><strong>dig +sigchase</strong></span>. This feature is now
|
||||||
obsolete and has been removed; use
|
obsolete and has been removed; use
|
||||||
<span class="command"><strong>delv</strong></span> instead.
|
<span class="command"><strong>delv</strong></span> instead.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term"><code class="option">+[no]ttlid</code></span></dt>
|
<dt><span class="term"><code class="option">+[no]ttlid</code></span></dt>
|
||||||
@@ -1027,10 +1059,9 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
|
|||||||
<span class="command"><strong>dig</strong></span> appropriately converts character encoding of
|
<span class="command"><strong>dig</strong></span> appropriately converts character encoding of
|
||||||
domain name before sending a request to DNS server or displaying a
|
domain name before sending a request to DNS server or displaying a
|
||||||
reply from the server.
|
reply from the server.
|
||||||
If you'd like to turn off the IDN support for some reason, defines
|
If you'd like to turn off the IDN support for some reason, use
|
||||||
the <code class="envar">IDN_DISABLE</code> environment variable.
|
parameters <em class="parameter"><code>+noidnin</code></em> and
|
||||||
The IDN support is disabled if the variable is set when
|
<em class="parameter"><code>+noidnout</code></em>.
|
||||||
<span class="command"><strong>dig</strong></span> runs.
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -1058,7 +1089,7 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
|
|||||||
<span class="citerefentry">
|
<span class="citerefentry">
|
||||||
<span class="refentrytitle">dnssec-keygen</span>(8)
|
<span class="refentrytitle">dnssec-keygen</span>(8)
|
||||||
</span>,
|
</span>,
|
||||||
<em class="citetitle">RFC1035</em>.
|
<em class="citetitle">RFC 1035</em>.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
+429
-447
File diff suppressed because it is too large
Load Diff
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -274,5 +274,5 @@ runs\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2000-2002, 2004, 2005, 2007-2009, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2000-2002, 2004, 2005, 2007-2009, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
+88
-86
@@ -12,6 +12,9 @@
|
|||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
@@ -40,14 +43,14 @@
|
|||||||
|
|
||||||
#include <dig/dig.h>
|
#include <dig/dig.h>
|
||||||
|
|
||||||
static isc_boolean_t short_form = ISC_TRUE, listed_server = ISC_FALSE;
|
static bool short_form = true, listed_server = false;
|
||||||
static isc_boolean_t default_lookups = ISC_TRUE;
|
static bool default_lookups = true;
|
||||||
static int seen_error = -1;
|
static int seen_error = -1;
|
||||||
static isc_boolean_t list_addresses = ISC_TRUE;
|
static bool list_addresses = true;
|
||||||
static isc_boolean_t list_almost_all = ISC_FALSE;
|
static bool list_almost_all = false;
|
||||||
static dns_rdatatype_t list_type = dns_rdatatype_a;
|
static dns_rdatatype_t list_type = dns_rdatatype_a;
|
||||||
static isc_boolean_t printed_server = ISC_FALSE;
|
static bool printed_server = false;
|
||||||
static isc_boolean_t ipv4only = ISC_FALSE, ipv6only = ISC_FALSE;
|
static bool ipv4only = false, ipv6only = false;
|
||||||
|
|
||||||
static const char *opcodetext[] = {
|
static const char *opcodetext[] = {
|
||||||
"QUERY",
|
"QUERY",
|
||||||
@@ -224,7 +227,7 @@ say_message(dns_name_t *name, const char *msg, dns_rdata_t *rdata,
|
|||||||
|
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
printsection(dns_message_t *msg, dns_section_t sectionid,
|
printsection(dns_message_t *msg, dns_section_t sectionid,
|
||||||
const char *section_name, isc_boolean_t headers,
|
const char *section_name, bool headers,
|
||||||
dig_query_t *query)
|
dig_query_t *query)
|
||||||
{
|
{
|
||||||
dns_name_t *name, *print_name;
|
dns_name_t *name, *print_name;
|
||||||
@@ -235,13 +238,13 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
|
|||||||
isc_region_t r;
|
isc_region_t r;
|
||||||
dns_name_t empty_name;
|
dns_name_t empty_name;
|
||||||
char tbuf[4096];
|
char tbuf[4096];
|
||||||
isc_boolean_t first;
|
bool first;
|
||||||
isc_boolean_t no_rdata;
|
bool no_rdata;
|
||||||
|
|
||||||
if (sectionid == DNS_SECTION_QUESTION)
|
if (sectionid == DNS_SECTION_QUESTION)
|
||||||
no_rdata = ISC_TRUE;
|
no_rdata = true;
|
||||||
else
|
else
|
||||||
no_rdata = ISC_FALSE;
|
no_rdata = false;
|
||||||
|
|
||||||
if (headers)
|
if (headers)
|
||||||
printf(";; %s SECTION:\n", section_name);
|
printf(";; %s SECTION:\n", section_name);
|
||||||
@@ -259,7 +262,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
|
|||||||
dns_message_currentname(msg, sectionid, &name);
|
dns_message_currentname(msg, sectionid, &name);
|
||||||
|
|
||||||
isc_buffer_init(&target, tbuf, sizeof(tbuf));
|
isc_buffer_init(&target, tbuf, sizeof(tbuf));
|
||||||
first = ISC_TRUE;
|
first = true;
|
||||||
print_name = name;
|
print_name = name;
|
||||||
|
|
||||||
for (rdataset = ISC_LIST_HEAD(name->list);
|
for (rdataset = ISC_LIST_HEAD(name->list);
|
||||||
@@ -283,7 +286,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
|
|||||||
if (!short_form) {
|
if (!short_form) {
|
||||||
result = dns_rdataset_totext(rdataset,
|
result = dns_rdataset_totext(rdataset,
|
||||||
print_name,
|
print_name,
|
||||||
ISC_FALSE,
|
false,
|
||||||
no_rdata,
|
no_rdata,
|
||||||
&target);
|
&target);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
@@ -291,7 +294,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
|
|||||||
#ifdef USEINITALWS
|
#ifdef USEINITALWS
|
||||||
if (first) {
|
if (first) {
|
||||||
print_name = &empty_name;
|
print_name = &empty_name;
|
||||||
first = ISC_FALSE;
|
first = false;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
UNUSED(first); /* Shut up compiler. */
|
UNUSED(first); /* Shut up compiler. */
|
||||||
@@ -350,7 +353,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid,
|
|||||||
static isc_result_t
|
static isc_result_t
|
||||||
printrdata(dns_message_t *msg, dns_rdataset_t *rdataset,
|
printrdata(dns_message_t *msg, dns_rdataset_t *rdataset,
|
||||||
const dns_name_t *owner, const char *set_name,
|
const dns_name_t *owner, const char *set_name,
|
||||||
isc_boolean_t headers)
|
bool headers)
|
||||||
{
|
{
|
||||||
isc_buffer_t target;
|
isc_buffer_t target;
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
@@ -363,7 +366,7 @@ printrdata(dns_message_t *msg, dns_rdataset_t *rdataset,
|
|||||||
|
|
||||||
isc_buffer_init(&target, tbuf, sizeof(tbuf));
|
isc_buffer_init(&target, tbuf, sizeof(tbuf));
|
||||||
|
|
||||||
result = dns_rdataset_totext(rdataset, owner, ISC_FALSE, ISC_FALSE,
|
result = dns_rdataset_totext(rdataset, owner, false, false,
|
||||||
&target);
|
&target);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
return (result);
|
return (result);
|
||||||
@@ -400,8 +403,8 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
|
||||||
isc_boolean_t did_flag = ISC_FALSE;
|
bool did_flag = false;
|
||||||
dns_rdataset_t *opt, *tsig = NULL;
|
dns_rdataset_t *opt, *tsig = NULL;
|
||||||
const dns_name_t *tsigname;
|
const dns_name_t *tsigname;
|
||||||
isc_result_t result = ISC_R_SUCCESS;
|
isc_result_t result = ISC_R_SUCCESS;
|
||||||
@@ -424,7 +427,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
|||||||
sizeof(sockstr));
|
sizeof(sockstr));
|
||||||
printf("Address: %s\n", sockstr);
|
printf("Address: %s\n", sockstr);
|
||||||
printf("Aliases: \n\n");
|
printf("Aliases: \n\n");
|
||||||
printed_server = ISC_TRUE;
|
printed_server = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (msg->rcode != 0) {
|
if (msg->rcode != 0) {
|
||||||
@@ -452,27 +455,26 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
|||||||
dns_name_t *name;
|
dns_name_t *name;
|
||||||
|
|
||||||
/* Add AAAA and MX lookups. */
|
/* Add AAAA and MX lookups. */
|
||||||
dns_fixedname_init(&fixed);
|
name = dns_fixedname_initname(&fixed);
|
||||||
name = dns_fixedname_name(&fixed);
|
|
||||||
dns_name_copy(query->lookup->name, name, NULL);
|
dns_name_copy(query->lookup->name, name, NULL);
|
||||||
chase_cnamechain(msg, name);
|
chase_cnamechain(msg, name);
|
||||||
dns_name_format(name, namestr, sizeof(namestr));
|
dns_name_format(name, namestr, sizeof(namestr));
|
||||||
lookup = clone_lookup(query->lookup, ISC_FALSE);
|
lookup = clone_lookup(query->lookup, false);
|
||||||
if (lookup != NULL) {
|
if (lookup != NULL) {
|
||||||
strlcpy(lookup->textname, namestr,
|
strlcpy(lookup->textname, namestr,
|
||||||
sizeof(lookup->textname));
|
sizeof(lookup->textname));
|
||||||
lookup->rdtype = dns_rdatatype_aaaa;
|
lookup->rdtype = dns_rdatatype_aaaa;
|
||||||
lookup->rdtypeset = ISC_TRUE;
|
lookup->rdtypeset = true;
|
||||||
lookup->origin = NULL;
|
lookup->origin = NULL;
|
||||||
lookup->retries = tries;
|
lookup->retries = tries;
|
||||||
ISC_LIST_APPEND(lookup_list, lookup, link);
|
ISC_LIST_APPEND(lookup_list, lookup, link);
|
||||||
}
|
}
|
||||||
lookup = clone_lookup(query->lookup, ISC_FALSE);
|
lookup = clone_lookup(query->lookup, false);
|
||||||
if (lookup != NULL) {
|
if (lookup != NULL) {
|
||||||
strlcpy(lookup->textname, namestr,
|
strlcpy(lookup->textname, namestr,
|
||||||
sizeof(lookup->textname));
|
sizeof(lookup->textname));
|
||||||
lookup->rdtype = dns_rdatatype_mx;
|
lookup->rdtype = dns_rdatatype_mx;
|
||||||
lookup->rdtypeset = ISC_TRUE;
|
lookup->rdtypeset = true;
|
||||||
lookup->origin = NULL;
|
lookup->origin = NULL;
|
||||||
lookup->retries = tries;
|
lookup->retries = tries;
|
||||||
ISC_LIST_APPEND(lookup_list, lookup, link);
|
ISC_LIST_APPEND(lookup_list, lookup, link);
|
||||||
@@ -486,31 +488,31 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
|||||||
printf(";; flags: ");
|
printf(";; flags: ");
|
||||||
if ((msg->flags & DNS_MESSAGEFLAG_QR) != 0) {
|
if ((msg->flags & DNS_MESSAGEFLAG_QR) != 0) {
|
||||||
printf("qr");
|
printf("qr");
|
||||||
did_flag = ISC_TRUE;
|
did_flag = true;
|
||||||
}
|
}
|
||||||
if ((msg->flags & DNS_MESSAGEFLAG_AA) != 0) {
|
if ((msg->flags & DNS_MESSAGEFLAG_AA) != 0) {
|
||||||
printf("%saa", did_flag ? " " : "");
|
printf("%saa", did_flag ? " " : "");
|
||||||
did_flag = ISC_TRUE;
|
did_flag = true;
|
||||||
}
|
}
|
||||||
if ((msg->flags & DNS_MESSAGEFLAG_TC) != 0) {
|
if ((msg->flags & DNS_MESSAGEFLAG_TC) != 0) {
|
||||||
printf("%stc", did_flag ? " " : "");
|
printf("%stc", did_flag ? " " : "");
|
||||||
did_flag = ISC_TRUE;
|
did_flag = true;
|
||||||
}
|
}
|
||||||
if ((msg->flags & DNS_MESSAGEFLAG_RD) != 0) {
|
if ((msg->flags & DNS_MESSAGEFLAG_RD) != 0) {
|
||||||
printf("%srd", did_flag ? " " : "");
|
printf("%srd", did_flag ? " " : "");
|
||||||
did_flag = ISC_TRUE;
|
did_flag = true;
|
||||||
}
|
}
|
||||||
if ((msg->flags & DNS_MESSAGEFLAG_RA) != 0) {
|
if ((msg->flags & DNS_MESSAGEFLAG_RA) != 0) {
|
||||||
printf("%sra", did_flag ? " " : "");
|
printf("%sra", did_flag ? " " : "");
|
||||||
did_flag = ISC_TRUE;
|
did_flag = true;
|
||||||
}
|
}
|
||||||
if ((msg->flags & DNS_MESSAGEFLAG_AD) != 0) {
|
if ((msg->flags & DNS_MESSAGEFLAG_AD) != 0) {
|
||||||
printf("%sad", did_flag ? " " : "");
|
printf("%sad", did_flag ? " " : "");
|
||||||
did_flag = ISC_TRUE;
|
did_flag = true;
|
||||||
}
|
}
|
||||||
if ((msg->flags & DNS_MESSAGEFLAG_CD) != 0) {
|
if ((msg->flags & DNS_MESSAGEFLAG_CD) != 0) {
|
||||||
printf("%scd", did_flag ? " " : "");
|
printf("%scd", did_flag ? " " : "");
|
||||||
did_flag = ISC_TRUE;
|
did_flag = true;
|
||||||
POST(did_flag);
|
POST(did_flag);
|
||||||
}
|
}
|
||||||
printf("; QUERY: %u, ANSWER: %u, "
|
printf("; QUERY: %u, ANSWER: %u, "
|
||||||
@@ -533,7 +535,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
|||||||
!short_form) {
|
!short_form) {
|
||||||
printf("\n");
|
printf("\n");
|
||||||
result = printsection(msg, DNS_SECTION_QUESTION, "QUESTION",
|
result = printsection(msg, DNS_SECTION_QUESTION, "QUESTION",
|
||||||
ISC_TRUE, query);
|
true, query);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
@@ -541,7 +543,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
|||||||
if (!short_form)
|
if (!short_form)
|
||||||
printf("\n");
|
printf("\n");
|
||||||
result = printsection(msg, DNS_SECTION_ANSWER, "ANSWER",
|
result = printsection(msg, DNS_SECTION_ANSWER, "ANSWER",
|
||||||
ISC_TF(!short_form), query);
|
!short_form, query);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
@@ -550,7 +552,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
|||||||
!short_form) {
|
!short_form) {
|
||||||
printf("\n");
|
printf("\n");
|
||||||
result = printsection(msg, DNS_SECTION_AUTHORITY, "AUTHORITY",
|
result = printsection(msg, DNS_SECTION_AUTHORITY, "AUTHORITY",
|
||||||
ISC_TRUE, query);
|
true, query);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
@@ -558,14 +560,14 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
|||||||
!short_form) {
|
!short_form) {
|
||||||
printf("\n");
|
printf("\n");
|
||||||
result = printsection(msg, DNS_SECTION_ADDITIONAL,
|
result = printsection(msg, DNS_SECTION_ADDITIONAL,
|
||||||
"ADDITIONAL", ISC_TRUE, query);
|
"ADDITIONAL", true, query);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
if ((tsig != NULL) && !short_form) {
|
if ((tsig != NULL) && !short_form) {
|
||||||
printf("\n");
|
printf("\n");
|
||||||
result = printrdata(msg, tsig, tsigname,
|
result = printrdata(msg, tsig, tsigname,
|
||||||
"PSEUDOSECTION TSIG", ISC_TRUE);
|
"PSEUDOSECTION TSIG", true);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
@@ -600,7 +602,7 @@ pre_parse_args(int argc, char **argv) {
|
|||||||
while ((c = isc_commandline_parse(argc, argv, optstring)) != -1) {
|
while ((c = isc_commandline_parse(argc, argv, optstring)) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'm':
|
case 'm':
|
||||||
memdebugging = ISC_TRUE;
|
memdebugging = true;
|
||||||
if (strcasecmp("trace", isc_commandline_argument) == 0)
|
if (strcasecmp("trace", isc_commandline_argument) == 0)
|
||||||
isc_mem_debugging |= ISC_MEM_DEBUGTRACE;
|
isc_mem_debugging |= ISC_MEM_DEBUGTRACE;
|
||||||
else if (strcasecmp("record",
|
else if (strcasecmp("record",
|
||||||
@@ -614,12 +616,12 @@ pre_parse_args(int argc, char **argv) {
|
|||||||
case '4':
|
case '4':
|
||||||
if (ipv6only)
|
if (ipv6only)
|
||||||
fatal("only one of -4 and -6 allowed");
|
fatal("only one of -4 and -6 allowed");
|
||||||
ipv4only = ISC_TRUE;
|
ipv4only = true;
|
||||||
break;
|
break;
|
||||||
case '6':
|
case '6':
|
||||||
if (ipv4only)
|
if (ipv4only)
|
||||||
fatal("only one of -4 and -6 allowed");
|
fatal("only one of -4 and -6 allowed");
|
||||||
ipv6only = ISC_TRUE;
|
ipv6only = true;
|
||||||
break;
|
break;
|
||||||
case 'a': break;
|
case 'a': break;
|
||||||
case 'A': break;
|
case 'A': break;
|
||||||
@@ -640,8 +642,8 @@ pre_parse_args(int argc, char **argv) {
|
|||||||
case 'C': break;
|
case 'C': break;
|
||||||
case 'D':
|
case 'D':
|
||||||
if (debugging)
|
if (debugging)
|
||||||
debugtiming = ISC_TRUE;
|
debugtiming = true;
|
||||||
debugging = ISC_TRUE;
|
debugging = true;
|
||||||
break;
|
break;
|
||||||
case 'N': break;
|
case 'N': break;
|
||||||
case 'R': break;
|
case 'R': break;
|
||||||
@@ -651,12 +653,12 @@ pre_parse_args(int argc, char **argv) {
|
|||||||
show_usage();
|
show_usage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
isc_commandline_reset = ISC_TRUE;
|
isc_commandline_reset = true;
|
||||||
isc_commandline_index = 1;
|
isc_commandline_index = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
|
parse_args(bool is_batchfile, int argc, char **argv) {
|
||||||
char hostname[MXNAME];
|
char hostname[MXNAME];
|
||||||
dig_lookup_t *lookup;
|
dig_lookup_t *lookup;
|
||||||
int c;
|
int c;
|
||||||
@@ -665,30 +667,30 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
|
|||||||
isc_result_t result = ISC_R_SUCCESS;
|
isc_result_t result = ISC_R_SUCCESS;
|
||||||
dns_rdatatype_t rdtype;
|
dns_rdatatype_t rdtype;
|
||||||
dns_rdataclass_t rdclass;
|
dns_rdataclass_t rdclass;
|
||||||
isc_uint32_t serial = 0;
|
uint32_t serial = 0;
|
||||||
|
|
||||||
UNUSED(is_batchfile);
|
UNUSED(is_batchfile);
|
||||||
|
|
||||||
lookup = make_empty_lookup();
|
lookup = make_empty_lookup();
|
||||||
|
|
||||||
lookup->servfail_stops = ISC_FALSE;
|
lookup->servfail_stops = false;
|
||||||
lookup->comments = ISC_FALSE;
|
lookup->comments = false;
|
||||||
short_form = !verbose;
|
short_form = !verbose;
|
||||||
|
|
||||||
while ((c = isc_commandline_parse(argc, argv, optstring)) != -1) {
|
while ((c = isc_commandline_parse(argc, argv, optstring)) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'l':
|
case 'l':
|
||||||
lookup->tcp_mode = ISC_TRUE;
|
lookup->tcp_mode = true;
|
||||||
lookup->rdtype = dns_rdatatype_axfr;
|
lookup->rdtype = dns_rdatatype_axfr;
|
||||||
lookup->rdtypeset = ISC_TRUE;
|
lookup->rdtypeset = true;
|
||||||
fatalexit = 3;
|
fatalexit = 3;
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
case 'd':
|
case 'd':
|
||||||
short_form = ISC_FALSE;
|
short_form = false;
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
lookup->recurse = ISC_FALSE;
|
lookup->recurse = false;
|
||||||
break;
|
break;
|
||||||
case 't':
|
case 't':
|
||||||
if (strncasecmp(isc_commandline_argument,
|
if (strncasecmp(isc_commandline_argument,
|
||||||
@@ -713,23 +715,23 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
|
|||||||
if (!lookup->rdtypeset ||
|
if (!lookup->rdtypeset ||
|
||||||
lookup->rdtype != dns_rdatatype_axfr)
|
lookup->rdtype != dns_rdatatype_axfr)
|
||||||
lookup->rdtype = rdtype;
|
lookup->rdtype = rdtype;
|
||||||
lookup->rdtypeset = ISC_TRUE;
|
lookup->rdtypeset = true;
|
||||||
if (rdtype == dns_rdatatype_axfr) {
|
if (rdtype == dns_rdatatype_axfr) {
|
||||||
/* -l -t any -v */
|
/* -l -t any -v */
|
||||||
list_type = dns_rdatatype_any;
|
list_type = dns_rdatatype_any;
|
||||||
short_form = ISC_FALSE;
|
short_form = false;
|
||||||
lookup->tcp_mode = ISC_TRUE;
|
lookup->tcp_mode = true;
|
||||||
} else if (rdtype == dns_rdatatype_ixfr) {
|
} else if (rdtype == dns_rdatatype_ixfr) {
|
||||||
lookup->ixfr_serial = serial;
|
lookup->ixfr_serial = serial;
|
||||||
lookup->tcp_mode = ISC_TRUE;
|
lookup->tcp_mode = true;
|
||||||
list_type = rdtype;
|
list_type = rdtype;
|
||||||
} else if (rdtype == dns_rdatatype_any) {
|
} else if (rdtype == dns_rdatatype_any) {
|
||||||
if (!lookup->tcp_mode_set)
|
if (!lookup->tcp_mode_set)
|
||||||
lookup->tcp_mode = ISC_TRUE;
|
lookup->tcp_mode = true;
|
||||||
} else
|
} else
|
||||||
list_type = rdtype;
|
list_type = rdtype;
|
||||||
list_addresses = ISC_FALSE;
|
list_addresses = false;
|
||||||
default_lookups = ISC_FALSE;
|
default_lookups = false;
|
||||||
break;
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
tr.base = isc_commandline_argument;
|
tr.base = isc_commandline_argument;
|
||||||
@@ -743,25 +745,25 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
|
|||||||
isc_commandline_argument);
|
isc_commandline_argument);
|
||||||
} else {
|
} else {
|
||||||
lookup->rdclass = rdclass;
|
lookup->rdclass = rdclass;
|
||||||
lookup->rdclassset = ISC_TRUE;
|
lookup->rdclassset = true;
|
||||||
}
|
}
|
||||||
default_lookups = ISC_FALSE;
|
default_lookups = false;
|
||||||
break;
|
break;
|
||||||
case 'A':
|
case 'A':
|
||||||
list_almost_all = ISC_TRUE;
|
list_almost_all = true;
|
||||||
/* FALL THROUGH */
|
/* FALL THROUGH */
|
||||||
case 'a':
|
case 'a':
|
||||||
if (!lookup->rdtypeset ||
|
if (!lookup->rdtypeset ||
|
||||||
lookup->rdtype != dns_rdatatype_axfr)
|
lookup->rdtype != dns_rdatatype_axfr)
|
||||||
lookup->rdtype = dns_rdatatype_any;
|
lookup->rdtype = dns_rdatatype_any;
|
||||||
list_type = dns_rdatatype_any;
|
list_type = dns_rdatatype_any;
|
||||||
list_addresses = ISC_FALSE;
|
list_addresses = false;
|
||||||
lookup->rdtypeset = ISC_TRUE;
|
lookup->rdtypeset = true;
|
||||||
short_form = ISC_FALSE;
|
short_form = false;
|
||||||
default_lookups = ISC_FALSE;
|
default_lookups = false;
|
||||||
break;
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
lookup->ip6_int = ISC_TRUE;
|
lookup->ip6_int = true;
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
/* deprecated */
|
/* deprecated */
|
||||||
@@ -787,23 +789,23 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
|
|||||||
tries = 2;
|
tries = 2;
|
||||||
break;
|
break;
|
||||||
case 'T':
|
case 'T':
|
||||||
lookup->tcp_mode = ISC_TRUE;
|
lookup->tcp_mode = true;
|
||||||
lookup->tcp_mode_set = ISC_TRUE;
|
lookup->tcp_mode_set = true;
|
||||||
break;
|
break;
|
||||||
case 'U':
|
case 'U':
|
||||||
lookup->tcp_mode = ISC_FALSE;
|
lookup->tcp_mode = false;
|
||||||
lookup->tcp_mode_set = ISC_TRUE;
|
lookup->tcp_mode_set = true;
|
||||||
break;
|
break;
|
||||||
case 'C':
|
case 'C':
|
||||||
debug("showing all SOAs");
|
debug("showing all SOAs");
|
||||||
lookup->rdtype = dns_rdatatype_ns;
|
lookup->rdtype = dns_rdatatype_ns;
|
||||||
lookup->rdtypeset = ISC_TRUE;
|
lookup->rdtypeset = true;
|
||||||
lookup->rdclass = dns_rdataclass_in;
|
lookup->rdclass = dns_rdataclass_in;
|
||||||
lookup->rdclassset = ISC_TRUE;
|
lookup->rdclassset = true;
|
||||||
lookup->ns_search_only = ISC_TRUE;
|
lookup->ns_search_only = true;
|
||||||
lookup->trace_root = ISC_TRUE;
|
lookup->trace_root = true;
|
||||||
lookup->identify_previous_line = ISC_TRUE;
|
lookup->identify_previous_line = true;
|
||||||
default_lookups = ISC_FALSE;
|
default_lookups = false;
|
||||||
break;
|
break;
|
||||||
case 'N':
|
case 'N':
|
||||||
debug("setting NDOTS to %s",
|
debug("setting NDOTS to %s",
|
||||||
@@ -820,7 +822,7 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
|
|||||||
/* Handled by pre_parse_args(). */
|
/* Handled by pre_parse_args(). */
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
lookup->servfail_stops = ISC_TRUE;
|
lookup->servfail_stops = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -835,22 +837,22 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
|
|||||||
if (argc > isc_commandline_index + 1) {
|
if (argc > isc_commandline_index + 1) {
|
||||||
set_nameserver(argv[isc_commandline_index+1]);
|
set_nameserver(argv[isc_commandline_index+1]);
|
||||||
debug("server is %s", argv[isc_commandline_index+1]);
|
debug("server is %s", argv[isc_commandline_index+1]);
|
||||||
listed_server = ISC_TRUE;
|
listed_server = true;
|
||||||
} else
|
} else
|
||||||
check_ra = ISC_TRUE;
|
check_ra = true;
|
||||||
|
|
||||||
lookup->pending = ISC_FALSE;
|
lookup->pending = false;
|
||||||
if (get_reverse(store, sizeof(store), hostname,
|
if (get_reverse(store, sizeof(store), hostname,
|
||||||
lookup->ip6_int, ISC_TRUE) == ISC_R_SUCCESS) {
|
lookup->ip6_int, true) == ISC_R_SUCCESS) {
|
||||||
strlcpy(lookup->textname, store, sizeof(lookup->textname));
|
strlcpy(lookup->textname, store, sizeof(lookup->textname));
|
||||||
lookup->rdtype = dns_rdatatype_ptr;
|
lookup->rdtype = dns_rdatatype_ptr;
|
||||||
lookup->rdtypeset = ISC_TRUE;
|
lookup->rdtypeset = true;
|
||||||
default_lookups = ISC_FALSE;
|
default_lookups = false;
|
||||||
} else {
|
} else {
|
||||||
strlcpy(lookup->textname, hostname, sizeof(lookup->textname));
|
strlcpy(lookup->textname, hostname, sizeof(lookup->textname));
|
||||||
usesearch = ISC_TRUE;
|
usesearch = true;
|
||||||
}
|
}
|
||||||
lookup->new_search = ISC_TRUE;
|
lookup->new_search = true;
|
||||||
ISC_LIST_APPEND(lookup_list, lookup, link);
|
ISC_LIST_APPEND(lookup_list, lookup, link);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -879,7 +881,7 @@ main(int argc, char **argv) {
|
|||||||
check_result(result, "isc_app_start");
|
check_result(result, "isc_app_start");
|
||||||
setup_libs();
|
setup_libs();
|
||||||
setup_system(ipv4only, ipv6only);
|
setup_system(ipv4only, ipv6only);
|
||||||
parse_args(ISC_FALSE, argc, argv);
|
parse_args(false, argc, argv);
|
||||||
if (keyfile[0] != 0)
|
if (keyfile[0] != 0)
|
||||||
setup_file_key();
|
setup_file_key();
|
||||||
else if (keysecret[0] != 0)
|
else if (keysecret[0] != 0)
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2000-2002, 2004, 2005, 2007-2009, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
|||||||
+38
-37
@@ -14,11 +14,13 @@
|
|||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include <dns/rdatalist.h>
|
#include <dns/rdatalist.h>
|
||||||
|
|
||||||
#include <dst/dst.h>
|
#include <dst/dst.h>
|
||||||
|
|
||||||
#include <isc/boolean.h>
|
|
||||||
#include <isc/buffer.h>
|
#include <isc/buffer.h>
|
||||||
#include <isc/bufferlist.h>
|
#include <isc/bufferlist.h>
|
||||||
#include <isc/formatcheck.h>
|
#include <isc/formatcheck.h>
|
||||||
@@ -81,7 +83,7 @@ typedef struct dig_searchlist dig_searchlist_t;
|
|||||||
|
|
||||||
/*% The dig_lookup structure */
|
/*% The dig_lookup structure */
|
||||||
struct dig_lookup {
|
struct dig_lookup {
|
||||||
isc_boolean_t
|
bool
|
||||||
pending, /*%< Pending a successful answer */
|
pending, /*%< Pending a successful answer */
|
||||||
waiting_connect,
|
waiting_connect,
|
||||||
doing_xfr,
|
doing_xfr,
|
||||||
@@ -94,6 +96,8 @@ struct dig_lookup {
|
|||||||
aaonly,
|
aaonly,
|
||||||
adflag,
|
adflag,
|
||||||
cdflag,
|
cdflag,
|
||||||
|
raflag,
|
||||||
|
tcflag,
|
||||||
zflag,
|
zflag,
|
||||||
trace, /*% dig +trace */
|
trace, /*% dig +trace */
|
||||||
trace_root, /*% initial query for either +trace or +nssearch */
|
trace_root, /*% initial query for either +trace or +nssearch */
|
||||||
@@ -137,8 +141,8 @@ struct dig_lookup {
|
|||||||
dns_rdatatype_t rdtype;
|
dns_rdatatype_t rdtype;
|
||||||
dns_rdatatype_t qrdtype;
|
dns_rdatatype_t qrdtype;
|
||||||
dns_rdataclass_t rdclass;
|
dns_rdataclass_t rdclass;
|
||||||
isc_boolean_t rdtypeset;
|
bool rdtypeset;
|
||||||
isc_boolean_t rdclassset;
|
bool rdclassset;
|
||||||
char name_space[BUFSIZE];
|
char name_space[BUFSIZE];
|
||||||
char oname_space[BUFSIZE];
|
char oname_space[BUFSIZE];
|
||||||
isc_buffer_t namebuf;
|
isc_buffer_t namebuf;
|
||||||
@@ -156,17 +160,17 @@ struct dig_lookup {
|
|||||||
dig_serverlist_t my_server_list;
|
dig_serverlist_t my_server_list;
|
||||||
dig_searchlist_t *origin;
|
dig_searchlist_t *origin;
|
||||||
dig_query_t *xfr_q;
|
dig_query_t *xfr_q;
|
||||||
isc_uint32_t retries;
|
uint32_t retries;
|
||||||
int nsfound;
|
int nsfound;
|
||||||
isc_uint16_t udpsize;
|
uint16_t udpsize;
|
||||||
isc_int16_t edns;
|
int16_t edns;
|
||||||
isc_int16_t padding;
|
int16_t padding;
|
||||||
isc_uint32_t ixfr_serial;
|
uint32_t ixfr_serial;
|
||||||
isc_buffer_t rdatabuf;
|
isc_buffer_t rdatabuf;
|
||||||
char rdatastore[MXNAME];
|
char rdatastore[MXNAME];
|
||||||
dst_context_t *tsigctx;
|
dst_context_t *tsigctx;
|
||||||
isc_buffer_t *querysig;
|
isc_buffer_t *querysig;
|
||||||
isc_uint32_t msgcounter;
|
uint32_t msgcounter;
|
||||||
dns_fixedname_t fdomain;
|
dns_fixedname_t fdomain;
|
||||||
isc_sockaddr_t *ecs_addr;
|
isc_sockaddr_t *ecs_addr;
|
||||||
char *cookie;
|
char *cookie;
|
||||||
@@ -182,7 +186,7 @@ struct dig_lookup {
|
|||||||
/*% The dig_query structure */
|
/*% The dig_query structure */
|
||||||
struct dig_query {
|
struct dig_query {
|
||||||
dig_lookup_t *lookup;
|
dig_lookup_t *lookup;
|
||||||
isc_boolean_t waiting_connect,
|
bool waiting_connect,
|
||||||
pending_free,
|
pending_free,
|
||||||
waiting_senddone,
|
waiting_senddone,
|
||||||
first_pass,
|
first_pass,
|
||||||
@@ -192,11 +196,11 @@ struct dig_query {
|
|||||||
recv_made,
|
recv_made,
|
||||||
warn_id,
|
warn_id,
|
||||||
timedout;
|
timedout;
|
||||||
isc_uint32_t first_rr_serial;
|
uint32_t first_rr_serial;
|
||||||
isc_uint32_t second_rr_serial;
|
uint32_t second_rr_serial;
|
||||||
isc_uint32_t msg_count;
|
uint32_t msg_count;
|
||||||
isc_uint32_t rr_count;
|
uint32_t rr_count;
|
||||||
isc_boolean_t ixfr_axfr;
|
bool ixfr_axfr;
|
||||||
char *servname;
|
char *servname;
|
||||||
char *userarg;
|
char *userarg;
|
||||||
isc_bufferlist_t sendlist,
|
isc_bufferlist_t sendlist,
|
||||||
@@ -214,7 +218,7 @@ struct dig_query {
|
|||||||
isc_sockaddr_t sockaddr;
|
isc_sockaddr_t sockaddr;
|
||||||
isc_time_t time_sent;
|
isc_time_t time_sent;
|
||||||
isc_time_t time_recv;
|
isc_time_t time_recv;
|
||||||
isc_uint64_t byte_count;
|
uint64_t byte_count;
|
||||||
isc_buffer_t sendbuf;
|
isc_buffer_t sendbuf;
|
||||||
isc_timer_t *timer;
|
isc_timer_t *timer;
|
||||||
};
|
};
|
||||||
@@ -242,7 +246,7 @@ extern dig_serverlist_t server_list;
|
|||||||
extern dig_searchlistlist_t search_list;
|
extern dig_searchlistlist_t search_list;
|
||||||
extern unsigned int extrabytes;
|
extern unsigned int extrabytes;
|
||||||
|
|
||||||
extern isc_boolean_t check_ra, have_ipv4, have_ipv6, specified_source,
|
extern bool check_ra, have_ipv4, have_ipv6, specified_source,
|
||||||
usesearch, showsearch;
|
usesearch, showsearch;
|
||||||
extern in_port_t port;
|
extern in_port_t port;
|
||||||
extern unsigned int timeout;
|
extern unsigned int timeout;
|
||||||
@@ -257,18 +261,18 @@ extern char keyfile[MXNAME];
|
|||||||
extern char keysecret[MXNAME];
|
extern char keysecret[MXNAME];
|
||||||
extern const dns_name_t *hmacname;
|
extern const dns_name_t *hmacname;
|
||||||
extern unsigned int digestbits;
|
extern unsigned int digestbits;
|
||||||
extern dns_tsigkey_t *key;
|
extern dns_tsigkey_t *tsigkey;
|
||||||
extern isc_boolean_t validated;
|
extern bool validated;
|
||||||
extern isc_taskmgr_t *taskmgr;
|
extern isc_taskmgr_t *taskmgr;
|
||||||
extern isc_task_t *global_task;
|
extern isc_task_t *global_task;
|
||||||
extern isc_boolean_t free_now;
|
extern bool free_now;
|
||||||
extern isc_boolean_t debugging, debugtiming, memdebugging;
|
extern bool debugging, debugtiming, memdebugging;
|
||||||
extern isc_boolean_t keep_open;
|
extern bool keep_open;
|
||||||
|
|
||||||
extern char *progname;
|
extern char *progname;
|
||||||
extern int tries;
|
extern int tries;
|
||||||
extern int fatalexit;
|
extern int fatalexit;
|
||||||
extern isc_boolean_t verbose;
|
extern bool verbose;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Routines in dighost.c.
|
* Routines in dighost.c.
|
||||||
@@ -280,8 +284,8 @@ int
|
|||||||
getaddresses(dig_lookup_t *lookup, const char *host, isc_result_t *resultp);
|
getaddresses(dig_lookup_t *lookup, const char *host, isc_result_t *resultp);
|
||||||
|
|
||||||
isc_result_t
|
isc_result_t
|
||||||
get_reverse(char *reverse, size_t len, char *value, isc_boolean_t ip6_int,
|
get_reverse(char *reverse, size_t len, char *value, bool ip6_int,
|
||||||
isc_boolean_t strict);
|
bool strict);
|
||||||
|
|
||||||
ISC_PLATFORM_NORETURN_PRE void
|
ISC_PLATFORM_NORETURN_PRE void
|
||||||
fatal(const char *format, ...)
|
fatal(const char *format, ...)
|
||||||
@@ -300,7 +304,7 @@ debug(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
|
|||||||
void
|
void
|
||||||
check_result(isc_result_t result, const char *msg);
|
check_result(isc_result_t result, const char *msg);
|
||||||
|
|
||||||
isc_boolean_t
|
bool
|
||||||
setup_lookup(dig_lookup_t *lookup);
|
setup_lookup(dig_lookup_t *lookup);
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -322,14 +326,14 @@ void
|
|||||||
setup_libs(void);
|
setup_libs(void);
|
||||||
|
|
||||||
void
|
void
|
||||||
setup_system(isc_boolean_t ipv4only, isc_boolean_t ipv6only);
|
setup_system(bool ipv4only, bool ipv6only);
|
||||||
|
|
||||||
isc_result_t
|
isc_result_t
|
||||||
parse_uint(isc_uint32_t *uip, const char *value, isc_uint32_t max,
|
parse_uint(uint32_t *uip, const char *value, uint32_t max,
|
||||||
const char *desc);
|
const char *desc);
|
||||||
|
|
||||||
isc_result_t
|
isc_result_t
|
||||||
parse_xint(isc_uint32_t *uip, const char *value, isc_uint32_t max,
|
parse_xint(uint32_t *uip, const char *value, uint32_t max,
|
||||||
const char *desc);
|
const char *desc);
|
||||||
|
|
||||||
isc_result_t
|
isc_result_t
|
||||||
@@ -339,13 +343,13 @@ void
|
|||||||
parse_hmac(const char *hmacstr);
|
parse_hmac(const char *hmacstr);
|
||||||
|
|
||||||
dig_lookup_t *
|
dig_lookup_t *
|
||||||
requeue_lookup(dig_lookup_t *lookold, isc_boolean_t servers);
|
requeue_lookup(dig_lookup_t *lookold, bool servers);
|
||||||
|
|
||||||
dig_lookup_t *
|
dig_lookup_t *
|
||||||
make_empty_lookup(void);
|
make_empty_lookup(void);
|
||||||
|
|
||||||
dig_lookup_t *
|
dig_lookup_t *
|
||||||
clone_lookup(dig_lookup_t *lookold, isc_boolean_t servers);
|
clone_lookup(dig_lookup_t *lookold, bool servers);
|
||||||
|
|
||||||
dig_server_t *
|
dig_server_t *
|
||||||
make_server(const char *servname, const char *userarg);
|
make_server(const char *servname, const char *userarg);
|
||||||
@@ -369,15 +373,12 @@ destroy_libs(void);
|
|||||||
void
|
void
|
||||||
set_search_domain(char *domain);
|
set_search_domain(char *domain);
|
||||||
|
|
||||||
char *
|
|
||||||
next_token(char **stringp, const char *delim);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Routines to be defined in dig.c, host.c, and nslookup.c. and
|
* Routines to be defined in dig.c, host.c, and nslookup.c. and
|
||||||
* then assigned to the appropriate function pointer
|
* then assigned to the appropriate function pointer
|
||||||
*/
|
*/
|
||||||
extern isc_result_t
|
extern isc_result_t
|
||||||
(*dighost_printmessage)(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers);
|
(*dighost_printmessage)(dig_query_t *query, dns_message_t *msg, bool headers);
|
||||||
/*%<
|
/*%<
|
||||||
* Print the final result of the lookup.
|
* Print the final result of the lookup.
|
||||||
*/
|
*/
|
||||||
@@ -419,7 +420,7 @@ dig_setup(int argc, char **argv);
|
|||||||
* Call to supply new parameters for the next lookup
|
* Call to supply new parameters for the next lookup
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
dig_query_setup(isc_boolean_t, isc_boolean_t, int argc, char **argv);
|
dig_query_setup(bool, bool, int argc, char **argv);
|
||||||
|
|
||||||
/*%<
|
/*%<
|
||||||
* set the main application event cycle running
|
* set the main application event cycle running
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2004-2007, 2010, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2004-2007, 2010, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -290,5 +290,5 @@ returns with an exit status of 1 if any query failed, and 0 otherwise\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2004-2007, 2010, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2004-2007, 2010, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
+104
-103
@@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
@@ -53,18 +55,18 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static isc_boolean_t short_form = ISC_TRUE,
|
static bool short_form = true,
|
||||||
tcpmode = ISC_FALSE, tcpmode_set = ISC_FALSE,
|
tcpmode = false, tcpmode_set = false,
|
||||||
identify = ISC_FALSE, stats = ISC_TRUE,
|
identify = false, stats = true,
|
||||||
comments = ISC_TRUE, section_question = ISC_TRUE,
|
comments = true, section_question = true,
|
||||||
section_answer = ISC_TRUE, section_authority = ISC_TRUE,
|
section_answer = true, section_authority = true,
|
||||||
section_additional = ISC_TRUE, recurse = ISC_TRUE,
|
section_additional = true, recurse = true,
|
||||||
aaonly = ISC_FALSE, nofail = ISC_TRUE,
|
aaonly = false, nofail = true,
|
||||||
default_lookups = ISC_TRUE, a_noanswer = ISC_FALSE;
|
default_lookups = true, a_noanswer = false;
|
||||||
|
|
||||||
static isc_boolean_t interactive;
|
static bool interactive;
|
||||||
|
|
||||||
static isc_boolean_t in_use = ISC_FALSE;
|
static bool in_use = false;
|
||||||
static char defclass[MXRD] = "IN";
|
static char defclass[MXRD] = "IN";
|
||||||
static char deftype[MXRD] = "A";
|
static char deftype[MXRD] = "A";
|
||||||
static isc_event_t *global_event = NULL;
|
static isc_event_t *global_event = NULL;
|
||||||
@@ -213,7 +215,7 @@ printrdata(dns_rdata_t *rdata) {
|
|||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
isc_buffer_t *b = NULL;
|
isc_buffer_t *b = NULL;
|
||||||
unsigned int size = 1024;
|
unsigned int size = 1024;
|
||||||
isc_boolean_t done = ISC_FALSE;
|
bool done = false;
|
||||||
|
|
||||||
if (rdata->type < N_KNOWN_RRTYPES)
|
if (rdata->type < N_KNOWN_RRTYPES)
|
||||||
printf("%s", rtypetext[rdata->type]);
|
printf("%s", rtypetext[rdata->type]);
|
||||||
@@ -228,7 +230,7 @@ printrdata(dns_rdata_t *rdata) {
|
|||||||
if (result == ISC_R_SUCCESS) {
|
if (result == ISC_R_SUCCESS) {
|
||||||
printf("%.*s\n", (int)isc_buffer_usedlength(b),
|
printf("%.*s\n", (int)isc_buffer_usedlength(b),
|
||||||
(char *)isc_buffer_base(b));
|
(char *)isc_buffer_base(b));
|
||||||
done = ISC_TRUE;
|
done = true;
|
||||||
} else if (result != ISC_R_NOSPACE)
|
} else if (result != ISC_R_NOSPACE)
|
||||||
check_result(result, "dns_rdata_totext");
|
check_result(result, "dns_rdata_totext");
|
||||||
isc_buffer_free(&b);
|
isc_buffer_free(&b);
|
||||||
@@ -237,7 +239,7 @@ printrdata(dns_rdata_t *rdata) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
printsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
|
printsection(dig_query_t *query, dns_message_t *msg, bool headers,
|
||||||
dns_section_t section) {
|
dns_section_t section) {
|
||||||
isc_result_t result, loopresult;
|
isc_result_t result, loopresult;
|
||||||
dns_name_t *name;
|
dns_name_t *name;
|
||||||
@@ -304,7 +306,7 @@ printsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
detailsection(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers,
|
detailsection(dig_query_t *query, dns_message_t *msg, bool headers,
|
||||||
dns_section_t section) {
|
dns_section_t section) {
|
||||||
isc_result_t result, loopresult;
|
isc_result_t result, loopresult;
|
||||||
dns_name_t *name;
|
dns_name_t *name;
|
||||||
@@ -429,7 +431,7 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
printmessage(dig_query_t *query, dns_message_t *msg, bool headers) {
|
||||||
char servtext[ISC_SOCKADDR_FORMATSIZE];
|
char servtext[ISC_SOCKADDR_FORMATSIZE];
|
||||||
|
|
||||||
/* I've we've gotten this far, we've reached a server. */
|
/* I've we've gotten this far, we've reached a server. */
|
||||||
@@ -448,10 +450,10 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
|||||||
if (!short_form) {
|
if (!short_form) {
|
||||||
puts("------------");
|
puts("------------");
|
||||||
/* detailheader(query, msg);*/
|
/* detailheader(query, msg);*/
|
||||||
detailsection(query, msg, ISC_TRUE, DNS_SECTION_QUESTION);
|
detailsection(query, msg, true, DNS_SECTION_QUESTION);
|
||||||
detailsection(query, msg, ISC_TRUE, DNS_SECTION_ANSWER);
|
detailsection(query, msg, true, DNS_SECTION_ANSWER);
|
||||||
detailsection(query, msg, ISC_TRUE, DNS_SECTION_AUTHORITY);
|
detailsection(query, msg, true, DNS_SECTION_AUTHORITY);
|
||||||
detailsection(query, msg, ISC_TRUE, DNS_SECTION_ADDITIONAL);
|
detailsection(query, msg, true, DNS_SECTION_ADDITIONAL);
|
||||||
puts("------------");
|
puts("------------");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -475,17 +477,16 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
|||||||
dns_name_t *name;
|
dns_name_t *name;
|
||||||
|
|
||||||
/* Add AAAA lookup. */
|
/* Add AAAA lookup. */
|
||||||
dns_fixedname_init(&fixed);
|
name = dns_fixedname_initname(&fixed);
|
||||||
name = dns_fixedname_name(&fixed);
|
|
||||||
dns_name_copy(query->lookup->name, name, NULL);
|
dns_name_copy(query->lookup->name, name, NULL);
|
||||||
chase_cnamechain(msg, name);
|
chase_cnamechain(msg, name);
|
||||||
dns_name_format(name, namestr, sizeof(namestr));
|
dns_name_format(name, namestr, sizeof(namestr));
|
||||||
lookup = clone_lookup(query->lookup, ISC_FALSE);
|
lookup = clone_lookup(query->lookup, false);
|
||||||
if (lookup != NULL) {
|
if (lookup != NULL) {
|
||||||
strlcpy(lookup->textname, namestr,
|
strlcpy(lookup->textname, namestr,
|
||||||
sizeof(lookup->textname));
|
sizeof(lookup->textname));
|
||||||
lookup->rdtype = dns_rdatatype_aaaa;
|
lookup->rdtype = dns_rdatatype_aaaa;
|
||||||
lookup->rdtypeset = ISC_TRUE;
|
lookup->rdtypeset = true;
|
||||||
lookup->origin = NULL;
|
lookup->origin = NULL;
|
||||||
lookup->retries = tries;
|
lookup->retries = tries;
|
||||||
ISC_LIST_APPEND(lookup_list, lookup, link);
|
ISC_LIST_APPEND(lookup_list, lookup, link);
|
||||||
@@ -499,7 +500,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
|||||||
printsection(query, msg, headers, DNS_SECTION_ANSWER);
|
printsection(query, msg, headers, DNS_SECTION_ANSWER);
|
||||||
else {
|
else {
|
||||||
if (default_lookups && query->lookup->rdtype == dns_rdatatype_a)
|
if (default_lookups && query->lookup->rdtype == dns_rdatatype_a)
|
||||||
a_noanswer = ISC_TRUE;
|
a_noanswer = true;
|
||||||
|
|
||||||
else if (!default_lookups ||
|
else if (!default_lookups ||
|
||||||
(query->lookup->rdtype == dns_rdatatype_aaaa &&
|
(query->lookup->rdtype == dns_rdatatype_aaaa &&
|
||||||
@@ -521,7 +522,7 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
show_settings(isc_boolean_t full, isc_boolean_t serv_only) {
|
show_settings(bool full, bool serv_only) {
|
||||||
dig_server_t *srv;
|
dig_server_t *srv;
|
||||||
isc_sockaddr_t sockaddr;
|
isc_sockaddr_t sockaddr;
|
||||||
dig_searchlist_t *listent;
|
dig_searchlist_t *listent;
|
||||||
@@ -566,7 +567,7 @@ show_settings(isc_boolean_t full, isc_boolean_t serv_only) {
|
|||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static isc_boolean_t
|
static bool
|
||||||
testtype(char *typetext) {
|
testtype(char *typetext) {
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
isc_textregion_t tr;
|
isc_textregion_t tr;
|
||||||
@@ -576,14 +577,14 @@ testtype(char *typetext) {
|
|||||||
tr.length = strlen(typetext);
|
tr.length = strlen(typetext);
|
||||||
result = dns_rdatatype_fromtext(&rdtype, &tr);
|
result = dns_rdatatype_fromtext(&rdtype, &tr);
|
||||||
if (result == ISC_R_SUCCESS)
|
if (result == ISC_R_SUCCESS)
|
||||||
return (ISC_TRUE);
|
return (true);
|
||||||
else {
|
else {
|
||||||
printf("unknown query type: %s\n", typetext);
|
printf("unknown query type: %s\n", typetext);
|
||||||
return (ISC_FALSE);
|
return (false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static isc_boolean_t
|
static bool
|
||||||
testclass(char *typetext) {
|
testclass(char *typetext) {
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
isc_textregion_t tr;
|
isc_textregion_t tr;
|
||||||
@@ -593,24 +594,24 @@ testclass(char *typetext) {
|
|||||||
tr.length = strlen(typetext);
|
tr.length = strlen(typetext);
|
||||||
result = dns_rdataclass_fromtext(&rdclass, &tr);
|
result = dns_rdataclass_fromtext(&rdclass, &tr);
|
||||||
if (result == ISC_R_SUCCESS)
|
if (result == ISC_R_SUCCESS)
|
||||||
return (ISC_TRUE);
|
return (true);
|
||||||
else {
|
else {
|
||||||
printf("unknown query class: %s\n", typetext);
|
printf("unknown query class: %s\n", typetext);
|
||||||
return (ISC_FALSE);
|
return (false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_port(const char *value) {
|
set_port(const char *value) {
|
||||||
isc_uint32_t n;
|
uint32_t n;
|
||||||
isc_result_t result = parse_uint(&n, value, 65535, "port");
|
isc_result_t result = parse_uint(&n, value, 65535, "port");
|
||||||
if (result == ISC_R_SUCCESS)
|
if (result == ISC_R_SUCCESS)
|
||||||
port = (isc_uint16_t) n;
|
port = (uint16_t) n;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_timeout(const char *value) {
|
set_timeout(const char *value) {
|
||||||
isc_uint32_t n;
|
uint32_t n;
|
||||||
isc_result_t result = parse_uint(&n, value, UINT_MAX, "timeout");
|
isc_result_t result = parse_uint(&n, value, UINT_MAX, "timeout");
|
||||||
if (result == ISC_R_SUCCESS)
|
if (result == ISC_R_SUCCESS)
|
||||||
timeout = n;
|
timeout = n;
|
||||||
@@ -618,7 +619,7 @@ set_timeout(const char *value) {
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
set_tries(const char *value) {
|
set_tries(const char *value) {
|
||||||
isc_uint32_t n;
|
uint32_t n;
|
||||||
isc_result_t result = parse_uint(&n, value, INT_MAX, "tries");
|
isc_result_t result = parse_uint(&n, value, INT_MAX, "tries");
|
||||||
if (result == ISC_R_SUCCESS)
|
if (result == ISC_R_SUCCESS)
|
||||||
tries = n;
|
tries = n;
|
||||||
@@ -626,7 +627,7 @@ set_tries(const char *value) {
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
set_ndots(const char *value) {
|
set_ndots(const char *value) {
|
||||||
isc_uint32_t n;
|
uint32_t n;
|
||||||
isc_result_t result = parse_uint(&n, value, 128, "ndots");
|
isc_result_t result = parse_uint(&n, value, 128, "ndots");
|
||||||
if (result == ISC_R_SUCCESS)
|
if (result == ISC_R_SUCCESS)
|
||||||
ndots = n;
|
ndots = n;
|
||||||
@@ -645,7 +646,7 @@ setoption(char *opt) {
|
|||||||
((l >= N) && (l < sizeof(A)) && (strncasecmp(opt, A, l) == 0))
|
((l >= N) && (l < sizeof(A)) && (strncasecmp(opt, A, l) == 0))
|
||||||
|
|
||||||
if (CHECKOPT("all", 3)) {
|
if (CHECKOPT("all", 3)) {
|
||||||
show_settings(ISC_TRUE, ISC_FALSE);
|
show_settings(true, false);
|
||||||
} else if (strncasecmp(opt, "class=", 6) == 0) {
|
} else if (strncasecmp(opt, "class=", 6) == 0) {
|
||||||
if (testclass(&opt[6]))
|
if (testclass(&opt[6]))
|
||||||
strlcpy(defclass, &opt[6], sizeof(defclass));
|
strlcpy(defclass, &opt[6], sizeof(defclass));
|
||||||
@@ -655,41 +656,41 @@ setoption(char *opt) {
|
|||||||
} else if (strncasecmp(opt, "type=", 5) == 0) {
|
} else if (strncasecmp(opt, "type=", 5) == 0) {
|
||||||
if (testtype(&opt[5])) {
|
if (testtype(&opt[5])) {
|
||||||
strlcpy(deftype, &opt[5], sizeof(deftype));
|
strlcpy(deftype, &opt[5], sizeof(deftype));
|
||||||
default_lookups = ISC_FALSE;
|
default_lookups = false;
|
||||||
}
|
}
|
||||||
} else if (strncasecmp(opt, "ty=", 3) == 0) {
|
} else if (strncasecmp(opt, "ty=", 3) == 0) {
|
||||||
if (testtype(&opt[3])) {
|
if (testtype(&opt[3])) {
|
||||||
strlcpy(deftype, &opt[3], sizeof(deftype));
|
strlcpy(deftype, &opt[3], sizeof(deftype));
|
||||||
default_lookups = ISC_FALSE;
|
default_lookups = false;
|
||||||
}
|
}
|
||||||
} else if (strncasecmp(opt, "querytype=", 10) == 0) {
|
} else if (strncasecmp(opt, "querytype=", 10) == 0) {
|
||||||
if (testtype(&opt[10])) {
|
if (testtype(&opt[10])) {
|
||||||
strlcpy(deftype, &opt[10], sizeof(deftype));
|
strlcpy(deftype, &opt[10], sizeof(deftype));
|
||||||
default_lookups = ISC_FALSE;
|
default_lookups = false;
|
||||||
}
|
}
|
||||||
} else if (strncasecmp(opt, "query=", 6) == 0) {
|
} else if (strncasecmp(opt, "query=", 6) == 0) {
|
||||||
if (testtype(&opt[6])) {
|
if (testtype(&opt[6])) {
|
||||||
strlcpy(deftype, &opt[6], sizeof(deftype));
|
strlcpy(deftype, &opt[6], sizeof(deftype));
|
||||||
default_lookups = ISC_FALSE;
|
default_lookups = false;
|
||||||
}
|
}
|
||||||
} else if (strncasecmp(opt, "qu=", 3) == 0) {
|
} else if (strncasecmp(opt, "qu=", 3) == 0) {
|
||||||
if (testtype(&opt[3])) {
|
if (testtype(&opt[3])) {
|
||||||
strlcpy(deftype, &opt[3], sizeof(deftype));
|
strlcpy(deftype, &opt[3], sizeof(deftype));
|
||||||
default_lookups = ISC_FALSE;
|
default_lookups = false;
|
||||||
}
|
}
|
||||||
} else if (strncasecmp(opt, "q=", 2) == 0) {
|
} else if (strncasecmp(opt, "q=", 2) == 0) {
|
||||||
if (testtype(&opt[2])) {
|
if (testtype(&opt[2])) {
|
||||||
strlcpy(deftype, &opt[2], sizeof(deftype));
|
strlcpy(deftype, &opt[2], sizeof(deftype));
|
||||||
default_lookups = ISC_FALSE;
|
default_lookups = false;
|
||||||
}
|
}
|
||||||
} else if (strncasecmp(opt, "domain=", 7) == 0) {
|
} else if (strncasecmp(opt, "domain=", 7) == 0) {
|
||||||
strlcpy(domainopt, &opt[7], sizeof(domainopt));
|
strlcpy(domainopt, &opt[7], sizeof(domainopt));
|
||||||
set_search_domain(domainopt);
|
set_search_domain(domainopt);
|
||||||
usesearch = ISC_TRUE;
|
usesearch = true;
|
||||||
} else if (strncasecmp(opt, "do=", 3) == 0) {
|
} else if (strncasecmp(opt, "do=", 3) == 0) {
|
||||||
strlcpy(domainopt, &opt[3], sizeof(domainopt));
|
strlcpy(domainopt, &opt[3], sizeof(domainopt));
|
||||||
set_search_domain(domainopt);
|
set_search_domain(domainopt);
|
||||||
usesearch = ISC_TRUE;
|
usesearch = true;
|
||||||
} else if (strncasecmp(opt, "port=", 5) == 0) {
|
} else if (strncasecmp(opt, "port=", 5) == 0) {
|
||||||
set_port(&opt[5]);
|
set_port(&opt[5]);
|
||||||
} else if (strncasecmp(opt, "po=", 3) == 0) {
|
} else if (strncasecmp(opt, "po=", 3) == 0) {
|
||||||
@@ -699,43 +700,43 @@ setoption(char *opt) {
|
|||||||
} else if (strncasecmp(opt, "t=", 2) == 0) {
|
} else if (strncasecmp(opt, "t=", 2) == 0) {
|
||||||
set_timeout(&opt[2]);
|
set_timeout(&opt[2]);
|
||||||
} else if (CHECKOPT("recurse", 3)) {
|
} else if (CHECKOPT("recurse", 3)) {
|
||||||
recurse = ISC_TRUE;
|
recurse = true;
|
||||||
} else if (CHECKOPT("norecurse", 5)) {
|
} else if (CHECKOPT("norecurse", 5)) {
|
||||||
recurse = ISC_FALSE;
|
recurse = false;
|
||||||
} else if (strncasecmp(opt, "retry=", 6) == 0) {
|
} else if (strncasecmp(opt, "retry=", 6) == 0) {
|
||||||
set_tries(&opt[6]);
|
set_tries(&opt[6]);
|
||||||
} else if (strncasecmp(opt, "ret=", 4) == 0) {
|
} else if (strncasecmp(opt, "ret=", 4) == 0) {
|
||||||
set_tries(&opt[4]);
|
set_tries(&opt[4]);
|
||||||
} else if (CHECKOPT("defname", 3)) {
|
} else if (CHECKOPT("defname", 3)) {
|
||||||
usesearch = ISC_TRUE;
|
usesearch = true;
|
||||||
} else if (CHECKOPT("nodefname", 5)) {
|
} else if (CHECKOPT("nodefname", 5)) {
|
||||||
usesearch = ISC_FALSE;
|
usesearch = false;
|
||||||
} else if (CHECKOPT("vc", 2) == 0) {
|
} else if (CHECKOPT("vc", 2)) {
|
||||||
tcpmode = ISC_TRUE;
|
tcpmode = true;
|
||||||
tcpmode_set = ISC_TRUE;
|
tcpmode_set = true;
|
||||||
} else if (CHECKOPT("novc", 4) == 0) {
|
} else if (CHECKOPT("novc", 4)) {
|
||||||
tcpmode = ISC_FALSE;
|
tcpmode = false;
|
||||||
tcpmode_set = ISC_TRUE;
|
tcpmode_set = true;
|
||||||
} else if (CHECKOPT("debug", 3) == 0) {
|
} else if (CHECKOPT("debug", 3)) {
|
||||||
short_form = ISC_FALSE;
|
short_form = false;
|
||||||
showsearch = ISC_TRUE;
|
showsearch = true;
|
||||||
} else if (CHECKOPT("nodebug", 5) == 0) {
|
} else if (CHECKOPT("nodebug", 5)) {
|
||||||
short_form = ISC_TRUE;
|
short_form = true;
|
||||||
showsearch = ISC_FALSE;
|
showsearch = false;
|
||||||
} else if (CHECKOPT("d2", 2) == 0) {
|
} else if (CHECKOPT("d2", 2)) {
|
||||||
debugging = ISC_TRUE;
|
debugging = true;
|
||||||
} else if (CHECKOPT("nod2", 4) == 0) {
|
} else if (CHECKOPT("nod2", 4)) {
|
||||||
debugging = ISC_FALSE;
|
debugging = false;
|
||||||
} else if (CHECKOPT("search", 3) == 0) {
|
} else if (CHECKOPT("search", 3)) {
|
||||||
usesearch = ISC_TRUE;
|
usesearch = true;
|
||||||
} else if (CHECKOPT("nosearch", 5) == 0) {
|
} else if (CHECKOPT("nosearch", 5)) {
|
||||||
usesearch = ISC_FALSE;
|
usesearch = false;
|
||||||
} else if (CHECKOPT("sil", 3) == 0) {
|
} else if (CHECKOPT("sil", 3)) {
|
||||||
/* deprecation_msg = ISC_FALSE; */
|
/* deprecation_msg = false; */
|
||||||
} else if (CHECKOPT("fail", 3) == 0) {
|
} else if (CHECKOPT("fail", 3)) {
|
||||||
nofail=ISC_FALSE;
|
nofail=false;
|
||||||
} else if (CHECKOPT("nofail", 5) == 0) {
|
} else if (CHECKOPT("nofail", 5)) {
|
||||||
nofail=ISC_TRUE;
|
nofail=true;
|
||||||
} else if (strncasecmp(opt, "ndots=", 6) == 0) {
|
} else if (strncasecmp(opt, "ndots=", 6) == 0) {
|
||||||
set_ndots(&opt[6]);
|
set_ndots(&opt[6]);
|
||||||
} else {
|
} else {
|
||||||
@@ -754,7 +755,7 @@ addlookup(char *opt) {
|
|||||||
|
|
||||||
debug("addlookup()");
|
debug("addlookup()");
|
||||||
|
|
||||||
a_noanswer = ISC_FALSE;
|
a_noanswer = false;
|
||||||
|
|
||||||
tr.base = deftype;
|
tr.base = deftype;
|
||||||
tr.length = strlen(deftype);
|
tr.length = strlen(deftype);
|
||||||
@@ -771,21 +772,21 @@ addlookup(char *opt) {
|
|||||||
rdclass = dns_rdataclass_in;
|
rdclass = dns_rdataclass_in;
|
||||||
}
|
}
|
||||||
lookup = make_empty_lookup();
|
lookup = make_empty_lookup();
|
||||||
if (get_reverse(store, sizeof(store), opt, lookup->ip6_int, ISC_TRUE)
|
if (get_reverse(store, sizeof(store), opt, lookup->ip6_int, true)
|
||||||
== ISC_R_SUCCESS) {
|
== ISC_R_SUCCESS) {
|
||||||
strlcpy(lookup->textname, store, sizeof(lookup->textname));
|
strlcpy(lookup->textname, store, sizeof(lookup->textname));
|
||||||
lookup->rdtype = dns_rdatatype_ptr;
|
lookup->rdtype = dns_rdatatype_ptr;
|
||||||
lookup->rdtypeset = ISC_TRUE;
|
lookup->rdtypeset = true;
|
||||||
} else {
|
} else {
|
||||||
strlcpy(lookup->textname, opt, sizeof(lookup->textname));
|
strlcpy(lookup->textname, opt, sizeof(lookup->textname));
|
||||||
lookup->rdtype = rdtype;
|
lookup->rdtype = rdtype;
|
||||||
lookup->rdtypeset = ISC_TRUE;
|
lookup->rdtypeset = true;
|
||||||
}
|
}
|
||||||
lookup->rdclass = rdclass;
|
lookup->rdclass = rdclass;
|
||||||
lookup->rdclassset = ISC_TRUE;
|
lookup->rdclassset = true;
|
||||||
lookup->trace = ISC_FALSE;
|
lookup->trace = false;
|
||||||
lookup->trace_root = lookup->trace;
|
lookup->trace_root = lookup->trace;
|
||||||
lookup->ns_search_only = ISC_FALSE;
|
lookup->ns_search_only = false;
|
||||||
lookup->identify = identify;
|
lookup->identify = identify;
|
||||||
lookup->recurse = recurse;
|
lookup->recurse = recurse;
|
||||||
lookup->aaonly = aaonly;
|
lookup->aaonly = aaonly;
|
||||||
@@ -793,7 +794,7 @@ addlookup(char *opt) {
|
|||||||
lookup->udpsize = 0;
|
lookup->udpsize = 0;
|
||||||
lookup->comments = comments;
|
lookup->comments = comments;
|
||||||
if (lookup->rdtype == dns_rdatatype_any && !tcpmode_set)
|
if (lookup->rdtype == dns_rdatatype_any && !tcpmode_set)
|
||||||
lookup->tcp_mode = ISC_TRUE;
|
lookup->tcp_mode = true;
|
||||||
else
|
else
|
||||||
lookup->tcp_mode = tcpmode;
|
lookup->tcp_mode = tcpmode;
|
||||||
lookup->stats = stats;
|
lookup->stats = stats;
|
||||||
@@ -801,9 +802,9 @@ addlookup(char *opt) {
|
|||||||
lookup->section_answer = section_answer;
|
lookup->section_answer = section_answer;
|
||||||
lookup->section_authority = section_authority;
|
lookup->section_authority = section_authority;
|
||||||
lookup->section_additional = section_additional;
|
lookup->section_additional = section_additional;
|
||||||
lookup->new_search = ISC_TRUE;
|
lookup->new_search = true;
|
||||||
if (nofail)
|
if (nofail)
|
||||||
lookup->servfail_stops = ISC_FALSE;
|
lookup->servfail_stops = false;
|
||||||
ISC_LIST_INIT(lookup->q);
|
ISC_LIST_INIT(lookup->q);
|
||||||
ISC_LINK_INIT(lookup, link);
|
ISC_LINK_INIT(lookup, link);
|
||||||
ISC_LIST_APPEND(lookup_list, lookup, link);
|
ISC_LIST_APPEND(lookup_list, lookup, link);
|
||||||
@@ -814,12 +815,12 @@ addlookup(char *opt) {
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
do_next_command(char *input) {
|
do_next_command(char *input) {
|
||||||
char *ptr, *arg;
|
char *ptr, *arg, *last;
|
||||||
|
|
||||||
ptr = next_token(&input, " \t\r\n");
|
if ((ptr = strtok_r(input, " \t\r\n", &last)) == NULL) {
|
||||||
if (ptr == NULL)
|
|
||||||
return;
|
return;
|
||||||
arg = next_token(&input, " \t\r\n");
|
}
|
||||||
|
arg = strtok_r(NULL, " \t\r\n", &last);
|
||||||
if ((strcasecmp(ptr, "set") == 0) &&
|
if ((strcasecmp(ptr, "set") == 0) &&
|
||||||
(arg != NULL))
|
(arg != NULL))
|
||||||
setoption(arg);
|
setoption(arg);
|
||||||
@@ -827,11 +828,11 @@ do_next_command(char *input) {
|
|||||||
(strcasecmp(ptr, "lserver") == 0)) {
|
(strcasecmp(ptr, "lserver") == 0)) {
|
||||||
isc_app_block();
|
isc_app_block();
|
||||||
set_nameserver(arg);
|
set_nameserver(arg);
|
||||||
check_ra = ISC_FALSE;
|
check_ra = false;
|
||||||
isc_app_unblock();
|
isc_app_unblock();
|
||||||
show_settings(ISC_TRUE, ISC_TRUE);
|
show_settings(true, true);
|
||||||
} else if (strcasecmp(ptr, "exit") == 0) {
|
} else if (strcasecmp(ptr, "exit") == 0) {
|
||||||
in_use = ISC_FALSE;
|
in_use = false;
|
||||||
} else if (strcasecmp(ptr, "help") == 0 ||
|
} else if (strcasecmp(ptr, "help") == 0 ||
|
||||||
strcasecmp(ptr, "?") == 0) {
|
strcasecmp(ptr, "?") == 0) {
|
||||||
printf("The '%s' command is not yet implemented.\n", ptr);
|
printf("The '%s' command is not yet implemented.\n", ptr);
|
||||||
@@ -868,7 +869,7 @@ get_next_command(void) {
|
|||||||
ptr = fgets(buf, COMMSIZE, stdin);
|
ptr = fgets(buf, COMMSIZE, stdin);
|
||||||
isc_app_unblock();
|
isc_app_unblock();
|
||||||
if (ptr == NULL) {
|
if (ptr == NULL) {
|
||||||
in_use = ISC_FALSE;
|
in_use = false;
|
||||||
} else
|
} else
|
||||||
do_next_command(ptr);
|
do_next_command(ptr);
|
||||||
#ifdef HAVE_READLINE
|
#ifdef HAVE_READLINE
|
||||||
@@ -880,9 +881,9 @@ get_next_command(void) {
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
parse_args(int argc, char **argv) {
|
parse_args(int argc, char **argv) {
|
||||||
isc_boolean_t have_lookup = ISC_FALSE;
|
bool have_lookup = false;
|
||||||
|
|
||||||
usesearch = ISC_TRUE;
|
usesearch = true;
|
||||||
for (argc--, argv++; argc > 0; argc--, argv++) {
|
for (argc--, argv++; argc > 0; argc--, argv++) {
|
||||||
debug("main parsing %s", argv[0]);
|
debug("main parsing %s", argv[0]);
|
||||||
if (argv[0][0] == '-') {
|
if (argv[0][0] == '-') {
|
||||||
@@ -892,15 +893,15 @@ parse_args(int argc, char **argv) {
|
|||||||
} else if (argv[0][1] != 0) {
|
} else if (argv[0][1] != 0) {
|
||||||
setoption(&argv[0][1]);
|
setoption(&argv[0][1]);
|
||||||
} else
|
} else
|
||||||
have_lookup = ISC_TRUE;
|
have_lookup = true;
|
||||||
} else {
|
} else {
|
||||||
if (!have_lookup) {
|
if (!have_lookup) {
|
||||||
have_lookup = ISC_TRUE;
|
have_lookup = true;
|
||||||
in_use = ISC_TRUE;
|
in_use = true;
|
||||||
addlookup(argv[0]);
|
addlookup(argv[0]);
|
||||||
} else {
|
} else {
|
||||||
set_nameserver(argv[0]);
|
set_nameserver(argv[0]);
|
||||||
check_ra = ISC_FALSE;
|
check_ra = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -971,13 +972,13 @@ int
|
|||||||
main(int argc, char **argv) {
|
main(int argc, char **argv) {
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
|
|
||||||
interactive = ISC_TF(isatty(0));
|
interactive = isatty(0);
|
||||||
|
|
||||||
ISC_LIST_INIT(lookup_list);
|
ISC_LIST_INIT(lookup_list);
|
||||||
ISC_LIST_INIT(server_list);
|
ISC_LIST_INIT(server_list);
|
||||||
ISC_LIST_INIT(search_list);
|
ISC_LIST_INIT(search_list);
|
||||||
|
|
||||||
check_ra = ISC_TRUE;
|
check_ra = true;
|
||||||
|
|
||||||
/* setup dighost callbacks */
|
/* setup dighost callbacks */
|
||||||
dighost_printmessage = printmessage;
|
dighost_printmessage = printmessage;
|
||||||
@@ -991,7 +992,7 @@ main(int argc, char **argv) {
|
|||||||
setup_libs();
|
setup_libs();
|
||||||
progname = argv[0];
|
progname = argv[0];
|
||||||
|
|
||||||
setup_system(ISC_FALSE, ISC_FALSE);
|
setup_system(false, false);
|
||||||
parse_args(argc, argv);
|
parse_args(argc, argv);
|
||||||
if (keyfile[0] != 0)
|
if (keyfile[0] != 0)
|
||||||
setup_file_key();
|
setup_file_key();
|
||||||
@@ -1005,7 +1006,7 @@ main(int argc, char **argv) {
|
|||||||
else
|
else
|
||||||
result = isc_app_onrun(mctx, global_task, getinput, NULL);
|
result = isc_app_onrun(mctx, global_task, getinput, NULL);
|
||||||
check_result(result, "isc_app_onrun");
|
check_result(result, "isc_app_onrun");
|
||||||
in_use = ISC_TF(!in_use);
|
in_use = !in_use;
|
||||||
|
|
||||||
(void)isc_app_run();
|
(void)isc_app_run();
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2004-2007, 2010, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2004-2007, 2010, 2013-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>WIN32;@CRYPTO@USE_READLINE_STATIC;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;USE_READLINE_STATIC;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>WIN32;@CRYPTO@USE_READLINE_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;USE_READLINE_STATIC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
|
|||||||
@@ -15,15 +15,14 @@ VERSION=@BIND9_VERSION@
|
|||||||
|
|
||||||
@BIND9_MAKE_INCLUDES@
|
@BIND9_MAKE_INCLUDES@
|
||||||
|
|
||||||
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @DST_OPENSSL_INC@
|
CINCLUDES = ${DNS_INCLUDES} ${ISC_INCLUDES} @OPENSSL_INCLUDES@
|
||||||
|
|
||||||
CDEFINES = -DVERSION=\"${VERSION}\" @USE_PKCS11@ @PKCS11_ENGINE@ \
|
CDEFINES = -DVERSION=\"${VERSION}\"
|
||||||
@CRYPTO@ -DPK11_LIB_LOCATION=\"@PKCS11_PROVIDER@\"
|
|
||||||
CWARNINGS =
|
CWARNINGS =
|
||||||
|
|
||||||
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
DNSLIBS = ../../lib/dns/libdns.@A@ @DNS_CRYPTO_LIBS@
|
||||||
ISCLIBS = ../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
ISCLIBS = ../../lib/isc/libisc.@A@ @OPENSSL_LIBS@
|
||||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @ISC_OPENSSL_LIBS@
|
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ @OPENSSL_LIBS@
|
||||||
|
|
||||||
DNSDEPLIBS = ../../lib/dns/libdns.@A@
|
DNSDEPLIBS = ../../lib/dns/libdns.@A@
|
||||||
ISCDEPLIBS = ../../lib/isc/libisc.@A@
|
ISCDEPLIBS = ../../lib/isc/libisc.@A@
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ Specify a digest algorithm to use when converting CDNSKEY records to DS records\
|
|||||||
.sp
|
.sp
|
||||||
The
|
The
|
||||||
\fIalgorithm\fR
|
\fIalgorithm\fR
|
||||||
must be one of SHA\-1 (SHA1), SHA\-256 (SHA256), GOST, or SHA\-384 (SHA384)\&. These values are case insensitive\&. If no algorithm is specified, the default is SHA\-256\&.
|
must be one of SHA\-1 (SHA1), SHA\-256 (SHA256), or SHA\-384 (SHA384)\&. These values are case insensitive\&. If no algorithm is specified, the default is SHA\-256\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-c \fIclass\fR
|
\-c \fIclass\fR
|
||||||
|
|||||||
+60
-69
@@ -19,11 +19,12 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <isc/buffer.h>
|
#include <isc/buffer.h>
|
||||||
#include <isc/commandline.h>
|
#include <isc/commandline.h>
|
||||||
#include <isc/entropy.h>
|
|
||||||
#include <isc/file.h>
|
#include <isc/file.h>
|
||||||
#include <isc/hash.h>
|
#include <isc/hash.h>
|
||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
@@ -54,7 +55,7 @@
|
|||||||
|
|
||||||
#include <dst/dst.h>
|
#include <dst/dst.h>
|
||||||
|
|
||||||
#ifdef PKCS11CRYPTO
|
#if USE_PKCS11
|
||||||
#include <pk11/result.h>
|
#include <pk11/result.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -72,7 +73,6 @@ int verbose;
|
|||||||
*/
|
*/
|
||||||
static isc_log_t *lctx = NULL;
|
static isc_log_t *lctx = NULL;
|
||||||
static isc_mem_t *mctx = NULL;
|
static isc_mem_t *mctx = NULL;
|
||||||
static isc_entropy_t *ectx = NULL;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The domain we are working on
|
* The domain we are working on
|
||||||
@@ -86,7 +86,7 @@ static dns_rdataclass_t rdclass = dns_rdataclass_in;
|
|||||||
* List of digest types used by ds_from_cdnskey(), filled in by add_dtype()
|
* List of digest types used by ds_from_cdnskey(), filled in by add_dtype()
|
||||||
* from -a arguments. The size of the array is an arbitrary limit.
|
* from -a arguments. The size of the array is an arbitrary limit.
|
||||||
*/
|
*/
|
||||||
static isc_uint8_t dtype[8];
|
static uint8_t dtype[8];
|
||||||
|
|
||||||
static const char *startstr = NULL; /* from which we derive notbefore */
|
static const char *startstr = NULL; /* from which we derive notbefore */
|
||||||
static isc_stdtime_t notbefore = 0; /* restrict sig inception times */
|
static isc_stdtime_t notbefore = 0; /* restrict sig inception times */
|
||||||
@@ -129,7 +129,7 @@ static int nkey; /* number of child zone DNSKEY records */
|
|||||||
typedef struct keyinfo {
|
typedef struct keyinfo {
|
||||||
dns_rdata_t rdata;
|
dns_rdata_t rdata;
|
||||||
dst_key_t *dst;
|
dst_key_t *dst;
|
||||||
isc_uint8_t algo;
|
uint8_t algo;
|
||||||
dns_keytag_t tag;
|
dns_keytag_t tag;
|
||||||
} keyinfo_t;
|
} keyinfo_t;
|
||||||
|
|
||||||
@@ -173,8 +173,7 @@ initname(char *setname) {
|
|||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
isc_buffer_t buf;
|
isc_buffer_t buf;
|
||||||
|
|
||||||
dns_fixedname_init(&fixed);
|
name = dns_fixedname_initname(&fixed);
|
||||||
name = dns_fixedname_name(&fixed);
|
|
||||||
namestr = setname;
|
namestr = setname;
|
||||||
|
|
||||||
isc_buffer_init(&buf, setname, strlen(setname));
|
isc_buffer_init(&buf, setname, strlen(setname));
|
||||||
@@ -254,14 +253,14 @@ load_db(const char *filename, dns_db_t **dbp, dns_dbnode_t **nodep) {
|
|||||||
rdclass, 0, NULL, dbp);
|
rdclass, 0, NULL, dbp);
|
||||||
check_result(result, "dns_db_create()");
|
check_result(result, "dns_db_create()");
|
||||||
|
|
||||||
result = dns_db_load3(*dbp, filename,
|
result = dns_db_load(*dbp, filename,
|
||||||
dns_masterformat_text, DNS_MASTER_HINT);
|
dns_masterformat_text, DNS_MASTER_HINT);
|
||||||
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE) {
|
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE) {
|
||||||
fatal("can't load %s: %s", filename,
|
fatal("can't load %s: %s", filename,
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
}
|
}
|
||||||
|
|
||||||
result = dns_db_findnode(*dbp, name, ISC_FALSE, nodep);
|
result = dns_db_findnode(*dbp, name, false, nodep);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
fatal("can't find %s node in %s", namestr, filename);
|
fatal("can't find %s node in %s", namestr, filename);
|
||||||
}
|
}
|
||||||
@@ -315,7 +314,7 @@ get_dsset_name(char *filename, size_t size,
|
|||||||
}
|
}
|
||||||
isc_buffer_putstr(&buf, prefix);
|
isc_buffer_putstr(&buf, prefix);
|
||||||
|
|
||||||
result = dns_name_tofilenametext(name, ISC_FALSE, &buf);
|
result = dns_name_tofilenametext(name, false, &buf);
|
||||||
check_result(result, "dns_name_tofilenametext()");
|
check_result(result, "dns_name_tofilenametext()");
|
||||||
if (isc_buffer_availablelength(&buf) == 0) {
|
if (isc_buffer_availablelength(&buf) == 0) {
|
||||||
fatal("%s: pathname too long", path);
|
fatal("%s: pathname too long", path);
|
||||||
@@ -379,9 +378,9 @@ formatset(dns_rdataset_t *rdataset) {
|
|||||||
* which just separates fields with spaces. The huge tab stop width
|
* which just separates fields with spaces. The huge tab stop width
|
||||||
* eliminates any tab characters.
|
* eliminates any tab characters.
|
||||||
*/
|
*/
|
||||||
result = dns_master_stylecreate2(&style, styleflags,
|
result = dns_master_stylecreate(&style, styleflags,
|
||||||
0, 0, 0, 0, 0, 1000000, 0,
|
0, 0, 0, 0, 0, 1000000, 0,
|
||||||
mctx);
|
mctx);
|
||||||
check_result(result, "dns_master_stylecreate2 failed");
|
check_result(result, "dns_master_stylecreate2 failed");
|
||||||
|
|
||||||
result = isc_buffer_allocate(mctx, &buf, MAX_CDS_RDATA_TEXT_SIZE);
|
result = isc_buffer_allocate(mctx, &buf, MAX_CDS_RDATA_TEXT_SIZE);
|
||||||
@@ -403,7 +402,7 @@ formatset(dns_rdataset_t *rdataset) {
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
write_parent_set(const char *path, const char *inplace,
|
write_parent_set(const char *path, const char *inplace,
|
||||||
isc_boolean_t nsupdate, dns_rdataset_t *rdataset)
|
bool nsupdate, dns_rdataset_t *rdataset)
|
||||||
{
|
{
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
isc_buffer_t *buf = NULL;
|
isc_buffer_t *buf = NULL;
|
||||||
@@ -470,7 +469,7 @@ typedef enum { LOOSE, TIGHT } strictness_t;
|
|||||||
/*
|
/*
|
||||||
* Find out if any (C)DS record matches a particular (C)DNSKEY.
|
* Find out if any (C)DS record matches a particular (C)DNSKEY.
|
||||||
*/
|
*/
|
||||||
static isc_boolean_t
|
static bool
|
||||||
match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
|
match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
|
||||||
{
|
{
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
@@ -484,7 +483,7 @@ match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
|
|||||||
dns_rdata_t dsrdata = DNS_RDATA_INIT;
|
dns_rdata_t dsrdata = DNS_RDATA_INIT;
|
||||||
dns_rdata_t newdsrdata = DNS_RDATA_INIT;
|
dns_rdata_t newdsrdata = DNS_RDATA_INIT;
|
||||||
dns_rdatatype_t keytype;
|
dns_rdatatype_t keytype;
|
||||||
isc_boolean_t c;
|
bool c;
|
||||||
|
|
||||||
dns_rdataset_current(dsset, &dsrdata);
|
dns_rdataset_current(dsset, &dsrdata);
|
||||||
result = dns_rdata_tostruct(&dsrdata, &ds, NULL);
|
result = dns_rdata_tostruct(&dsrdata, &ds, NULL);
|
||||||
@@ -514,13 +513,13 @@ match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
|
|||||||
vbprintf(1, "found matching %s %d %d %d\n",
|
vbprintf(1, "found matching %s %d %d %d\n",
|
||||||
c ? "CDS" : "DS",
|
c ? "CDS" : "DS",
|
||||||
ds.key_tag, ds.algorithm, ds.digest_type);
|
ds.key_tag, ds.algorithm, ds.digest_type);
|
||||||
return (ISC_TRUE);
|
return (true);
|
||||||
} else if (strictness == TIGHT) {
|
} else if (strictness == TIGHT) {
|
||||||
vbprintf(0, "key does not match %s %d %d %d "
|
vbprintf(0, "key does not match %s %d %d %d "
|
||||||
"when it looks like it should\n",
|
"when it looks like it should\n",
|
||||||
c ? "CDS" : "DS",
|
c ? "CDS" : "DS",
|
||||||
ds.key_tag, ds.algorithm, ds.digest_type);
|
ds.key_tag, ds.algorithm, ds.digest_type);
|
||||||
return (ISC_FALSE);
|
return (false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -531,7 +530,7 @@ match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness)
|
|||||||
? "CDNSKEY" : "DNSKEY",
|
? "CDNSKEY" : "DNSKEY",
|
||||||
ki->tag, ki->algo);
|
ki->tag, ki->algo);
|
||||||
|
|
||||||
return (ISC_FALSE);
|
return (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -620,12 +619,12 @@ free_keytable(keyinfo_t **keytable_p) {
|
|||||||
* otherwise the key algorithm. This is used by the signature coverage
|
* otherwise the key algorithm. This is used by the signature coverage
|
||||||
* check functions below.
|
* check functions below.
|
||||||
*/
|
*/
|
||||||
static isc_uint8_t *
|
static uint8_t *
|
||||||
matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
|
matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
|
||||||
dns_rdataset_t *sigset)
|
dns_rdataset_t *sigset)
|
||||||
{
|
{
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
isc_uint8_t *algo;
|
uint8_t *algo;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
algo = isc_mem_get(mctx, nkey);
|
algo = isc_mem_get(mctx, nkey);
|
||||||
@@ -671,8 +670,11 @@ matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
|
|||||||
}
|
}
|
||||||
|
|
||||||
result = dns_dnssec_verify(name, rdataset, ki->dst,
|
result = dns_dnssec_verify(name, rdataset, ki->dst,
|
||||||
ISC_FALSE, mctx, &sigrdata);
|
false, 0, mctx,
|
||||||
if (result != ISC_R_SUCCESS) {
|
&sigrdata, NULL);
|
||||||
|
|
||||||
|
if (result != ISC_R_SUCCESS &&
|
||||||
|
result != DNS_R_FROMWILDCARD) {
|
||||||
vbprintf(1, "skip RRSIG by key %d:"
|
vbprintf(1, "skip RRSIG by key %d:"
|
||||||
" verification failed: %s\n",
|
" verification failed: %s\n",
|
||||||
sig.keyid, isc_result_totext(result));
|
sig.keyid, isc_result_totext(result));
|
||||||
@@ -704,13 +706,13 @@ matching_sigs(keyinfo_t *keytbl, dns_rdataset_t *rdataset,
|
|||||||
* Consume the result of matching_sigs(). When checking records
|
* Consume the result of matching_sigs(). When checking records
|
||||||
* fetched from the child zone, any working signature is enough.
|
* fetched from the child zone, any working signature is enough.
|
||||||
*/
|
*/
|
||||||
static isc_boolean_t
|
static bool
|
||||||
signed_loose(isc_uint8_t *algo) {
|
signed_loose(uint8_t *algo) {
|
||||||
isc_boolean_t ok = ISC_FALSE;
|
bool ok = false;
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < nkey; i++) {
|
for (i = 0; i < nkey; i++) {
|
||||||
if (algo[i] != 0) {
|
if (algo[i] != 0) {
|
||||||
ok = ISC_TRUE;
|
ok = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
isc_mem_put(mctx, algo, nkey);
|
isc_mem_put(mctx, algo, nkey);
|
||||||
@@ -723,10 +725,10 @@ signed_loose(isc_uint8_t *algo) {
|
|||||||
* key algorithm in the DS RRset must have a signature in the DNSKEY
|
* key algorithm in the DS RRset must have a signature in the DNSKEY
|
||||||
* RRset.
|
* RRset.
|
||||||
*/
|
*/
|
||||||
static isc_boolean_t
|
static bool
|
||||||
signed_strict(dns_rdataset_t *dsset, isc_uint8_t *algo) {
|
signed_strict(dns_rdataset_t *dsset, uint8_t *algo) {
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
isc_boolean_t all_ok = ISC_TRUE;
|
bool all_ok = true;
|
||||||
|
|
||||||
for (result = dns_rdataset_first(dsset);
|
for (result = dns_rdataset_first(dsset);
|
||||||
result == ISC_R_SUCCESS;
|
result == ISC_R_SUCCESS;
|
||||||
@@ -734,23 +736,23 @@ signed_strict(dns_rdataset_t *dsset, isc_uint8_t *algo) {
|
|||||||
{
|
{
|
||||||
dns_rdata_t dsrdata = DNS_RDATA_INIT;
|
dns_rdata_t dsrdata = DNS_RDATA_INIT;
|
||||||
dns_rdata_ds_t ds;
|
dns_rdata_ds_t ds;
|
||||||
isc_boolean_t ds_ok;
|
bool ds_ok;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
dns_rdataset_current(dsset, &dsrdata);
|
dns_rdataset_current(dsset, &dsrdata);
|
||||||
result = dns_rdata_tostruct(&dsrdata, &ds, NULL);
|
result = dns_rdata_tostruct(&dsrdata, &ds, NULL);
|
||||||
check_result(result, "dns_rdata_tostruct(DS)");
|
check_result(result, "dns_rdata_tostruct(DS)");
|
||||||
|
|
||||||
ds_ok = ISC_FALSE;
|
ds_ok = false;
|
||||||
for (i = 0; i < nkey; i++) {
|
for (i = 0; i < nkey; i++) {
|
||||||
if (algo[i] == ds.algorithm) {
|
if (algo[i] == ds.algorithm) {
|
||||||
ds_ok = ISC_TRUE;
|
ds_ok = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!ds_ok) {
|
if (!ds_ok) {
|
||||||
vbprintf(0, "missing signature for algorithm %d "
|
vbprintf(0, "missing signature for algorithm %d "
|
||||||
"(key %d)\n", ds.algorithm, ds.key_tag);
|
"(key %d)\n", ds.algorithm, ds.key_tag);
|
||||||
all_ok = ISC_FALSE;
|
all_ok = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -848,14 +850,14 @@ ds_from_cdnskey(dns_rdatalist_t *dslist, isc_buffer_t *buf,
|
|||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
cmp_dtype(const void *ap, const void *bp) {
|
cmp_dtype(const void *ap, const void *bp) {
|
||||||
int a = *(const isc_uint8_t *)ap;
|
int a = *(const uint8_t *)ap;
|
||||||
int b = *(const isc_uint8_t *)bp;
|
int b = *(const uint8_t *)bp;
|
||||||
return (a - b);
|
return (a - b);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
add_dtype(const char *dn) {
|
add_dtype(const char *dn) {
|
||||||
isc_uint8_t dt;
|
uint8_t dt;
|
||||||
unsigned i, n;
|
unsigned i, n;
|
||||||
|
|
||||||
dt = strtodsdigest(dn);
|
dt = strtodsdigest(dn);
|
||||||
@@ -872,7 +874,7 @@ add_dtype(const char *dn) {
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
make_new_ds_set(ds_maker_func_t *ds_from_rdata,
|
make_new_ds_set(ds_maker_func_t *ds_from_rdata,
|
||||||
isc_uint32_t ttl, dns_rdataset_t *rdset)
|
uint32_t ttl, dns_rdataset_t *rdset)
|
||||||
{
|
{
|
||||||
unsigned int size = 16;
|
unsigned int size = 16;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
@@ -934,14 +936,14 @@ rdata_cmp(const void *rdata1, const void *rdata2) {
|
|||||||
* Ensure that every key identified by the DS RRset has the same set of
|
* Ensure that every key identified by the DS RRset has the same set of
|
||||||
* digest types.
|
* digest types.
|
||||||
*/
|
*/
|
||||||
static isc_boolean_t
|
static bool
|
||||||
consistent_digests(dns_rdataset_t *dsset) {
|
consistent_digests(dns_rdataset_t *dsset) {
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
dns_rdata_t *arrdata;
|
dns_rdata_t *arrdata;
|
||||||
dns_rdata_ds_t *ds;
|
dns_rdata_ds_t *ds;
|
||||||
dns_keytag_t key_tag;
|
dns_keytag_t key_tag;
|
||||||
isc_uint8_t algorithm;
|
uint8_t algorithm;
|
||||||
isc_boolean_t match;
|
bool match;
|
||||||
int i, j, n, d;
|
int i, j, n, d;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -995,7 +997,7 @@ consistent_digests(dns_rdataset_t *dsset) {
|
|||||||
/*
|
/*
|
||||||
* Check subsequent keys match the first one
|
* Check subsequent keys match the first one
|
||||||
*/
|
*/
|
||||||
match = ISC_TRUE;
|
match = true;
|
||||||
while (i < n) {
|
while (i < n) {
|
||||||
key_tag = ds[i].key_tag;
|
key_tag = ds[i].key_tag;
|
||||||
algorithm = ds[i].algorithm;
|
algorithm = ds[i].algorithm;
|
||||||
@@ -1004,7 +1006,7 @@ consistent_digests(dns_rdataset_t *dsset) {
|
|||||||
ds[i+j].algorithm != algorithm ||
|
ds[i+j].algorithm != algorithm ||
|
||||||
ds[i+j].digest_type != ds[j].digest_type)
|
ds[i+j].digest_type != ds[j].digest_type)
|
||||||
{
|
{
|
||||||
match = ISC_FALSE;
|
match = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
i += d;
|
i += d;
|
||||||
@@ -1039,7 +1041,7 @@ print_diff(const char *cmd, dns_rdataset_t *rdataset) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
update_diff(const char *cmd, isc_uint32_t ttl,
|
update_diff(const char *cmd, uint32_t ttl,
|
||||||
dns_rdataset_t *addset, dns_rdataset_t *delset)
|
dns_rdataset_t *addset, dns_rdataset_t *delset)
|
||||||
{
|
{
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
@@ -1047,7 +1049,7 @@ update_diff(const char *cmd, isc_uint32_t ttl,
|
|||||||
dns_dbnode_t *node;
|
dns_dbnode_t *node;
|
||||||
dns_dbversion_t *ver;
|
dns_dbversion_t *ver;
|
||||||
dns_rdataset_t diffset;
|
dns_rdataset_t diffset;
|
||||||
isc_uint32_t save;
|
uint32_t save;
|
||||||
|
|
||||||
db = NULL;
|
db = NULL;
|
||||||
result = dns_db_create(mctx, "rbt", name, dns_dbtype_zone,
|
result = dns_db_create(mctx, "rbt", name, dns_dbtype_zone,
|
||||||
@@ -1059,7 +1061,7 @@ update_diff(const char *cmd, isc_uint32_t ttl,
|
|||||||
check_result(result, "dns_db_newversion()");
|
check_result(result, "dns_db_newversion()");
|
||||||
|
|
||||||
node = NULL;
|
node = NULL;
|
||||||
result = dns_db_findnode(db, name, ISC_TRUE, &node);
|
result = dns_db_findnode(db, name, true, &node);
|
||||||
check_result(result, "dns_db_findnode()");
|
check_result(result, "dns_db_findnode()");
|
||||||
|
|
||||||
dns_rdataset_init(&diffset);
|
dns_rdataset_init(&diffset);
|
||||||
@@ -1083,12 +1085,12 @@ update_diff(const char *cmd, isc_uint32_t ttl,
|
|||||||
}
|
}
|
||||||
|
|
||||||
dns_db_detachnode(db, &node);
|
dns_db_detachnode(db, &node);
|
||||||
dns_db_closeversion(db, &ver, ISC_FALSE);
|
dns_db_closeversion(db, &ver, false);
|
||||||
dns_db_detach(&db);
|
dns_db_detach(&db);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nsdiff(isc_uint32_t ttl, dns_rdataset_t *oldset, dns_rdataset_t *newset) {
|
nsdiff(uint32_t ttl, dns_rdataset_t *oldset, dns_rdataset_t *newset) {
|
||||||
if (ttl == 0) {
|
if (ttl == 0) {
|
||||||
vbprintf(1, "warning: no TTL in nsupdate script\n");
|
vbprintf(1, "warning: no TTL in nsupdate script\n");
|
||||||
}
|
}
|
||||||
@@ -1115,7 +1117,7 @@ usage(void) {
|
|||||||
program);
|
program);
|
||||||
fprintf(stderr, "Version: %s\n", VERSION);
|
fprintf(stderr, "Version: %s\n", VERSION);
|
||||||
fprintf(stderr, "Options:\n"
|
fprintf(stderr, "Options:\n"
|
||||||
" -a <algorithm> digest algorithm (SHA-1 / SHA-256 / GOST / SHA-384)\n"
|
" -a <algorithm> digest algorithm (SHA-1 / SHA-256 / SHA-384)\n"
|
||||||
" -c <class> of domain (default IN)\n"
|
" -c <class> of domain (default IN)\n"
|
||||||
" -D prefer CDNSKEY records instead of CDS\n"
|
" -D prefer CDNSKEY records instead of CDS\n"
|
||||||
" -d <file|dir> where to find parent dsset- file\n"
|
" -d <file|dir> where to find parent dsset- file\n"
|
||||||
@@ -1136,9 +1138,9 @@ main(int argc, char *argv[]) {
|
|||||||
const char *ds_path = NULL;
|
const char *ds_path = NULL;
|
||||||
const char *inplace = NULL;
|
const char *inplace = NULL;
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
isc_boolean_t prefer_cdnskey = ISC_FALSE;
|
bool prefer_cdnskey = false;
|
||||||
isc_boolean_t nsupdate = ISC_FALSE;
|
bool nsupdate = false;
|
||||||
isc_uint32_t ttl = 0;
|
uint32_t ttl = 0;
|
||||||
int ch;
|
int ch;
|
||||||
char *endp;
|
char *endp;
|
||||||
|
|
||||||
@@ -1147,12 +1149,12 @@ main(int argc, char *argv[]) {
|
|||||||
fatal("out of memory");
|
fatal("out of memory");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PKCS11CRYPTO
|
#if USE_PKCS11
|
||||||
pk11_result_register();
|
pk11_result_register();
|
||||||
#endif
|
#endif
|
||||||
dns_result_register();
|
dns_result_register();
|
||||||
|
|
||||||
isc_commandline_errprint = ISC_FALSE;
|
isc_commandline_errprint = false;
|
||||||
|
|
||||||
#define OPTIONS "a:c:Dd:f:i:ms:T:uv:V"
|
#define OPTIONS "a:c:Dd:f:i:ms:T:uv:V"
|
||||||
while ((ch = isc_commandline_parse(argc, argv, OPTIONS)) != -1) {
|
while ((ch = isc_commandline_parse(argc, argv, OPTIONS)) != -1) {
|
||||||
@@ -1164,7 +1166,7 @@ main(int argc, char *argv[]) {
|
|||||||
rdclass = strtoclass(isc_commandline_argument);
|
rdclass = strtoclass(isc_commandline_argument);
|
||||||
break;
|
break;
|
||||||
case 'D':
|
case 'D':
|
||||||
prefer_cdnskey = ISC_TRUE;
|
prefer_cdnskey = true;
|
||||||
break;
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
ds_path = isc_commandline_argument;
|
ds_path = isc_commandline_argument;
|
||||||
@@ -1197,7 +1199,7 @@ main(int argc, char *argv[]) {
|
|||||||
ttl = strtottl(isc_commandline_argument);
|
ttl = strtottl(isc_commandline_argument);
|
||||||
break;
|
break;
|
||||||
case 'u':
|
case 'u':
|
||||||
nsupdate = ISC_TRUE;
|
nsupdate = true;
|
||||||
break;
|
break;
|
||||||
case 'V':
|
case 'V':
|
||||||
/* Does not return. */
|
/* Does not return. */
|
||||||
@@ -1231,20 +1233,11 @@ main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
setup_logging(mctx, &lctx);
|
setup_logging(mctx, &lctx);
|
||||||
|
|
||||||
if (ectx == NULL) {
|
result = dst_lib_init(mctx, NULL);
|
||||||
setup_entropy(mctx, NULL, &ectx);
|
|
||||||
}
|
|
||||||
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
|
|
||||||
if (result != ISC_R_SUCCESS) {
|
|
||||||
fatal("could not initialize hash");
|
|
||||||
}
|
|
||||||
result = dst_lib_init(mctx, ectx,
|
|
||||||
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
|
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
fatal("could not initialize dst: %s",
|
fatal("could not initialize dst: %s",
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
}
|
}
|
||||||
isc_entropy_stopcallbacksources(ectx);
|
|
||||||
|
|
||||||
if (ds_path == NULL) {
|
if (ds_path == NULL) {
|
||||||
fatal("missing -d DS pathname");
|
fatal("missing -d DS pathname");
|
||||||
@@ -1394,8 +1387,6 @@ main(int argc, char *argv[]) {
|
|||||||
free_all_sets();
|
free_all_sets();
|
||||||
cleanup_logging(&lctx);
|
cleanup_logging(&lctx);
|
||||||
dst_lib_destroy();
|
dst_lib_destroy();
|
||||||
isc_hash_destroy();
|
|
||||||
cleanup_entropy(&ectx);
|
|
||||||
if (verbose > 10) {
|
if (verbose > 10) {
|
||||||
isc_mem_stats(mctx, stdout);
|
isc_mem_stats(mctx, stdout);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,7 +144,7 @@
|
|||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The <replaceable>algorithm</replaceable> must be one of SHA-1
|
The <replaceable>algorithm</replaceable> must be one of SHA-1
|
||||||
(SHA1), SHA-256 (SHA256), GOST, or SHA-384 (SHA384). These
|
(SHA1), SHA-256 (SHA256), or SHA-384 (SHA384). These
|
||||||
values are case insensitive. If no algorithm is specified,
|
values are case insensitive. If no algorithm is specified,
|
||||||
the default is SHA-256.
|
the default is SHA-256.
|
||||||
</para>
|
</para>
|
||||||
|
|||||||
@@ -130,7 +130,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
The <em class="replaceable"><code>algorithm</code></em> must be one of SHA-1
|
The <em class="replaceable"><code>algorithm</code></em> must be one of SHA-1
|
||||||
(SHA1), SHA-256 (SHA256), GOST, or SHA-384 (SHA384). These
|
(SHA1), SHA-256 (SHA256), or SHA-384 (SHA384). These
|
||||||
values are case insensitive. If no algorithm is specified,
|
values are case insensitive. If no algorithm is specified,
|
||||||
the default is SHA-256.
|
the default is SHA-256.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2008-2012, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2008-2012, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -64,7 +64,7 @@ Use SHA\-256 as the digest algorithm\&.
|
|||||||
.RS 4
|
.RS 4
|
||||||
Select the digest algorithm\&. The value of
|
Select the digest algorithm\&. The value of
|
||||||
\fBalgorithm\fR
|
\fBalgorithm\fR
|
||||||
must be one of SHA\-1 (SHA1), SHA\-256 (SHA256), GOST or SHA\-384 (SHA384)\&. These values are case insensitive\&.
|
must be one of SHA\-1 (SHA1), SHA\-256 (SHA256) or SHA\-384 (SHA384)\&. These values are case insensitive\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-C
|
\-C
|
||||||
@@ -178,5 +178,5 @@ RFC 4509\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2008-2012, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2008-2012, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
@@ -13,11 +13,12 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <isc/buffer.h>
|
#include <isc/buffer.h>
|
||||||
#include <isc/commandline.h>
|
#include <isc/commandline.h>
|
||||||
#include <isc/entropy.h>
|
|
||||||
#include <isc/hash.h>
|
#include <isc/hash.h>
|
||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
#include <isc/print.h>
|
#include <isc/print.h>
|
||||||
@@ -42,7 +43,7 @@
|
|||||||
|
|
||||||
#include <dst/dst.h>
|
#include <dst/dst.h>
|
||||||
|
|
||||||
#ifdef PKCS11CRYPTO
|
#if USE_PKCS11
|
||||||
#include <pk11/result.h>
|
#include <pk11/result.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -59,16 +60,15 @@ static dns_rdataclass_t rdclass;
|
|||||||
static dns_fixedname_t fixed;
|
static dns_fixedname_t fixed;
|
||||||
static dns_name_t *name = NULL;
|
static dns_name_t *name = NULL;
|
||||||
static isc_mem_t *mctx = NULL;
|
static isc_mem_t *mctx = NULL;
|
||||||
static isc_uint32_t ttl;
|
static uint32_t ttl;
|
||||||
static isc_boolean_t emitttl = ISC_FALSE;
|
static bool emitttl = false;
|
||||||
|
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
initname(char *setname) {
|
initname(char *setname) {
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
isc_buffer_t buf;
|
isc_buffer_t buf;
|
||||||
|
|
||||||
dns_fixedname_init(&fixed);
|
name = dns_fixedname_initname(&fixed);
|
||||||
name = dns_fixedname_name(&fixed);
|
|
||||||
|
|
||||||
isc_buffer_init(&buf, setname, strlen(setname));
|
isc_buffer_init(&buf, setname, strlen(setname));
|
||||||
isc_buffer_add(&buf, strlen(setname));
|
isc_buffer_add(&buf, strlen(setname));
|
||||||
@@ -114,13 +114,13 @@ loadset(const char *filename, dns_rdataset_t *rdataset) {
|
|||||||
db_load_from_stream(db, stdin);
|
db_load_from_stream(db, stdin);
|
||||||
filename = "input";
|
filename = "input";
|
||||||
} else {
|
} else {
|
||||||
result = dns_db_load(db, filename);
|
result = dns_db_load(db, filename, dns_masterformat_text, 0);
|
||||||
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
|
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
|
||||||
fatal("can't load %s: %s", filename,
|
fatal("can't load %s: %s", filename,
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
}
|
}
|
||||||
|
|
||||||
result = dns_db_findnode(db, name, ISC_FALSE, &node);
|
result = dns_db_findnode(db, name, false, &node);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
fatal("can't find %s node in %s", setname, filename);
|
fatal("can't find %s node in %s", setname, filename);
|
||||||
|
|
||||||
@@ -161,7 +161,7 @@ loadkeyset(char *dirname, dns_rdataset_t *rdataset) {
|
|||||||
return (ISC_R_NOSPACE);
|
return (ISC_R_NOSPACE);
|
||||||
isc_buffer_putstr(&buf, "keyset-");
|
isc_buffer_putstr(&buf, "keyset-");
|
||||||
|
|
||||||
result = dns_name_tofilenametext(name, ISC_FALSE, &buf);
|
result = dns_name_tofilenametext(name, false, &buf);
|
||||||
check_result(result, "dns_name_tofilenametext()");
|
check_result(result, "dns_name_tofilenametext()");
|
||||||
if (isc_buffer_availablelength(&buf) == 0)
|
if (isc_buffer_availablelength(&buf) == 0)
|
||||||
return (ISC_R_NOSPACE);
|
return (ISC_R_NOSPACE);
|
||||||
@@ -206,8 +206,7 @@ loadkey(char *filename, unsigned char *key_buf, unsigned int key_buf_size,
|
|||||||
|
|
||||||
rdclass = dst_key_class(key);
|
rdclass = dst_key_class(key);
|
||||||
|
|
||||||
dns_fixedname_init(&fixed);
|
name = dns_fixedname_initname(&fixed);
|
||||||
name = dns_fixedname_name(&fixed);
|
|
||||||
result = dns_name_copy(dst_key_name(key), name, NULL);
|
result = dns_name_copy(dst_key_name(key), name, NULL);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
fatal("can't copy name");
|
fatal("can't copy name");
|
||||||
@@ -236,8 +235,8 @@ logkey(dns_rdata_t *rdata)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
emit(unsigned int dtype, isc_boolean_t showall, char *lookaside,
|
emit(unsigned int dtype, bool showall, char *lookaside,
|
||||||
isc_boolean_t cds, dns_rdata_t *rdata)
|
bool cds, dns_rdata_t *rdata)
|
||||||
{
|
{
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
unsigned char buf[DNS_DS_BUFFERSIZE];
|
unsigned char buf[DNS_DS_BUFFERSIZE];
|
||||||
@@ -266,7 +265,7 @@ emit(unsigned int dtype, isc_boolean_t showall, char *lookaside,
|
|||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
fatal("can't build record");
|
fatal("can't build record");
|
||||||
|
|
||||||
result = dns_name_totext(name, ISC_FALSE, &nameb);
|
result = dns_name_totext(name, false, &nameb);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
fatal("can't print name");
|
fatal("can't print name");
|
||||||
|
|
||||||
@@ -355,13 +354,12 @@ main(int argc, char **argv) {
|
|||||||
char *endp;
|
char *endp;
|
||||||
int ch;
|
int ch;
|
||||||
unsigned int dtype = DNS_DSDIGEST_SHA1;
|
unsigned int dtype = DNS_DSDIGEST_SHA1;
|
||||||
isc_boolean_t cds = ISC_FALSE;
|
bool cds = false;
|
||||||
isc_boolean_t both = ISC_TRUE;
|
bool both = true;
|
||||||
isc_boolean_t usekeyset = ISC_FALSE;
|
bool usekeyset = false;
|
||||||
isc_boolean_t showall = ISC_FALSE;
|
bool showall = false;
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
isc_log_t *log = NULL;
|
isc_log_t *log = NULL;
|
||||||
isc_entropy_t *ectx = NULL;
|
|
||||||
dns_rdataset_t rdataset;
|
dns_rdataset_t rdataset;
|
||||||
dns_rdata_t rdata;
|
dns_rdata_t rdata;
|
||||||
|
|
||||||
@@ -374,36 +372,36 @@ main(int argc, char **argv) {
|
|||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
fatal("out of memory");
|
fatal("out of memory");
|
||||||
|
|
||||||
#ifdef PKCS11CRYPTO
|
#if USE_PKCS11
|
||||||
pk11_result_register();
|
pk11_result_register();
|
||||||
#endif
|
#endif
|
||||||
dns_result_register();
|
dns_result_register();
|
||||||
|
|
||||||
isc_commandline_errprint = ISC_FALSE;
|
isc_commandline_errprint = false;
|
||||||
|
|
||||||
#define OPTIONS "12Aa:Cc:d:Ff:K:l:sT:v:hV"
|
#define OPTIONS "12Aa:Cc:d:Ff:K:l:sT:v:hV"
|
||||||
while ((ch = isc_commandline_parse(argc, argv, OPTIONS)) != -1) {
|
while ((ch = isc_commandline_parse(argc, argv, OPTIONS)) != -1) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case '1':
|
case '1':
|
||||||
dtype = DNS_DSDIGEST_SHA1;
|
dtype = DNS_DSDIGEST_SHA1;
|
||||||
both = ISC_FALSE;
|
both = false;
|
||||||
break;
|
break;
|
||||||
case '2':
|
case '2':
|
||||||
dtype = DNS_DSDIGEST_SHA256;
|
dtype = DNS_DSDIGEST_SHA256;
|
||||||
both = ISC_FALSE;
|
both = false;
|
||||||
break;
|
break;
|
||||||
case 'A':
|
case 'A':
|
||||||
showall = ISC_TRUE;
|
showall = true;
|
||||||
break;
|
break;
|
||||||
case 'a':
|
case 'a':
|
||||||
dtype = strtodsdigest(isc_commandline_argument);
|
dtype = strtodsdigest(isc_commandline_argument);
|
||||||
both = ISC_FALSE;
|
both = false;
|
||||||
break;
|
break;
|
||||||
case 'C':
|
case 'C':
|
||||||
if (lookaside != NULL)
|
if (lookaside != NULL)
|
||||||
fatal("lookaside and CDS are mutually"
|
fatal("lookaside and CDS are mutually"
|
||||||
" exclusive");
|
" exclusive");
|
||||||
cds = ISC_TRUE;
|
cds = true;
|
||||||
break;
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
classname = isc_commandline_argument;
|
classname = isc_commandline_argument;
|
||||||
@@ -429,10 +427,10 @@ main(int argc, char **argv) {
|
|||||||
fatal("lookaside must be a non-empty string");
|
fatal("lookaside must be a non-empty string");
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
usekeyset = ISC_TRUE;
|
usekeyset = true;
|
||||||
break;
|
break;
|
||||||
case 'T':
|
case 'T':
|
||||||
emitttl = ISC_TRUE;
|
emitttl = true;
|
||||||
ttl = strtottl(isc_commandline_argument);
|
ttl = strtottl(isc_commandline_argument);
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
@@ -470,24 +468,17 @@ main(int argc, char **argv) {
|
|||||||
|
|
||||||
/* When not using -f, -A is implicit */
|
/* When not using -f, -A is implicit */
|
||||||
if (filename == NULL)
|
if (filename == NULL)
|
||||||
showall = ISC_TRUE;
|
showall = true;
|
||||||
|
|
||||||
if (argc < isc_commandline_index + 1 && filename == NULL)
|
if (argc < isc_commandline_index + 1 && filename == NULL)
|
||||||
fatal("the key file name was not specified");
|
fatal("the key file name was not specified");
|
||||||
if (argc > isc_commandline_index + 1)
|
if (argc > isc_commandline_index + 1)
|
||||||
fatal("extraneous arguments");
|
fatal("extraneous arguments");
|
||||||
|
|
||||||
if (ectx == NULL)
|
result = dst_lib_init(mctx, NULL);
|
||||||
setup_entropy(mctx, NULL, &ectx);
|
|
||||||
result = dst_lib_init(mctx, ectx,
|
|
||||||
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
|
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
fatal("could not initialize dst: %s",
|
fatal("could not initialize dst: %s",
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
|
|
||||||
if (result != ISC_R_SUCCESS)
|
|
||||||
fatal("could not initialize hash");
|
|
||||||
isc_entropy_stopcallbacksources(ectx);
|
|
||||||
|
|
||||||
setup_logging(mctx, &log);
|
setup_logging(mctx, &log);
|
||||||
|
|
||||||
@@ -548,9 +539,7 @@ main(int argc, char **argv) {
|
|||||||
if (dns_rdataset_isassociated(&rdataset))
|
if (dns_rdataset_isassociated(&rdataset))
|
||||||
dns_rdataset_disassociate(&rdataset);
|
dns_rdataset_disassociate(&rdataset);
|
||||||
cleanup_logging(&log);
|
cleanup_logging(&log);
|
||||||
isc_hash_destroy();
|
|
||||||
dst_lib_destroy();
|
dst_lib_destroy();
|
||||||
cleanup_entropy(&ectx);
|
|
||||||
dns_name_destroy();
|
dns_name_destroy();
|
||||||
if (verbose > 10)
|
if (verbose > 10)
|
||||||
isc_mem_stats(mctx, stdout);
|
isc_mem_stats(mctx, stdout);
|
||||||
|
|||||||
@@ -117,7 +117,7 @@
|
|||||||
<para>
|
<para>
|
||||||
Select the digest algorithm. The value of
|
Select the digest algorithm. The value of
|
||||||
<option>algorithm</option> must be one of SHA-1 (SHA1),
|
<option>algorithm</option> must be one of SHA-1 (SHA1),
|
||||||
SHA-256 (SHA256), GOST or SHA-384 (SHA384).
|
SHA-256 (SHA256) or SHA-384 (SHA384).
|
||||||
These values are case insensitive.
|
These values are case insensitive.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2008-2012, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2008-2012, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
<p>
|
<p>
|
||||||
Select the digest algorithm. The value of
|
Select the digest algorithm. The value of
|
||||||
<code class="option">algorithm</code> must be one of SHA-1 (SHA1),
|
<code class="option">algorithm</code> must be one of SHA-1 (SHA1),
|
||||||
SHA-256 (SHA256), GOST or SHA-384 (SHA384).
|
SHA-256 (SHA256) or SHA-384 (SHA384).
|
||||||
These values are case insensitive.
|
These values are case insensitive.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2013-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -134,5 +134,5 @@ RFC 5011\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2013-2016 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2013-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
@@ -13,11 +13,11 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <isc/buffer.h>
|
#include <isc/buffer.h>
|
||||||
#include <isc/commandline.h>
|
#include <isc/commandline.h>
|
||||||
#include <isc/entropy.h>
|
|
||||||
#include <isc/hash.h>
|
#include <isc/hash.h>
|
||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
#include <isc/print.h>
|
#include <isc/print.h>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#include <dst/dst.h>
|
#include <dst/dst.h>
|
||||||
|
|
||||||
#ifdef PKCS11CRYPTO
|
#if USE_PKCS11
|
||||||
#include <pk11/result.h>
|
#include <pk11/result.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -59,21 +59,20 @@ static dns_rdataclass_t rdclass;
|
|||||||
static dns_fixedname_t fixed;
|
static dns_fixedname_t fixed;
|
||||||
static dns_name_t *name = NULL;
|
static dns_name_t *name = NULL;
|
||||||
static isc_mem_t *mctx = NULL;
|
static isc_mem_t *mctx = NULL;
|
||||||
static isc_boolean_t setpub = ISC_FALSE, setdel = ISC_FALSE;
|
static bool setpub = false, setdel = false;
|
||||||
static isc_boolean_t setttl = ISC_FALSE;
|
static bool setttl = false;
|
||||||
static isc_stdtime_t pub = 0, del = 0;
|
static isc_stdtime_t pub = 0, del = 0;
|
||||||
static dns_ttl_t ttl = 0;
|
static dns_ttl_t ttl = 0;
|
||||||
static isc_stdtime_t syncadd = 0, syncdel = 0;
|
static isc_stdtime_t syncadd = 0, syncdel = 0;
|
||||||
static isc_boolean_t setsyncadd = ISC_FALSE;
|
static bool setsyncadd = false;
|
||||||
static isc_boolean_t setsyncdel = ISC_FALSE;
|
static bool setsyncdel = false;
|
||||||
|
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
initname(char *setname) {
|
initname(char *setname) {
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
isc_buffer_t buf;
|
isc_buffer_t buf;
|
||||||
|
|
||||||
dns_fixedname_init(&fixed);
|
name = dns_fixedname_initname(&fixed);
|
||||||
name = dns_fixedname_name(&fixed);
|
|
||||||
|
|
||||||
isc_buffer_init(&buf, setname, strlen(setname));
|
isc_buffer_init(&buf, setname, strlen(setname));
|
||||||
isc_buffer_add(&buf, strlen(setname));
|
isc_buffer_add(&buf, strlen(setname));
|
||||||
@@ -119,14 +118,14 @@ loadset(const char *filename, dns_rdataset_t *rdataset) {
|
|||||||
db_load_from_stream(db, stdin);
|
db_load_from_stream(db, stdin);
|
||||||
filename = "input";
|
filename = "input";
|
||||||
} else {
|
} else {
|
||||||
result = dns_db_load3(db, filename, dns_masterformat_text,
|
result = dns_db_load(db, filename, dns_masterformat_text,
|
||||||
DNS_MASTER_NOTTL);
|
DNS_MASTER_NOTTL);
|
||||||
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
|
if (result != ISC_R_SUCCESS && result != DNS_R_SEENINCLUDE)
|
||||||
fatal("can't load %s: %s", filename,
|
fatal("can't load %s: %s", filename,
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
}
|
}
|
||||||
|
|
||||||
result = dns_db_findnode(db, name, ISC_FALSE, &node);
|
result = dns_db_findnode(db, name, false, &node);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
fatal("can't find %s node in %s", setname, filename);
|
fatal("can't find %s node in %s", setname, filename);
|
||||||
|
|
||||||
@@ -181,8 +180,7 @@ loadkey(char *filename, unsigned char *key_buf, unsigned int key_buf_size,
|
|||||||
|
|
||||||
rdclass = dst_key_class(key);
|
rdclass = dst_key_class(key);
|
||||||
|
|
||||||
dns_fixedname_init(&fixed);
|
name = dns_fixedname_initname(&fixed);
|
||||||
name = dns_fixedname_name(&fixed);
|
|
||||||
result = dns_name_copy(dst_key_name(key), name, NULL);
|
result = dns_name_copy(dst_key_name(key), name, NULL);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
fatal("can't copy name");
|
fatal("can't copy name");
|
||||||
@@ -229,7 +227,7 @@ emit(const char *dir, dns_rdata_t *rdata) {
|
|||||||
dst_key_free(&tmp);
|
dst_key_free(&tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
dst_key_setexternal(key, ISC_TRUE);
|
dst_key_setexternal(key, true);
|
||||||
if (setpub)
|
if (setpub)
|
||||||
dst_key_settime(key, DST_TIME_PUBLISH, pub);
|
dst_key_settime(key, DST_TIME_PUBLISH, pub);
|
||||||
if (setdel)
|
if (setdel)
|
||||||
@@ -299,7 +297,6 @@ main(int argc, char **argv) {
|
|||||||
int ch;
|
int ch;
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
isc_log_t *log = NULL;
|
isc_log_t *log = NULL;
|
||||||
isc_entropy_t *ectx = NULL;
|
|
||||||
dns_rdataset_t rdataset;
|
dns_rdataset_t rdataset;
|
||||||
dns_rdata_t rdata;
|
dns_rdata_t rdata;
|
||||||
isc_stdtime_t now;
|
isc_stdtime_t now;
|
||||||
@@ -314,12 +311,12 @@ main(int argc, char **argv) {
|
|||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
fatal("out of memory");
|
fatal("out of memory");
|
||||||
|
|
||||||
#ifdef PKCS11CRYPTO
|
#if USE_PKCS11
|
||||||
pk11_result_register();
|
pk11_result_register();
|
||||||
#endif
|
#endif
|
||||||
dns_result_register();
|
dns_result_register();
|
||||||
|
|
||||||
isc_commandline_errprint = ISC_FALSE;
|
isc_commandline_errprint = false;
|
||||||
|
|
||||||
#define CMDLINE_FLAGS "D:f:hK:L:P:v:V"
|
#define CMDLINE_FLAGS "D:f:hK:L:P:v:V"
|
||||||
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
||||||
@@ -350,7 +347,7 @@ main(int argc, char **argv) {
|
|||||||
break;
|
break;
|
||||||
case 'L':
|
case 'L':
|
||||||
ttl = strtottl(isc_commandline_argument);
|
ttl = strtottl(isc_commandline_argument);
|
||||||
setttl = ISC_TRUE;
|
setttl = true;
|
||||||
break;
|
break;
|
||||||
case 'P':
|
case 'P':
|
||||||
/* -Psync ? */
|
/* -Psync ? */
|
||||||
@@ -406,17 +403,10 @@ main(int argc, char **argv) {
|
|||||||
if (argc > isc_commandline_index + 1)
|
if (argc > isc_commandline_index + 1)
|
||||||
fatal("extraneous arguments");
|
fatal("extraneous arguments");
|
||||||
|
|
||||||
if (ectx == NULL)
|
result = dst_lib_init(mctx, NULL);
|
||||||
setup_entropy(mctx, NULL, &ectx);
|
|
||||||
result = dst_lib_init(mctx, ectx,
|
|
||||||
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
|
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
fatal("could not initialize dst: %s",
|
fatal("could not initialize dst: %s",
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
|
|
||||||
if (result != ISC_R_SUCCESS)
|
|
||||||
fatal("could not initialize hash");
|
|
||||||
isc_entropy_stopcallbacksources(ectx);
|
|
||||||
|
|
||||||
setup_logging(mctx, &log);
|
setup_logging(mctx, &log);
|
||||||
|
|
||||||
@@ -459,9 +449,7 @@ main(int argc, char **argv) {
|
|||||||
if (dns_rdataset_isassociated(&rdataset))
|
if (dns_rdataset_isassociated(&rdataset))
|
||||||
dns_rdataset_disassociate(&rdataset);
|
dns_rdataset_disassociate(&rdataset);
|
||||||
cleanup_logging(&log);
|
cleanup_logging(&log);
|
||||||
isc_hash_destroy();
|
|
||||||
dst_lib_destroy();
|
dst_lib_destroy();
|
||||||
cleanup_entropy(&ectx);
|
|
||||||
dns_name_destroy();
|
dns_name_destroy();
|
||||||
if (verbose > 10)
|
if (verbose > 10)
|
||||||
isc_mem_stats(mctx, stdout);
|
isc_mem_stats(mctx, stdout);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2013-2016 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2013-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2008-2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2008-2012, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -55,7 +55,7 @@ of the key is specified on the command line\&. This must match the name of the z
|
|||||||
.RS 4
|
.RS 4
|
||||||
Selects the cryptographic algorithm\&. The value of
|
Selects the cryptographic algorithm\&. The value of
|
||||||
\fBalgorithm\fR
|
\fBalgorithm\fR
|
||||||
must be one of RSAMD5, RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&.
|
must be one of RSAMD5, RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&.
|
||||||
.sp
|
.sp
|
||||||
If no algorithm is specified, then RSASHA1 will be used by default, unless the
|
If no algorithm is specified, then RSASHA1 will be used by default, unless the
|
||||||
\fB\-3\fR
|
\fB\-3\fR
|
||||||
@@ -307,5 +307,5 @@ The PKCS#11 URI Scheme (draft\-pechanec\-pkcs11uri\-13)\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2008-2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2008-2012, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
@@ -14,11 +14,12 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <isc/buffer.h>
|
#include <isc/buffer.h>
|
||||||
#include <isc/commandline.h>
|
#include <isc/commandline.h>
|
||||||
#include <isc/entropy.h>
|
|
||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
#include <isc/region.h>
|
#include <isc/region.h>
|
||||||
#include <isc/print.h>
|
#include <isc/print.h>
|
||||||
@@ -38,7 +39,7 @@
|
|||||||
|
|
||||||
#include <dst/dst.h>
|
#include <dst/dst.h>
|
||||||
|
|
||||||
#ifdef PKCS11CRYPTO
|
#if USE_PKCS11
|
||||||
#include <pk11/result.h>
|
#include <pk11/result.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -65,17 +66,14 @@ usage(void) {
|
|||||||
fprintf(stderr, " -a algorithm: \n"
|
fprintf(stderr, " -a algorithm: \n"
|
||||||
" RSA | RSAMD5 | DH | DSA | RSASHA1 |\n"
|
" RSA | RSAMD5 | DH | DSA | RSASHA1 |\n"
|
||||||
" NSEC3DSA | NSEC3RSASHA1 |\n"
|
" NSEC3DSA | NSEC3RSASHA1 |\n"
|
||||||
" RSASHA256 | RSASHA512 | ECCGOST |\n"
|
" RSASHA256 | RSASHA512 |\n"
|
||||||
" ECDSAP256SHA256 | ECDSAP384SHA384\n");
|
" ECDSAP256SHA256 | ECDSAP384SHA384\n");
|
||||||
fprintf(stderr, " -3: use NSEC3-capable algorithm\n");
|
fprintf(stderr, " -3: use NSEC3-capable algorithm\n");
|
||||||
fprintf(stderr, " -c class (default: IN)\n");
|
fprintf(stderr, " -c class (default: IN)\n");
|
||||||
fprintf(stderr, " -E <engine>:\n");
|
fprintf(stderr, " -E <engine>:\n");
|
||||||
#if defined(PKCS11CRYPTO)
|
#if USE_PKCS11
|
||||||
fprintf(stderr, " path to PKCS#11 provider library "
|
fprintf(stderr, " path to PKCS#11 provider library "
|
||||||
"(default is %s)\n", PK11_LIB_LOCATION);
|
"(default is %s)\n", PK11_LIB_LOCATION);
|
||||||
#elif defined(USE_PKCS11)
|
|
||||||
fprintf(stderr, " name of an OpenSSL engine to use "
|
|
||||||
"(default is \"pkcs11\")\n");
|
|
||||||
#else
|
#else
|
||||||
fprintf(stderr, " name of an OpenSSL engine to use\n");
|
fprintf(stderr, " name of an OpenSSL engine to use\n");
|
||||||
#endif
|
#endif
|
||||||
@@ -125,19 +123,15 @@ main(int argc, char **argv) {
|
|||||||
const char *directory = NULL;
|
const char *directory = NULL;
|
||||||
const char *predecessor = NULL;
|
const char *predecessor = NULL;
|
||||||
dst_key_t *prevkey = NULL;
|
dst_key_t *prevkey = NULL;
|
||||||
#ifdef USE_PKCS11
|
|
||||||
const char *engine = PKCS11_ENGINE;
|
|
||||||
#else
|
|
||||||
const char *engine = NULL;
|
const char *engine = NULL;
|
||||||
#endif
|
|
||||||
char *classname = NULL;
|
char *classname = NULL;
|
||||||
char *endp;
|
char *endp;
|
||||||
dst_key_t *key = NULL;
|
dst_key_t *key = NULL;
|
||||||
dns_fixedname_t fname;
|
dns_fixedname_t fname;
|
||||||
dns_name_t *name;
|
dns_name_t *name;
|
||||||
isc_uint16_t flags = 0, kskflag = 0, revflag = 0;
|
uint16_t flags = 0, kskflag = 0, revflag = 0;
|
||||||
dns_secalg_t alg;
|
dns_secalg_t alg;
|
||||||
isc_boolean_t oldstyle = ISC_FALSE;
|
bool oldstyle = false;
|
||||||
isc_mem_t *mctx = NULL;
|
isc_mem_t *mctx = NULL;
|
||||||
int ch;
|
int ch;
|
||||||
int protocol = -1, signatory = 0;
|
int protocol = -1, signatory = 0;
|
||||||
@@ -146,7 +140,6 @@ main(int argc, char **argv) {
|
|||||||
char filename[255];
|
char filename[255];
|
||||||
isc_buffer_t buf;
|
isc_buffer_t buf;
|
||||||
isc_log_t *log = NULL;
|
isc_log_t *log = NULL;
|
||||||
isc_entropy_t *ectx = NULL;
|
|
||||||
dns_rdataclass_t rdclass;
|
dns_rdataclass_t rdclass;
|
||||||
int options = DST_TYPE_PRIVATE | DST_TYPE_PUBLIC;
|
int options = DST_TYPE_PRIVATE | DST_TYPE_PUBLIC;
|
||||||
char *label = NULL;
|
char *label = NULL;
|
||||||
@@ -155,32 +148,32 @@ main(int argc, char **argv) {
|
|||||||
isc_stdtime_t inactive = 0, deltime = 0;
|
isc_stdtime_t inactive = 0, deltime = 0;
|
||||||
isc_stdtime_t now;
|
isc_stdtime_t now;
|
||||||
int prepub = -1;
|
int prepub = -1;
|
||||||
isc_boolean_t setpub = ISC_FALSE, setact = ISC_FALSE;
|
bool setpub = false, setact = false;
|
||||||
isc_boolean_t setrev = ISC_FALSE, setinact = ISC_FALSE;
|
bool setrev = false, setinact = false;
|
||||||
isc_boolean_t setdel = ISC_FALSE, setttl = ISC_FALSE;
|
bool setdel = false, setttl = false;
|
||||||
isc_boolean_t unsetpub = ISC_FALSE, unsetact = ISC_FALSE;
|
bool unsetpub = false, unsetact = false;
|
||||||
isc_boolean_t unsetrev = ISC_FALSE, unsetinact = ISC_FALSE;
|
bool unsetrev = false, unsetinact = false;
|
||||||
isc_boolean_t unsetdel = ISC_FALSE;
|
bool unsetdel = false;
|
||||||
isc_boolean_t genonly = ISC_FALSE;
|
bool genonly = false;
|
||||||
isc_boolean_t use_nsec3 = ISC_FALSE;
|
bool use_nsec3 = false;
|
||||||
isc_boolean_t avoid_collisions = ISC_TRUE;
|
bool avoid_collisions = true;
|
||||||
isc_boolean_t exact;
|
bool exact;
|
||||||
unsigned char c;
|
unsigned char c;
|
||||||
isc_stdtime_t syncadd = 0, syncdel = 0;
|
isc_stdtime_t syncadd = 0, syncdel = 0;
|
||||||
isc_boolean_t unsetsyncadd = ISC_FALSE, setsyncadd = ISC_FALSE;
|
bool unsetsyncadd = false, setsyncadd = false;
|
||||||
isc_boolean_t unsetsyncdel = ISC_FALSE, setsyncdel = ISC_FALSE;
|
bool unsetsyncdel = false, setsyncdel = false;
|
||||||
|
|
||||||
if (argc == 1)
|
if (argc == 1)
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
|
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
|
||||||
|
|
||||||
#ifdef PKCS11CRYPTO
|
#if USE_PKCS11
|
||||||
pk11_result_register();
|
pk11_result_register();
|
||||||
#endif
|
#endif
|
||||||
dns_result_register();
|
dns_result_register();
|
||||||
|
|
||||||
isc_commandline_errprint = ISC_FALSE;
|
isc_commandline_errprint = false;
|
||||||
|
|
||||||
isc_stdtime_get(&now);
|
isc_stdtime_get(&now);
|
||||||
|
|
||||||
@@ -188,13 +181,13 @@ main(int argc, char **argv) {
|
|||||||
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case '3':
|
case '3':
|
||||||
use_nsec3 = ISC_TRUE;
|
use_nsec3 = true;
|
||||||
break;
|
break;
|
||||||
case 'a':
|
case 'a':
|
||||||
algname = isc_commandline_argument;
|
algname = isc_commandline_argument;
|
||||||
break;
|
break;
|
||||||
case 'C':
|
case 'C':
|
||||||
oldstyle = ISC_TRUE;
|
oldstyle = true;
|
||||||
break;
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
classname = isc_commandline_argument;
|
classname = isc_commandline_argument;
|
||||||
@@ -224,7 +217,7 @@ main(int argc, char **argv) {
|
|||||||
break;
|
break;
|
||||||
case 'L':
|
case 'L':
|
||||||
ttl = strtottl(isc_commandline_argument);
|
ttl = strtottl(isc_commandline_argument);
|
||||||
setttl = ISC_TRUE;
|
setttl = true;
|
||||||
break;
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
label = isc_mem_strdup(mctx, isc_commandline_argument);
|
label = isc_mem_strdup(mctx, isc_commandline_argument);
|
||||||
@@ -247,10 +240,10 @@ main(int argc, char **argv) {
|
|||||||
fatal("-v must be followed by a number");
|
fatal("-v must be followed by a number");
|
||||||
break;
|
break;
|
||||||
case 'y':
|
case 'y':
|
||||||
avoid_collisions = ISC_FALSE;
|
avoid_collisions = false;
|
||||||
break;
|
break;
|
||||||
case 'G':
|
case 'G':
|
||||||
genonly = ISC_TRUE;
|
genonly = true;
|
||||||
break;
|
break;
|
||||||
case 'P':
|
case 'P':
|
||||||
/* -Psync ? */
|
/* -Psync ? */
|
||||||
@@ -347,10 +340,7 @@ main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ectx == NULL)
|
ret = dst_lib_init(mctx, engine);
|
||||||
setup_entropy(mctx, NULL, &ectx);
|
|
||||||
ret = dst_lib_init2(mctx, ectx, engine,
|
|
||||||
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
|
|
||||||
if (ret != ISC_R_SUCCESS)
|
if (ret != ISC_R_SUCCESS)
|
||||||
fatal("could not initialize dst: %s",
|
fatal("could not initialize dst: %s",
|
||||||
isc_result_totext(ret));
|
isc_result_totext(ret));
|
||||||
@@ -365,8 +355,7 @@ main(int argc, char **argv) {
|
|||||||
if (argc > isc_commandline_index + 1)
|
if (argc > isc_commandline_index + 1)
|
||||||
fatal("extraneous arguments");
|
fatal("extraneous arguments");
|
||||||
|
|
||||||
dns_fixedname_init(&fname);
|
name = dns_fixedname_initname(&fname);
|
||||||
name = dns_fixedname_name(&fname);
|
|
||||||
isc_buffer_init(&buf, argv[isc_commandline_index],
|
isc_buffer_init(&buf, argv[isc_commandline_index],
|
||||||
strlen(argv[isc_commandline_index]));
|
strlen(argv[isc_commandline_index]));
|
||||||
isc_buffer_add(&buf, strlen(argv[isc_commandline_index]));
|
isc_buffer_add(&buf, strlen(argv[isc_commandline_index]));
|
||||||
@@ -394,20 +383,10 @@ main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(algname, "RSA") == 0) {
|
if (strcasecmp(algname, "RSA") == 0) {
|
||||||
#ifndef PK11_MD5_DISABLE
|
|
||||||
fprintf(stderr, "The use of RSA (RSAMD5) is not "
|
fprintf(stderr, "The use of RSA (RSAMD5) is not "
|
||||||
"recommended.\nIf you still wish to "
|
"recommended.\nIf you still wish to "
|
||||||
"use RSA (RSAMD5) please specify "
|
"use RSA (RSAMD5) please specify "
|
||||||
"\"-a RSAMD5\"\n");
|
"\"-a RSAMD5\"\n");
|
||||||
#else
|
|
||||||
fprintf(stderr,
|
|
||||||
"The use of RSA (RSAMD5) was disabled\n");
|
|
||||||
if (freeit != NULL)
|
|
||||||
free(freeit);
|
|
||||||
return (1);
|
|
||||||
} else if (strcasecmp(algname, "RSAMD5") == 0) {
|
|
||||||
fprintf(stderr, "The use of RSAMD5 was disabled\n");
|
|
||||||
#endif
|
|
||||||
if (freeit != NULL)
|
if (freeit != NULL)
|
||||||
free(freeit);
|
free(freeit);
|
||||||
return (1);
|
return (1);
|
||||||
@@ -433,7 +412,6 @@ main(int argc, char **argv) {
|
|||||||
case DST_ALG_NSEC3RSASHA1:
|
case DST_ALG_NSEC3RSASHA1:
|
||||||
case DST_ALG_RSASHA256:
|
case DST_ALG_RSASHA256:
|
||||||
case DST_ALG_RSASHA512:
|
case DST_ALG_RSASHA512:
|
||||||
case DST_ALG_ECCGOST:
|
|
||||||
case DST_ALG_ECDSA256:
|
case DST_ALG_ECDSA256:
|
||||||
case DST_ALG_ECDSA384:
|
case DST_ALG_ECDSA384:
|
||||||
case DST_ALG_ED25519:
|
case DST_ALG_ED25519:
|
||||||
@@ -466,14 +444,14 @@ main(int argc, char **argv) {
|
|||||||
"prepublication interval.");
|
"prepublication interval.");
|
||||||
|
|
||||||
if (!setpub && !setact) {
|
if (!setpub && !setact) {
|
||||||
setpub = setact = ISC_TRUE;
|
setpub = setact = true;
|
||||||
publish = now;
|
publish = now;
|
||||||
activate = now + prepub;
|
activate = now + prepub;
|
||||||
} else if (setpub && !setact) {
|
} else if (setpub && !setact) {
|
||||||
setact = ISC_TRUE;
|
setact = true;
|
||||||
activate = publish + prepub;
|
activate = publish + prepub;
|
||||||
} else if (setact && !setpub) {
|
} else if (setact && !setpub) {
|
||||||
setpub = ISC_TRUE;
|
setpub = true;
|
||||||
publish = activate - prepub;
|
publish = activate - prepub;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -519,11 +497,6 @@ main(int argc, char **argv) {
|
|||||||
alg = dst_key_alg(prevkey);
|
alg = dst_key_alg(prevkey);
|
||||||
flags = dst_key_flags(prevkey);
|
flags = dst_key_flags(prevkey);
|
||||||
|
|
||||||
#ifdef PK11_MD5_DISABLE
|
|
||||||
if (alg == DST_ALG_RSAMD5)
|
|
||||||
fatal("Key %s uses disabled RSAMD5", predecessor);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
dst_key_format(prevkey, keystr, sizeof(keystr));
|
dst_key_format(prevkey, keystr, sizeof(keystr));
|
||||||
dst_key_getprivateformat(prevkey, &major, &minor);
|
dst_key_getprivateformat(prevkey, &major, &minor);
|
||||||
if (major != DST_MAJOR_VERSION || minor < DST_MINOR_VERSION)
|
if (major != DST_MAJOR_VERSION || minor < DST_MINOR_VERSION)
|
||||||
@@ -561,7 +534,7 @@ main(int argc, char **argv) {
|
|||||||
"You can use dnssec-settime -D to "
|
"You can use dnssec-settime -D to "
|
||||||
"change this.\n", program, keystr);
|
"change this.\n", program, keystr);
|
||||||
|
|
||||||
setpub = setact = ISC_TRUE;
|
setpub = setact = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nametype == NULL) {
|
if (nametype == NULL) {
|
||||||
@@ -613,13 +586,12 @@ main(int argc, char **argv) {
|
|||||||
|
|
||||||
/* associate the key */
|
/* associate the key */
|
||||||
ret = dst_key_fromlabel(name, alg, flags, protocol, rdclass,
|
ret = dst_key_fromlabel(name, alg, flags, protocol, rdclass,
|
||||||
#ifdef PKCS11CRYPTO
|
#if USE_PKCS11
|
||||||
"pkcs11",
|
"pkcs11",
|
||||||
#else
|
#else
|
||||||
engine,
|
engine,
|
||||||
#endif
|
#endif
|
||||||
label, NULL, mctx, &key);
|
label, NULL, mctx, &key);
|
||||||
isc_entropy_stopcallbacksources(ectx);
|
|
||||||
|
|
||||||
if (ret != ISC_R_SUCCESS) {
|
if (ret != ISC_R_SUCCESS) {
|
||||||
char namestr[DNS_NAME_FORMATSIZE];
|
char namestr[DNS_NAME_FORMATSIZE];
|
||||||
@@ -738,7 +710,6 @@ main(int argc, char **argv) {
|
|||||||
dst_key_free(&prevkey);
|
dst_key_free(&prevkey);
|
||||||
|
|
||||||
cleanup_logging(&log);
|
cleanup_logging(&log);
|
||||||
cleanup_entropy(&ectx);
|
|
||||||
dst_lib_destroy();
|
dst_lib_destroy();
|
||||||
dns_name_destroy();
|
dns_name_destroy();
|
||||||
if (verbose > 10)
|
if (verbose > 10)
|
||||||
|
|||||||
@@ -106,7 +106,7 @@
|
|||||||
<para>
|
<para>
|
||||||
Selects the cryptographic algorithm. The value of
|
Selects the cryptographic algorithm. The value of
|
||||||
<option>algorithm</option> must be one of RSAMD5, RSASHA1,
|
<option>algorithm</option> must be one of RSAMD5, RSASHA1,
|
||||||
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
|
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512,
|
||||||
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448.
|
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2008-2012, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2008-2012, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
<p>
|
<p>
|
||||||
Selects the cryptographic algorithm. The value of
|
Selects the cryptographic algorithm. The value of
|
||||||
<code class="option">algorithm</code> must be one of RSAMD5, RSASHA1,
|
<code class="option">algorithm</code> must be one of RSAMD5, RSASHA1,
|
||||||
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
|
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512,
|
||||||
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448.
|
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
dnssec-keygen \- DNSSEC key generation tool
|
dnssec-keygen \- DNSSEC key generation tool
|
||||||
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
||||||
.HP \w'\fBdnssec\-keygen\fR\ 'u
|
.HP \w'\fBdnssec\-keygen\fR\ 'u
|
||||||
\fBdnssec\-keygen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-b\ \fR\fB\fIkeysize\fR\fR] [\fB\-n\ \fR\fB\fInametype\fR\fR] [\fB\-3\fR] [\fB\-A\ \fR\fB\fIdate/offset\fR\fR] [\fB\-C\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-D\ \fR\fB\fIdate/offset\fR\fR] [\fB\-D\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-f\ \fR\fB\fIflag\fR\fR] [\fB\-G\fR] [\fB\-g\ \fR\fB\fIgenerator\fR\fR] [\fB\-h\fR] [\fB\-I\ \fR\fB\fIdate/offset\fR\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\fR] [\fB\-L\ \fR\fB\fIttl\fR\fR] [\fB\-P\ \fR\fB\fIdate/offset\fR\fR] [\fB\-P\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-p\ \fR\fB\fIprotocol\fR\fR] [\fB\-q\fR] [\fB\-R\ \fR\fB\fIdate/offset\fR\fR] [\fB\-r\ \fR\fB\fIrandomdev\fR\fR] [\fB\-S\ \fR\fB\fIkey\fR\fR] [\fB\-s\ \fR\fB\fIstrength\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-V\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-z\fR] {name}
|
\fBdnssec\-keygen\fR [\fB\-a\ \fR\fB\fIalgorithm\fR\fR] [\fB\-b\ \fR\fB\fIkeysize\fR\fR] [\fB\-n\ \fR\fB\fInametype\fR\fR] [\fB\-3\fR] [\fB\-A\ \fR\fB\fIdate/offset\fR\fR] [\fB\-C\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-D\ \fR\fB\fIdate/offset\fR\fR] [\fB\-D\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-f\ \fR\fB\fIflag\fR\fR] [\fB\-G\fR] [\fB\-g\ \fR\fB\fIgenerator\fR\fR] [\fB\-h\fR] [\fB\-I\ \fR\fB\fIdate/offset\fR\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\fR] [\fB\-L\ \fR\fB\fIttl\fR\fR] [\fB\-P\ \fR\fB\fIdate/offset\fR\fR] [\fB\-P\ sync\ \fR\fB\fIdate/offset\fR\fR] [\fB\-p\ \fR\fB\fIprotocol\fR\fR] [\fB\-q\fR] [\fB\-R\ \fR\fB\fIdate/offset\fR\fR] [\fB\-S\ \fR\fB\fIkey\fR\fR] [\fB\-s\ \fR\fB\fIstrength\fR\fR] [\fB\-t\ \fR\fB\fItype\fR\fR] [\fB\-V\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-z\fR] {name}
|
||||||
.SH "DESCRIPTION"
|
.SH "DESCRIPTION"
|
||||||
.PP
|
.PP
|
||||||
\fBdnssec\-keygen\fR
|
\fBdnssec\-keygen\fR
|
||||||
@@ -62,7 +62,7 @@ may be preferable to direct use of
|
|||||||
.RS 4
|
.RS 4
|
||||||
Selects the cryptographic algorithm\&. For DNSSEC keys, the value of
|
Selects the cryptographic algorithm\&. For DNSSEC keys, the value of
|
||||||
\fBalgorithm\fR
|
\fBalgorithm\fR
|
||||||
must be one of RSAMD5, RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&. For TKEY, the value must be DH (Diffie Hellman); specifying his value will automatically set the
|
must be one of RSAMD5, RSASHA1, DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448\&. For TKEY, the value must be DH (Diffie Hellman); specifying his value will automatically set the
|
||||||
\fB\-T KEY\fR
|
\fB\-T KEY\fR
|
||||||
option as well\&.
|
option as well\&.
|
||||||
.sp
|
.sp
|
||||||
@@ -178,21 +178,6 @@ stderr
|
|||||||
indicating the progress of the key generation\&. A \*(Aq\&.\*(Aq indicates that a random number has been found which passed an initial sieve test; \*(Aq+\*(Aq means a number has passed a single round of the Miller\-Rabin primality test; a space means that the number has passed all the tests and is a satisfactory key\&.
|
indicating the progress of the key generation\&. A \*(Aq\&.\*(Aq indicates that a random number has been found which passed an initial sieve test; \*(Aq+\*(Aq means a number has passed a single round of the Miller\-Rabin primality test; a space means that the number has passed all the tests and is a satisfactory key\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-r \fIrandomdev\fR
|
|
||||||
.RS 4
|
|
||||||
Specifies a source of randomness\&. Normally, when generating DNSSEC keys, this option has no effect; the random number generation function provided by the cryptographic library will be used\&.
|
|
||||||
.sp
|
|
||||||
If that behavior is disabled at compile time, however, the specified file will be used as entropy source for key generation\&.
|
|
||||||
randomdev
|
|
||||||
is the name of a character device or file containing random data to be used\&. The special value
|
|
||||||
keyboard
|
|
||||||
indicates that keyboard input should be used\&.
|
|
||||||
.sp
|
|
||||||
The default is
|
|
||||||
/dev/random
|
|
||||||
if the operating system provides it or an equivalent device; if not, the default source of randomness is keyboard input\&.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
\-S \fIkey\fR
|
\-S \fIkey\fR
|
||||||
.RS 4
|
.RS 4
|
||||||
Create a new key which is an explicit successor to an existing key\&. The name, algorithm, size, and type of the key will be set to match the existing key\&. The activation date of the new key will be set to the inactivation date of the existing one\&. The publication date will be set to the activation date minus the prepublication interval, which defaults to 30 days\&.
|
Create a new key which is an explicit successor to an existing key\&. The name, algorithm, size, and type of the key will be set to match the existing key\&. The activation date of the new key will be set to the inactivation date of the existing one\&. The publication date will be set to the activation date minus the prepublication interval, which defaults to 30 days\&.
|
||||||
|
|||||||
+51
-80
@@ -28,12 +28,13 @@
|
|||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <isc/buffer.h>
|
#include <isc/buffer.h>
|
||||||
#include <isc/commandline.h>
|
#include <isc/commandline.h>
|
||||||
#include <isc/entropy.h>
|
|
||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
#include <isc/print.h>
|
#include <isc/print.h>
|
||||||
#include <isc/region.h>
|
#include <isc/region.h>
|
||||||
@@ -53,7 +54,7 @@
|
|||||||
|
|
||||||
#include <dst/dst.h>
|
#include <dst/dst.h>
|
||||||
|
|
||||||
#ifdef PKCS11CRYPTO
|
#if USE_PKCS11
|
||||||
#include <pk11/result.h>
|
#include <pk11/result.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -80,7 +81,7 @@ usage(void) {
|
|||||||
fprintf(stderr, " -a <algorithm>:\n");
|
fprintf(stderr, " -a <algorithm>:\n");
|
||||||
fprintf(stderr, " RSA | RSAMD5 | DSA | RSASHA1 | NSEC3RSASHA1"
|
fprintf(stderr, " RSA | RSAMD5 | DSA | RSASHA1 | NSEC3RSASHA1"
|
||||||
" | NSEC3DSA |\n");
|
" | NSEC3DSA |\n");
|
||||||
fprintf(stderr, " RSASHA256 | RSASHA512 | ECCGOST |\n");
|
fprintf(stderr, " RSASHA256 | RSASHA512 |\n");
|
||||||
fprintf(stderr, " ECDSAP256SHA256 | ECDSAP384SHA384 |\n");
|
fprintf(stderr, " ECDSAP256SHA256 | ECDSAP384SHA384 |\n");
|
||||||
fprintf(stderr, " ED25519 | ED448 | DH\n");
|
fprintf(stderr, " ED25519 | ED448 | DH\n");
|
||||||
fprintf(stderr, " -3: use NSEC3-capable algorithm\n");
|
fprintf(stderr, " -3: use NSEC3-capable algorithm\n");
|
||||||
@@ -107,12 +108,9 @@ usage(void) {
|
|||||||
fprintf(stderr, " -c <class>: (default: IN)\n");
|
fprintf(stderr, " -c <class>: (default: IN)\n");
|
||||||
fprintf(stderr, " -d <digest bits> (0 => max, default)\n");
|
fprintf(stderr, " -d <digest bits> (0 => max, default)\n");
|
||||||
fprintf(stderr, " -E <engine>:\n");
|
fprintf(stderr, " -E <engine>:\n");
|
||||||
#if defined(PKCS11CRYPTO)
|
#if USE_PKCS11
|
||||||
fprintf(stderr, " path to PKCS#11 provider library "
|
fprintf(stderr, " path to PKCS#11 provider library "
|
||||||
"(default is %s)\n", PK11_LIB_LOCATION);
|
"(default is %s)\n", PK11_LIB_LOCATION);
|
||||||
#elif defined(USE_PKCS11)
|
|
||||||
fprintf(stderr, " name of an OpenSSL engine to use "
|
|
||||||
"(default is \"pkcs11\")\n");
|
|
||||||
#else
|
#else
|
||||||
fprintf(stderr, " name of an OpenSSL engine to use\n");
|
fprintf(stderr, " name of an OpenSSL engine to use\n");
|
||||||
#endif
|
#endif
|
||||||
@@ -121,7 +119,6 @@ usage(void) {
|
|||||||
"(DH only)\n");
|
"(DH only)\n");
|
||||||
fprintf(stderr, " -L <ttl>: default key TTL\n");
|
fprintf(stderr, " -L <ttl>: default key TTL\n");
|
||||||
fprintf(stderr, " -p <protocol>: (default: 3 [dnssec])\n");
|
fprintf(stderr, " -p <protocol>: (default: 3 [dnssec])\n");
|
||||||
fprintf(stderr, " -r <randomdev>: a file containing random data\n");
|
|
||||||
fprintf(stderr, " -s <strength>: strength value this key signs DNS "
|
fprintf(stderr, " -s <strength>: strength value this key signs DNS "
|
||||||
"records with (default: 0)\n");
|
"records with (default: 0)\n");
|
||||||
fprintf(stderr, " -T <rrtype>: DNSKEY | KEY (default: DNSKEY; "
|
fprintf(stderr, " -T <rrtype>: DNSKEY | KEY (default: DNSKEY; "
|
||||||
@@ -164,9 +161,9 @@ usage(void) {
|
|||||||
exit (-1);
|
exit (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static isc_boolean_t
|
static bool
|
||||||
dsa_size_ok(int size) {
|
dsa_size_ok(int size) {
|
||||||
return (ISC_TF(size >= 512 && size <= 1024 && size % 64 == 0));
|
return (size >= 512 && size <= 1024 && size % 64 == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -203,10 +200,10 @@ main(int argc, char **argv) {
|
|||||||
dst_key_t *key = NULL;
|
dst_key_t *key = NULL;
|
||||||
dns_fixedname_t fname;
|
dns_fixedname_t fname;
|
||||||
dns_name_t *name;
|
dns_name_t *name;
|
||||||
isc_uint16_t flags = 0, kskflag = 0, revflag = 0;
|
uint16_t flags = 0, kskflag = 0, revflag = 0;
|
||||||
dns_secalg_t alg;
|
dns_secalg_t alg;
|
||||||
isc_boolean_t conflict = ISC_FALSE, null_key = ISC_FALSE;
|
bool conflict = false, null_key = false;
|
||||||
isc_boolean_t oldstyle = ISC_FALSE;
|
bool oldstyle = false;
|
||||||
isc_mem_t *mctx = NULL;
|
isc_mem_t *mctx = NULL;
|
||||||
int ch, generator = 0, param = 0;
|
int ch, generator = 0, param = 0;
|
||||||
int protocol = -1, size = -1, signatory = 0;
|
int protocol = -1, size = -1, signatory = 0;
|
||||||
@@ -218,44 +215,39 @@ main(int argc, char **argv) {
|
|||||||
dst_key_t *prevkey = NULL;
|
dst_key_t *prevkey = NULL;
|
||||||
isc_buffer_t buf;
|
isc_buffer_t buf;
|
||||||
isc_log_t *log = NULL;
|
isc_log_t *log = NULL;
|
||||||
isc_entropy_t *ectx = NULL;
|
|
||||||
#ifdef USE_PKCS11
|
|
||||||
const char *engine = PKCS11_ENGINE;
|
|
||||||
#else
|
|
||||||
const char *engine = NULL;
|
const char *engine = NULL;
|
||||||
#endif
|
|
||||||
dns_rdataclass_t rdclass;
|
dns_rdataclass_t rdclass;
|
||||||
int options = DST_TYPE_PRIVATE | DST_TYPE_PUBLIC;
|
int options = DST_TYPE_PRIVATE | DST_TYPE_PUBLIC;
|
||||||
int dbits = 0;
|
int dbits = 0;
|
||||||
dns_ttl_t ttl = 0;
|
dns_ttl_t ttl = 0;
|
||||||
isc_boolean_t use_nsec3 = ISC_FALSE;
|
bool use_nsec3 = false;
|
||||||
isc_stdtime_t publish = 0, activate = 0, revokekey = 0;
|
isc_stdtime_t publish = 0, activate = 0, revokekey = 0;
|
||||||
isc_stdtime_t inactive = 0, deltime = 0;
|
isc_stdtime_t inactive = 0, deltime = 0;
|
||||||
isc_stdtime_t now;
|
isc_stdtime_t now;
|
||||||
int prepub = -1;
|
int prepub = -1;
|
||||||
isc_boolean_t setpub = ISC_FALSE, setact = ISC_FALSE;
|
bool setpub = false, setact = false;
|
||||||
isc_boolean_t setrev = ISC_FALSE, setinact = ISC_FALSE;
|
bool setrev = false, setinact = false;
|
||||||
isc_boolean_t setdel = ISC_FALSE, setttl = ISC_FALSE;
|
bool setdel = false, setttl = false;
|
||||||
isc_boolean_t unsetpub = ISC_FALSE, unsetact = ISC_FALSE;
|
bool unsetpub = false, unsetact = false;
|
||||||
isc_boolean_t unsetrev = ISC_FALSE, unsetinact = ISC_FALSE;
|
bool unsetrev = false, unsetinact = false;
|
||||||
isc_boolean_t unsetdel = ISC_FALSE;
|
bool unsetdel = false;
|
||||||
isc_boolean_t genonly = ISC_FALSE;
|
bool genonly = false;
|
||||||
isc_boolean_t quiet = ISC_FALSE;
|
bool quiet = false;
|
||||||
isc_boolean_t show_progress = ISC_FALSE;
|
bool show_progress = false;
|
||||||
unsigned char c;
|
unsigned char c;
|
||||||
isc_stdtime_t syncadd = 0, syncdel = 0;
|
isc_stdtime_t syncadd = 0, syncdel = 0;
|
||||||
isc_boolean_t setsyncadd = ISC_FALSE;
|
bool setsyncadd = false;
|
||||||
isc_boolean_t setsyncdel = ISC_FALSE;
|
bool setsyncdel = false;
|
||||||
|
|
||||||
if (argc == 1)
|
if (argc == 1)
|
||||||
usage();
|
usage();
|
||||||
|
|
||||||
#ifdef PKCS11CRYPTO
|
#if USE_PKCS11
|
||||||
pk11_result_register();
|
pk11_result_register();
|
||||||
#endif
|
#endif
|
||||||
dns_result_register();
|
dns_result_register();
|
||||||
|
|
||||||
isc_commandline_errprint = ISC_FALSE;
|
isc_commandline_errprint = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Process memory debugging argument first.
|
* Process memory debugging argument first.
|
||||||
@@ -280,7 +272,7 @@ main(int argc, char **argv) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
isc_commandline_reset = ISC_TRUE;
|
isc_commandline_reset = true;
|
||||||
|
|
||||||
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
|
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
|
||||||
|
|
||||||
@@ -289,7 +281,7 @@ main(int argc, char **argv) {
|
|||||||
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case '3':
|
case '3':
|
||||||
use_nsec3 = ISC_TRUE;
|
use_nsec3 = true;
|
||||||
break;
|
break;
|
||||||
case 'a':
|
case 'a':
|
||||||
algname = isc_commandline_argument;
|
algname = isc_commandline_argument;
|
||||||
@@ -300,7 +292,7 @@ main(int argc, char **argv) {
|
|||||||
fatal("-b requires a non-negative number");
|
fatal("-b requires a non-negative number");
|
||||||
break;
|
break;
|
||||||
case 'C':
|
case 'C':
|
||||||
oldstyle = ISC_TRUE;
|
oldstyle = true;
|
||||||
break;
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
classname = isc_commandline_argument;
|
classname = isc_commandline_argument;
|
||||||
@@ -348,7 +340,7 @@ main(int argc, char **argv) {
|
|||||||
break;
|
break;
|
||||||
case 'L':
|
case 'L':
|
||||||
ttl = strtottl(isc_commandline_argument);
|
ttl = strtottl(isc_commandline_argument);
|
||||||
setttl = ISC_TRUE;
|
setttl = true;
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
nametype = isc_commandline_argument;
|
nametype = isc_commandline_argument;
|
||||||
@@ -362,10 +354,11 @@ main(int argc, char **argv) {
|
|||||||
"[0..255]");
|
"[0..255]");
|
||||||
break;
|
break;
|
||||||
case 'q':
|
case 'q':
|
||||||
quiet = ISC_TRUE;
|
quiet = true;
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
setup_entropy(mctx, isc_commandline_argument, &ectx);
|
fatal("The -r option has been deprecated.\n"
|
||||||
|
"System random data is always used.\n");
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
signatory = strtol(isc_commandline_argument,
|
signatory = strtol(isc_commandline_argument,
|
||||||
@@ -398,7 +391,7 @@ main(int argc, char **argv) {
|
|||||||
/* already the default */
|
/* already the default */
|
||||||
break;
|
break;
|
||||||
case 'G':
|
case 'G':
|
||||||
genonly = ISC_TRUE;
|
genonly = true;
|
||||||
break;
|
break;
|
||||||
case 'P':
|
case 'P':
|
||||||
/* -Psync ? */
|
/* -Psync ? */
|
||||||
@@ -492,12 +485,9 @@ main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!isatty(0))
|
if (!isatty(0))
|
||||||
quiet = ISC_TRUE;
|
quiet = true;
|
||||||
|
|
||||||
if (ectx == NULL)
|
ret = dst_lib_init(mctx, engine);
|
||||||
setup_entropy(mctx, NULL, &ectx);
|
|
||||||
ret = dst_lib_init2(mctx, ectx, engine,
|
|
||||||
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
|
|
||||||
if (ret != ISC_R_SUCCESS)
|
if (ret != ISC_R_SUCCESS)
|
||||||
fatal("could not initialize dst: %s",
|
fatal("could not initialize dst: %s",
|
||||||
isc_result_totext(ret));
|
isc_result_totext(ret));
|
||||||
@@ -513,8 +503,7 @@ main(int argc, char **argv) {
|
|||||||
if (argc > isc_commandline_index + 1)
|
if (argc > isc_commandline_index + 1)
|
||||||
fatal("extraneous arguments");
|
fatal("extraneous arguments");
|
||||||
|
|
||||||
dns_fixedname_init(&fname);
|
name = dns_fixedname_initname(&fname);
|
||||||
name = dns_fixedname_name(&fname);
|
|
||||||
isc_buffer_init(&buf, argv[isc_commandline_index],
|
isc_buffer_init(&buf, argv[isc_commandline_index],
|
||||||
strlen(argv[isc_commandline_index]));
|
strlen(argv[isc_commandline_index]));
|
||||||
isc_buffer_add(&buf, strlen(argv[isc_commandline_index]));
|
isc_buffer_add(&buf, strlen(argv[isc_commandline_index]));
|
||||||
@@ -529,23 +518,12 @@ main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (strcasecmp(algname, "RSA") == 0) {
|
if (strcasecmp(algname, "RSA") == 0) {
|
||||||
#ifndef PK11_MD5_DISABLE
|
|
||||||
fprintf(stderr, "The use of RSA (RSAMD5) is not "
|
fprintf(stderr, "The use of RSA (RSAMD5) is not "
|
||||||
"recommended.\nIf you still wish to "
|
"recommended.\nIf you still wish to "
|
||||||
"use RSA (RSAMD5) please specify "
|
"use RSA (RSAMD5) please specify "
|
||||||
"\"-a RSAMD5\"\n");
|
"\"-a RSAMD5\"\n");
|
||||||
INSIST(freeit == NULL);
|
INSIST(freeit == NULL);
|
||||||
return (1);
|
return (1);
|
||||||
#else
|
|
||||||
fprintf(stderr,
|
|
||||||
"The use of RSA (RSAMD5) was disabled\n");
|
|
||||||
INSIST(freeit == NULL);
|
|
||||||
return (1);
|
|
||||||
} else if (strcasecmp(algname, "RSAMD5") == 0) {
|
|
||||||
fprintf(stderr, "The use of RSAMD5 was disabled\n");
|
|
||||||
INSIST(freeit == NULL);
|
|
||||||
return (1);
|
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
r.base = algname;
|
r.base = algname;
|
||||||
r.length = strlen(algname);
|
r.length = strlen(algname);
|
||||||
@@ -558,10 +536,6 @@ main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PK11_MD5_DISABLE
|
|
||||||
INSIST((alg != DNS_KEYALG_RSAMD5));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!dst_algorithm_supported(alg)) {
|
if (!dst_algorithm_supported(alg)) {
|
||||||
fatal("unsupported algorithm: %d", alg);
|
fatal("unsupported algorithm: %d", alg);
|
||||||
}
|
}
|
||||||
@@ -642,14 +616,14 @@ main(int argc, char **argv) {
|
|||||||
"prepublication interval.");
|
"prepublication interval.");
|
||||||
|
|
||||||
if (!setpub && !setact) {
|
if (!setpub && !setact) {
|
||||||
setpub = setact = ISC_TRUE;
|
setpub = setact = true;
|
||||||
publish = now;
|
publish = now;
|
||||||
activate = now + prepub;
|
activate = now + prepub;
|
||||||
} else if (setpub && !setact) {
|
} else if (setpub && !setact) {
|
||||||
setact = ISC_TRUE;
|
setact = true;
|
||||||
activate = publish + prepub;
|
activate = publish + prepub;
|
||||||
} else if (setact && !setpub) {
|
} else if (setact && !setpub) {
|
||||||
setpub = ISC_TRUE;
|
setpub = true;
|
||||||
publish = activate - prepub;
|
publish = activate - prepub;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -735,7 +709,7 @@ main(int argc, char **argv) {
|
|||||||
"You can use dnssec-settime -D to "
|
"You can use dnssec-settime -D to "
|
||||||
"change this.\n", program, keystr);
|
"change this.\n", program, keystr);
|
||||||
|
|
||||||
setpub = setact = ISC_TRUE;
|
setpub = setact = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (alg) {
|
switch (alg) {
|
||||||
@@ -834,7 +808,7 @@ main(int argc, char **argv) {
|
|||||||
case DNS_KEYALG_NSEC3RSASHA1:
|
case DNS_KEYALG_NSEC3RSASHA1:
|
||||||
case DNS_KEYALG_RSASHA256:
|
case DNS_KEYALG_RSASHA256:
|
||||||
case DNS_KEYALG_RSASHA512:
|
case DNS_KEYALG_RSASHA512:
|
||||||
show_progress = ISC_TRUE;
|
show_progress = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DNS_KEYALG_DH:
|
case DNS_KEYALG_DH:
|
||||||
@@ -848,33 +822,31 @@ main(int argc, char **argv) {
|
|||||||
case DST_ALG_ECDSA384:
|
case DST_ALG_ECDSA384:
|
||||||
case DST_ALG_ED25519:
|
case DST_ALG_ED25519:
|
||||||
case DST_ALG_ED448:
|
case DST_ALG_ED448:
|
||||||
show_progress = ISC_TRUE;
|
show_progress = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((flags & DNS_KEYFLAG_TYPEMASK) == DNS_KEYTYPE_NOKEY)
|
if ((flags & DNS_KEYFLAG_TYPEMASK) == DNS_KEYTYPE_NOKEY)
|
||||||
null_key = ISC_TRUE;
|
null_key = true;
|
||||||
|
|
||||||
isc_buffer_init(&buf, filename, sizeof(filename) - 1);
|
isc_buffer_init(&buf, filename, sizeof(filename) - 1);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
conflict = ISC_FALSE;
|
conflict = false;
|
||||||
|
|
||||||
if (!quiet && show_progress) {
|
if (!quiet && show_progress) {
|
||||||
fprintf(stderr, "Generating key pair.");
|
fprintf(stderr, "Generating key pair.");
|
||||||
ret = dst_key_generate2(name, alg, size, param, flags,
|
ret = dst_key_generate(name, alg, size, param, flags,
|
||||||
protocol, rdclass, mctx, &key,
|
protocol, rdclass, mctx, &key,
|
||||||
&progress);
|
&progress);
|
||||||
putc('\n', stderr);
|
putc('\n', stderr);
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
} else {
|
} else {
|
||||||
ret = dst_key_generate2(name, alg, size, param, flags,
|
ret = dst_key_generate(name, alg, size, param, flags,
|
||||||
protocol, rdclass, mctx, &key,
|
protocol, rdclass, mctx, &key,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
isc_entropy_stopcallbacksources(ectx);
|
|
||||||
|
|
||||||
if (ret != ISC_R_SUCCESS) {
|
if (ret != ISC_R_SUCCESS) {
|
||||||
char namestr[DNS_NAME_FORMATSIZE];
|
char namestr[DNS_NAME_FORMATSIZE];
|
||||||
char algstr[DNS_SECALG_FORMATSIZE];
|
char algstr[DNS_SECALG_FORMATSIZE];
|
||||||
@@ -981,7 +953,7 @@ main(int argc, char **argv) {
|
|||||||
* or another key being revoked.
|
* or another key being revoked.
|
||||||
*/
|
*/
|
||||||
if (key_collision(key, name, directory, mctx, NULL)) {
|
if (key_collision(key, name, directory, mctx, NULL)) {
|
||||||
conflict = ISC_TRUE;
|
conflict = true;
|
||||||
if (null_key) {
|
if (null_key) {
|
||||||
dst_key_free(&key);
|
dst_key_free(&key);
|
||||||
break;
|
break;
|
||||||
@@ -1002,7 +974,7 @@ main(int argc, char **argv) {
|
|||||||
|
|
||||||
dst_key_free(&key);
|
dst_key_free(&key);
|
||||||
}
|
}
|
||||||
} while (conflict == ISC_TRUE);
|
} while (conflict == true);
|
||||||
|
|
||||||
if (conflict)
|
if (conflict)
|
||||||
fatal("cannot generate a null key due to possible key ID "
|
fatal("cannot generate a null key due to possible key ID "
|
||||||
@@ -1027,7 +999,6 @@ main(int argc, char **argv) {
|
|||||||
dst_key_free(&prevkey);
|
dst_key_free(&prevkey);
|
||||||
|
|
||||||
cleanup_logging(&log);
|
cleanup_logging(&log);
|
||||||
cleanup_entropy(&ectx);
|
|
||||||
dst_lib_destroy();
|
dst_lib_destroy();
|
||||||
dns_name_destroy();
|
dns_name_destroy();
|
||||||
if (verbose > 10)
|
if (verbose > 10)
|
||||||
|
|||||||
@@ -81,7 +81,6 @@
|
|||||||
<arg choice="opt" rep="norepeat"><option>-p <replaceable class="parameter">protocol</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-p <replaceable class="parameter">protocol</replaceable></option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-q</option></arg>
|
<arg choice="opt" rep="norepeat"><option>-q</option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-R <replaceable class="parameter">date/offset</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-R <replaceable class="parameter">date/offset</replaceable></option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">randomdev</replaceable></option></arg>
|
|
||||||
<arg choice="opt" rep="norepeat"><option>-S <replaceable class="parameter">key</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-S <replaceable class="parameter">key</replaceable></option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">strength</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">strength</replaceable></option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">type</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">type</replaceable></option></arg>
|
||||||
@@ -124,7 +123,7 @@
|
|||||||
<para>
|
<para>
|
||||||
Selects the cryptographic algorithm. For DNSSEC keys, the value
|
Selects the cryptographic algorithm. For DNSSEC keys, the value
|
||||||
of <option>algorithm</option> must be one of RSAMD5, RSASHA1,
|
of <option>algorithm</option> must be one of RSAMD5, RSASHA1,
|
||||||
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
|
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512,
|
||||||
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448. For
|
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448. For
|
||||||
TKEY, the value must be DH (Diffie Hellman); specifying
|
TKEY, the value must be DH (Diffie Hellman); specifying
|
||||||
his value will automatically set the <option>-T KEY</option>
|
his value will automatically set the <option>-T KEY</option>
|
||||||
@@ -349,31 +348,6 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>-r <replaceable class="parameter">randomdev</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Specifies a source of randomness. Normally, when generating
|
|
||||||
DNSSEC keys, this option has no effect; the random number
|
|
||||||
generation function provided by the cryptographic library will
|
|
||||||
be used.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
If that behavior is disabled at compile time, however,
|
|
||||||
the specified file will be used as entropy source
|
|
||||||
for key generation. <filename>randomdev</filename> is
|
|
||||||
the name of a character device or file containing random
|
|
||||||
data to be used. The special value <filename>keyboard</filename>
|
|
||||||
indicates that keyboard input should be used.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
The default is <filename>/dev/random</filename> if the
|
|
||||||
operating system provides it or an equivalent device;
|
|
||||||
if not, the default source of randomness is keyboard input.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-S <replaceable class="parameter">key</replaceable></term>
|
<term>-S <replaceable class="parameter">key</replaceable></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|||||||
@@ -57,7 +57,6 @@
|
|||||||
[<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>]
|
[<code class="option">-p <em class="replaceable"><code>protocol</code></em></code>]
|
||||||
[<code class="option">-q</code>]
|
[<code class="option">-q</code>]
|
||||||
[<code class="option">-R <em class="replaceable"><code>date/offset</code></em></code>]
|
[<code class="option">-R <em class="replaceable"><code>date/offset</code></em></code>]
|
||||||
[<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>]
|
|
||||||
[<code class="option">-S <em class="replaceable"><code>key</code></em></code>]
|
[<code class="option">-S <em class="replaceable"><code>key</code></em></code>]
|
||||||
[<code class="option">-s <em class="replaceable"><code>strength</code></em></code>]
|
[<code class="option">-s <em class="replaceable"><code>strength</code></em></code>]
|
||||||
[<code class="option">-t <em class="replaceable"><code>type</code></em></code>]
|
[<code class="option">-t <em class="replaceable"><code>type</code></em></code>]
|
||||||
@@ -101,7 +100,7 @@
|
|||||||
<p>
|
<p>
|
||||||
Selects the cryptographic algorithm. For DNSSEC keys, the value
|
Selects the cryptographic algorithm. For DNSSEC keys, the value
|
||||||
of <code class="option">algorithm</code> must be one of RSAMD5, RSASHA1,
|
of <code class="option">algorithm</code> must be one of RSAMD5, RSASHA1,
|
||||||
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512, ECCGOST,
|
DSA, NSEC3RSASHA1, NSEC3DSA, RSASHA256, RSASHA512,
|
||||||
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448. For
|
ECDSAP256SHA256, ECDSAP384SHA384, ED25519 or ED448. For
|
||||||
TKEY, the value must be DH (Diffie Hellman); specifying
|
TKEY, the value must be DH (Diffie Hellman); specifying
|
||||||
his value will automatically set the <code class="option">-T KEY</code>
|
his value will automatically set the <code class="option">-T KEY</code>
|
||||||
@@ -279,28 +278,6 @@
|
|||||||
a satisfactory key.
|
a satisfactory key.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term">-r <em class="replaceable"><code>randomdev</code></em></span></dt>
|
|
||||||
<dd>
|
|
||||||
<p>
|
|
||||||
Specifies a source of randomness. Normally, when generating
|
|
||||||
DNSSEC keys, this option has no effect; the random number
|
|
||||||
generation function provided by the cryptographic library will
|
|
||||||
be used.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
If that behavior is disabled at compile time, however,
|
|
||||||
the specified file will be used as entropy source
|
|
||||||
for key generation. <code class="filename">randomdev</code> is
|
|
||||||
the name of a character device or file containing random
|
|
||||||
data to be used. The special value <code class="filename">keyboard</code>
|
|
||||||
indicates that keyboard input should be used.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The default is <code class="filename">/dev/random</code> if the
|
|
||||||
operating system provides it or an equivalent device;
|
|
||||||
if not, the default source of randomness is keyboard input.
|
|
||||||
</p>
|
|
||||||
</dd>
|
|
||||||
<dt><span class="term">-S <em class="replaceable"><code>key</code></em></span></dt>
|
<dt><span class="term">-S <em class="replaceable"><code>key</code></em></span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2009, 2011, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2009, 2011, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -99,5 +99,5 @@ RFC 5011\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2009, 2011, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2009, 2011, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
+14
-30
@@ -13,12 +13,13 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <isc/buffer.h>
|
#include <isc/buffer.h>
|
||||||
#include <isc/commandline.h>
|
#include <isc/commandline.h>
|
||||||
#include <isc/entropy.h>
|
|
||||||
#include <isc/file.h>
|
#include <isc/file.h>
|
||||||
#include <isc/hash.h>
|
#include <isc/hash.h>
|
||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
@@ -31,7 +32,7 @@
|
|||||||
|
|
||||||
#include <dst/dst.h>
|
#include <dst/dst.h>
|
||||||
|
|
||||||
#ifdef PKCS11CRYPTO
|
#if USE_PKCS11
|
||||||
#include <pk11/result.h>
|
#include <pk11/result.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -50,12 +51,9 @@ usage(void) {
|
|||||||
fprintf(stderr, "Usage:\n");
|
fprintf(stderr, "Usage:\n");
|
||||||
fprintf(stderr, " %s [options] keyfile\n\n", program);
|
fprintf(stderr, " %s [options] keyfile\n\n", program);
|
||||||
fprintf(stderr, "Version: %s\n", VERSION);
|
fprintf(stderr, "Version: %s\n", VERSION);
|
||||||
#if defined(PKCS11CRYPTO)
|
#if USE_PKCS11
|
||||||
fprintf(stderr, " -E engine: specify PKCS#11 provider "
|
fprintf(stderr, " -E engine: specify PKCS#11 provider "
|
||||||
"(default: %s)\n", PK11_LIB_LOCATION);
|
"(default: %s)\n", PK11_LIB_LOCATION);
|
||||||
#elif defined(USE_PKCS11)
|
|
||||||
fprintf(stderr, " -E engine: specify OpenSSL engine "
|
|
||||||
"(default \"pkcs11\")\n");
|
|
||||||
#else
|
#else
|
||||||
fprintf(stderr, " -E engine: specify OpenSSL engine\n");
|
fprintf(stderr, " -E engine: specify OpenSSL engine\n");
|
||||||
#endif
|
#endif
|
||||||
@@ -76,24 +74,19 @@ usage(void) {
|
|||||||
int
|
int
|
||||||
main(int argc, char **argv) {
|
main(int argc, char **argv) {
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
#ifdef USE_PKCS11
|
|
||||||
const char *engine = PKCS11_ENGINE;
|
|
||||||
#else
|
|
||||||
const char *engine = NULL;
|
const char *engine = NULL;
|
||||||
#endif
|
|
||||||
char const *filename = NULL;
|
char const *filename = NULL;
|
||||||
char *dir = NULL;
|
char *dir = NULL;
|
||||||
char newname[1024], oldname[1024];
|
char newname[1024], oldname[1024];
|
||||||
char keystr[DST_KEY_FORMATSIZE];
|
char keystr[DST_KEY_FORMATSIZE];
|
||||||
char *endp;
|
char *endp;
|
||||||
int ch;
|
int ch;
|
||||||
isc_entropy_t *ectx = NULL;
|
|
||||||
dst_key_t *key = NULL;
|
dst_key_t *key = NULL;
|
||||||
isc_uint32_t flags;
|
uint32_t flags;
|
||||||
isc_buffer_t buf;
|
isc_buffer_t buf;
|
||||||
isc_boolean_t force = ISC_FALSE;
|
bool force = false;
|
||||||
isc_boolean_t removefile = ISC_FALSE;
|
bool removefile = false;
|
||||||
isc_boolean_t id = ISC_FALSE;
|
bool id = false;
|
||||||
|
|
||||||
if (argc == 1)
|
if (argc == 1)
|
||||||
usage();
|
usage();
|
||||||
@@ -102,12 +95,12 @@ main(int argc, char **argv) {
|
|||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
fatal("Out of memory");
|
fatal("Out of memory");
|
||||||
|
|
||||||
#ifdef PKCS11CRYPTO
|
#if HAVE_PKCS11
|
||||||
pk11_result_register();
|
pk11_result_register();
|
||||||
#endif
|
#endif
|
||||||
dns_result_register();
|
dns_result_register();
|
||||||
|
|
||||||
isc_commandline_errprint = ISC_FALSE;
|
isc_commandline_errprint = false;
|
||||||
|
|
||||||
while ((ch = isc_commandline_parse(argc, argv, "E:fK:rRhv:V")) != -1) {
|
while ((ch = isc_commandline_parse(argc, argv, "E:fK:rRhv:V")) != -1) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
@@ -115,7 +108,7 @@ main(int argc, char **argv) {
|
|||||||
engine = isc_commandline_argument;
|
engine = isc_commandline_argument;
|
||||||
break;
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
force = ISC_TRUE;
|
force = true;
|
||||||
break;
|
break;
|
||||||
case 'K':
|
case 'K':
|
||||||
/*
|
/*
|
||||||
@@ -129,10 +122,10 @@ main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
removefile = ISC_TRUE;
|
removefile = true;
|
||||||
break;
|
break;
|
||||||
case 'R':
|
case 'R':
|
||||||
id = ISC_TRUE;
|
id = true;
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
verbose = strtol(isc_commandline_argument, &endp, 0);
|
verbose = strtol(isc_commandline_argument, &endp, 0);
|
||||||
@@ -180,17 +173,10 @@ main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ectx == NULL)
|
result = dst_lib_init(mctx, engine);
|
||||||
setup_entropy(mctx, NULL, &ectx);
|
|
||||||
result = dst_lib_init2(mctx, ectx, engine,
|
|
||||||
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
|
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
fatal("Could not initialize dst: %s",
|
fatal("Could not initialize dst: %s",
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
|
|
||||||
if (result != ISC_R_SUCCESS)
|
|
||||||
fatal("Could not initialize hash");
|
|
||||||
isc_entropy_stopcallbacksources(ectx);
|
|
||||||
|
|
||||||
result = dst_key_fromnamedfile(filename, dir,
|
result = dst_key_fromnamedfile(filename, dir,
|
||||||
DST_TYPE_PUBLIC|DST_TYPE_PRIVATE,
|
DST_TYPE_PUBLIC|DST_TYPE_PRIVATE,
|
||||||
@@ -271,9 +257,7 @@ main(int argc, char **argv) {
|
|||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
dst_key_free(&key);
|
dst_key_free(&key);
|
||||||
isc_hash_destroy();
|
|
||||||
dst_lib_destroy();
|
dst_lib_destroy();
|
||||||
cleanup_entropy(&ectx);
|
|
||||||
if (verbose > 10)
|
if (verbose > 10)
|
||||||
isc_mem_stats(mctx, stdout);
|
isc_mem_stats(mctx, stdout);
|
||||||
if (dir != NULL)
|
if (dir != NULL)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2009, 2011, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2009, 2011, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2009-2011, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2009-2011, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -200,5 +200,5 @@ RFC 5011\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2009-2011, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2009-2011, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
+55
-68
@@ -13,6 +13,8 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@@ -20,7 +22,6 @@
|
|||||||
|
|
||||||
#include <isc/buffer.h>
|
#include <isc/buffer.h>
|
||||||
#include <isc/commandline.h>
|
#include <isc/commandline.h>
|
||||||
#include <isc/entropy.h>
|
|
||||||
#include <isc/file.h>
|
#include <isc/file.h>
|
||||||
#include <isc/hash.h>
|
#include <isc/hash.h>
|
||||||
#include <isc/mem.h>
|
#include <isc/mem.h>
|
||||||
@@ -34,7 +35,7 @@
|
|||||||
|
|
||||||
#include <dst/dst.h>
|
#include <dst/dst.h>
|
||||||
|
|
||||||
#ifdef PKCS11CRYPTO
|
#if USE_PKCS11
|
||||||
#include <pk11/result.h>
|
#include <pk11/result.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -54,7 +55,7 @@ usage(void) {
|
|||||||
fprintf(stderr, " %s [options] keyfile\n\n", program);
|
fprintf(stderr, " %s [options] keyfile\n\n", program);
|
||||||
fprintf(stderr, "Version: %s\n", VERSION);
|
fprintf(stderr, "Version: %s\n", VERSION);
|
||||||
fprintf(stderr, "General options:\n");
|
fprintf(stderr, "General options:\n");
|
||||||
#if defined(PKCS11CRYPTO)
|
#if USE_PKCS11
|
||||||
fprintf(stderr, " -E engine: specify PKCS#11 provider "
|
fprintf(stderr, " -E engine: specify PKCS#11 provider "
|
||||||
"(default: %s)\n", PK11_LIB_LOCATION);
|
"(default: %s)\n", PK11_LIB_LOCATION);
|
||||||
#elif defined(USE_PKCS11)
|
#elif defined(USE_PKCS11)
|
||||||
@@ -103,7 +104,7 @@ usage(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
printtime(dst_key_t *key, int type, const char *tag, isc_boolean_t epoch,
|
printtime(dst_key_t *key, int type, const char *tag, bool epoch,
|
||||||
FILE *stream)
|
FILE *stream)
|
||||||
{
|
{
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
@@ -128,18 +129,13 @@ printtime(dst_key_t *key, int type, const char *tag, isc_boolean_t epoch,
|
|||||||
int
|
int
|
||||||
main(int argc, char **argv) {
|
main(int argc, char **argv) {
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
#ifdef USE_PKCS11
|
|
||||||
const char *engine = PKCS11_ENGINE;
|
|
||||||
#else
|
|
||||||
const char *engine = NULL;
|
const char *engine = NULL;
|
||||||
#endif
|
|
||||||
const char *filename = NULL;
|
const char *filename = NULL;
|
||||||
char *directory = NULL;
|
char *directory = NULL;
|
||||||
char newname[1024];
|
char newname[1024];
|
||||||
char keystr[DST_KEY_FORMATSIZE];
|
char keystr[DST_KEY_FORMATSIZE];
|
||||||
char *endp, *p;
|
char *endp, *p;
|
||||||
int ch;
|
int ch;
|
||||||
isc_entropy_t *ectx = NULL;
|
|
||||||
const char *predecessor = NULL;
|
const char *predecessor = NULL;
|
||||||
dst_key_t *prevkey = NULL;
|
dst_key_t *prevkey = NULL;
|
||||||
dst_key_t *key = NULL;
|
dst_key_t *key = NULL;
|
||||||
@@ -147,29 +143,29 @@ main(int argc, char **argv) {
|
|||||||
dns_name_t *name = NULL;
|
dns_name_t *name = NULL;
|
||||||
dns_secalg_t alg = 0;
|
dns_secalg_t alg = 0;
|
||||||
unsigned int size = 0;
|
unsigned int size = 0;
|
||||||
isc_uint16_t flags = 0;
|
uint16_t flags = 0;
|
||||||
int prepub = -1;
|
int prepub = -1;
|
||||||
dns_ttl_t ttl = 0;
|
dns_ttl_t ttl = 0;
|
||||||
isc_stdtime_t now;
|
isc_stdtime_t now;
|
||||||
isc_stdtime_t pub = 0, act = 0, rev = 0, inact = 0, del = 0;
|
isc_stdtime_t pub = 0, act = 0, rev = 0, inact = 0, del = 0;
|
||||||
isc_stdtime_t prevact = 0, previnact = 0, prevdel = 0;
|
isc_stdtime_t prevact = 0, previnact = 0, prevdel = 0;
|
||||||
isc_boolean_t setpub = ISC_FALSE, setact = ISC_FALSE;
|
bool setpub = false, setact = false;
|
||||||
isc_boolean_t setrev = ISC_FALSE, setinact = ISC_FALSE;
|
bool setrev = false, setinact = false;
|
||||||
isc_boolean_t setdel = ISC_FALSE, setttl = ISC_FALSE;
|
bool setdel = false, setttl = false;
|
||||||
isc_boolean_t unsetpub = ISC_FALSE, unsetact = ISC_FALSE;
|
bool unsetpub = false, unsetact = false;
|
||||||
isc_boolean_t unsetrev = ISC_FALSE, unsetinact = ISC_FALSE;
|
bool unsetrev = false, unsetinact = false;
|
||||||
isc_boolean_t unsetdel = ISC_FALSE;
|
bool unsetdel = false;
|
||||||
isc_boolean_t printcreate = ISC_FALSE, printpub = ISC_FALSE;
|
bool printcreate = false, printpub = false;
|
||||||
isc_boolean_t printact = ISC_FALSE, printrev = ISC_FALSE;
|
bool printact = false, printrev = false;
|
||||||
isc_boolean_t printinact = ISC_FALSE, printdel = ISC_FALSE;
|
bool printinact = false, printdel = false;
|
||||||
isc_boolean_t force = ISC_FALSE;
|
bool force = false;
|
||||||
isc_boolean_t epoch = ISC_FALSE;
|
bool epoch = false;
|
||||||
isc_boolean_t changed = ISC_FALSE;
|
bool changed = false;
|
||||||
isc_log_t *log = NULL;
|
isc_log_t *log = NULL;
|
||||||
isc_stdtime_t syncadd = 0, syncdel = 0;
|
isc_stdtime_t syncadd = 0, syncdel = 0;
|
||||||
isc_boolean_t unsetsyncadd = ISC_FALSE, setsyncadd = ISC_FALSE;
|
bool unsetsyncadd = false, setsyncadd = false;
|
||||||
isc_boolean_t unsetsyncdel = ISC_FALSE, setsyncdel = ISC_FALSE;
|
bool unsetsyncdel = false, setsyncdel = false;
|
||||||
isc_boolean_t printsyncadd = ISC_FALSE, printsyncdel = ISC_FALSE;
|
bool printsyncadd = false, printsyncdel = false;
|
||||||
|
|
||||||
if (argc == 1)
|
if (argc == 1)
|
||||||
usage();
|
usage();
|
||||||
@@ -180,12 +176,12 @@ main(int argc, char **argv) {
|
|||||||
|
|
||||||
setup_logging(mctx, &log);
|
setup_logging(mctx, &log);
|
||||||
|
|
||||||
#ifdef PKCS11CRYPTO
|
#if USE_PKCS11
|
||||||
pk11_result_register();
|
pk11_result_register();
|
||||||
#endif
|
#endif
|
||||||
dns_result_register();
|
dns_result_register();
|
||||||
|
|
||||||
isc_commandline_errprint = ISC_FALSE;
|
isc_commandline_errprint = false;
|
||||||
|
|
||||||
isc_stdtime_get(&now);
|
isc_stdtime_get(&now);
|
||||||
|
|
||||||
@@ -196,51 +192,51 @@ main(int argc, char **argv) {
|
|||||||
engine = isc_commandline_argument;
|
engine = isc_commandline_argument;
|
||||||
break;
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
force = ISC_TRUE;
|
force = true;
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
p = isc_commandline_argument;
|
p = isc_commandline_argument;
|
||||||
if (!strcasecmp(p, "all")) {
|
if (!strcasecmp(p, "all")) {
|
||||||
printcreate = ISC_TRUE;
|
printcreate = true;
|
||||||
printpub = ISC_TRUE;
|
printpub = true;
|
||||||
printact = ISC_TRUE;
|
printact = true;
|
||||||
printrev = ISC_TRUE;
|
printrev = true;
|
||||||
printinact = ISC_TRUE;
|
printinact = true;
|
||||||
printdel = ISC_TRUE;
|
printdel = true;
|
||||||
printsyncadd = ISC_TRUE;
|
printsyncadd = true;
|
||||||
printsyncdel = ISC_TRUE;
|
printsyncdel = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
switch (*p++) {
|
switch (*p++) {
|
||||||
case 'C':
|
case 'C':
|
||||||
printcreate = ISC_TRUE;
|
printcreate = true;
|
||||||
break;
|
break;
|
||||||
case 'P':
|
case 'P':
|
||||||
if (!strncmp(p, "sync", 4)) {
|
if (!strncmp(p, "sync", 4)) {
|
||||||
p += 4;
|
p += 4;
|
||||||
printsyncadd = ISC_TRUE;
|
printsyncadd = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
printpub = ISC_TRUE;
|
printpub = true;
|
||||||
break;
|
break;
|
||||||
case 'A':
|
case 'A':
|
||||||
printact = ISC_TRUE;
|
printact = true;
|
||||||
break;
|
break;
|
||||||
case 'R':
|
case 'R':
|
||||||
printrev = ISC_TRUE;
|
printrev = true;
|
||||||
break;
|
break;
|
||||||
case 'I':
|
case 'I':
|
||||||
printinact = ISC_TRUE;
|
printinact = true;
|
||||||
break;
|
break;
|
||||||
case 'D':
|
case 'D':
|
||||||
if (!strncmp(p, "sync", 4)) {
|
if (!strncmp(p, "sync", 4)) {
|
||||||
p += 4;
|
p += 4;
|
||||||
printsyncdel = ISC_TRUE;
|
printsyncdel = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
printdel = ISC_TRUE;
|
printdel = true;
|
||||||
break;
|
break;
|
||||||
case ' ':
|
case ' ':
|
||||||
break;
|
break;
|
||||||
@@ -251,7 +247,7 @@ main(int argc, char **argv) {
|
|||||||
} while (*p != '\0');
|
} while (*p != '\0');
|
||||||
break;
|
break;
|
||||||
case 'u':
|
case 'u':
|
||||||
epoch = ISC_TRUE;
|
epoch = true;
|
||||||
break;
|
break;
|
||||||
case 'K':
|
case 'K':
|
||||||
/*
|
/*
|
||||||
@@ -267,7 +263,7 @@ main(int argc, char **argv) {
|
|||||||
break;
|
break;
|
||||||
case 'L':
|
case 'L':
|
||||||
ttl = strtottl(isc_commandline_argument);
|
ttl = strtottl(isc_commandline_argument);
|
||||||
setttl = ISC_TRUE;
|
setttl = true;
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
verbose = strtol(isc_commandline_argument, &endp, 0);
|
verbose = strtol(isc_commandline_argument, &endp, 0);
|
||||||
@@ -281,7 +277,7 @@ main(int argc, char **argv) {
|
|||||||
fatal("-P sync specified more than "
|
fatal("-P sync specified more than "
|
||||||
"once");
|
"once");
|
||||||
|
|
||||||
changed = ISC_TRUE;
|
changed = true;
|
||||||
syncadd = strtotime(isc_commandline_argument,
|
syncadd = strtotime(isc_commandline_argument,
|
||||||
now, now, &setsyncadd);
|
now, now, &setsyncadd);
|
||||||
unsetsyncadd = !setsyncadd;
|
unsetsyncadd = !setsyncadd;
|
||||||
@@ -291,7 +287,7 @@ main(int argc, char **argv) {
|
|||||||
if (setpub || unsetpub)
|
if (setpub || unsetpub)
|
||||||
fatal("-P specified more than once");
|
fatal("-P specified more than once");
|
||||||
|
|
||||||
changed = ISC_TRUE;
|
changed = true;
|
||||||
pub = strtotime(isc_commandline_argument,
|
pub = strtotime(isc_commandline_argument,
|
||||||
now, now, &setpub);
|
now, now, &setpub);
|
||||||
unsetpub = !setpub;
|
unsetpub = !setpub;
|
||||||
@@ -300,7 +296,7 @@ main(int argc, char **argv) {
|
|||||||
if (setact || unsetact)
|
if (setact || unsetact)
|
||||||
fatal("-A specified more than once");
|
fatal("-A specified more than once");
|
||||||
|
|
||||||
changed = ISC_TRUE;
|
changed = true;
|
||||||
act = strtotime(isc_commandline_argument,
|
act = strtotime(isc_commandline_argument,
|
||||||
now, now, &setact);
|
now, now, &setact);
|
||||||
unsetact = !setact;
|
unsetact = !setact;
|
||||||
@@ -309,7 +305,7 @@ main(int argc, char **argv) {
|
|||||||
if (setrev || unsetrev)
|
if (setrev || unsetrev)
|
||||||
fatal("-R specified more than once");
|
fatal("-R specified more than once");
|
||||||
|
|
||||||
changed = ISC_TRUE;
|
changed = true;
|
||||||
rev = strtotime(isc_commandline_argument,
|
rev = strtotime(isc_commandline_argument,
|
||||||
now, now, &setrev);
|
now, now, &setrev);
|
||||||
unsetrev = !setrev;
|
unsetrev = !setrev;
|
||||||
@@ -318,7 +314,7 @@ main(int argc, char **argv) {
|
|||||||
if (setinact || unsetinact)
|
if (setinact || unsetinact)
|
||||||
fatal("-I specified more than once");
|
fatal("-I specified more than once");
|
||||||
|
|
||||||
changed = ISC_TRUE;
|
changed = true;
|
||||||
inact = strtotime(isc_commandline_argument,
|
inact = strtotime(isc_commandline_argument,
|
||||||
now, now, &setinact);
|
now, now, &setinact);
|
||||||
unsetinact = !setinact;
|
unsetinact = !setinact;
|
||||||
@@ -330,7 +326,7 @@ main(int argc, char **argv) {
|
|||||||
fatal("-D sync specified more than "
|
fatal("-D sync specified more than "
|
||||||
"once");
|
"once");
|
||||||
|
|
||||||
changed = ISC_TRUE;
|
changed = true;
|
||||||
syncdel = strtotime(isc_commandline_argument,
|
syncdel = strtotime(isc_commandline_argument,
|
||||||
now, now, &setsyncdel);
|
now, now, &setsyncdel);
|
||||||
unsetsyncdel = !setsyncdel;
|
unsetsyncdel = !setsyncdel;
|
||||||
@@ -341,7 +337,7 @@ main(int argc, char **argv) {
|
|||||||
if (setdel || unsetdel)
|
if (setdel || unsetdel)
|
||||||
fatal("-D specified more than once");
|
fatal("-D specified more than once");
|
||||||
|
|
||||||
changed = ISC_TRUE;
|
changed = true;
|
||||||
del = strtotime(isc_commandline_argument,
|
del = strtotime(isc_commandline_argument,
|
||||||
now, now, &setdel);
|
now, now, &setdel);
|
||||||
unsetdel = !setdel;
|
unsetdel = !setdel;
|
||||||
@@ -378,17 +374,10 @@ main(int argc, char **argv) {
|
|||||||
if (argc > isc_commandline_index + 1)
|
if (argc > isc_commandline_index + 1)
|
||||||
fatal("Extraneous arguments");
|
fatal("Extraneous arguments");
|
||||||
|
|
||||||
if (ectx == NULL)
|
result = dst_lib_init(mctx, engine);
|
||||||
setup_entropy(mctx, NULL, &ectx);
|
|
||||||
result = dst_lib_init2(mctx, ectx, engine,
|
|
||||||
ISC_ENTROPY_BLOCKING | ISC_ENTROPY_GOODONLY);
|
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
fatal("Could not initialize dst: %s",
|
fatal("Could not initialize dst: %s",
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
|
|
||||||
if (result != ISC_R_SUCCESS)
|
|
||||||
fatal("Could not initialize hash");
|
|
||||||
isc_entropy_stopcallbacksources(ectx);
|
|
||||||
|
|
||||||
if (predecessor != NULL) {
|
if (predecessor != NULL) {
|
||||||
int major, minor;
|
int major, minor;
|
||||||
@@ -459,7 +448,7 @@ main(int argc, char **argv) {
|
|||||||
"before it is scheduled to be "
|
"before it is scheduled to be "
|
||||||
"inactive.\n", program);
|
"inactive.\n", program);
|
||||||
|
|
||||||
changed = setpub = setact = ISC_TRUE;
|
changed = setpub = setact = true;
|
||||||
} else {
|
} else {
|
||||||
if (prepub < 0)
|
if (prepub < 0)
|
||||||
prepub = 0;
|
prepub = 0;
|
||||||
@@ -471,10 +460,10 @@ main(int argc, char **argv) {
|
|||||||
"prepublication interval.");
|
"prepublication interval.");
|
||||||
|
|
||||||
if (setpub && !setact) {
|
if (setpub && !setact) {
|
||||||
setact = ISC_TRUE;
|
setact = true;
|
||||||
act = pub + prepub;
|
act = pub + prepub;
|
||||||
} else if (setact && !setpub) {
|
} else if (setact && !setpub) {
|
||||||
setpub = ISC_TRUE;
|
setpub = true;
|
||||||
pub = act - prepub;
|
pub = act - prepub;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -605,11 +594,11 @@ main(int argc, char **argv) {
|
|||||||
if (force && !changed) {
|
if (force && !changed) {
|
||||||
dst_key_settime(key, DST_TIME_PUBLISH, now);
|
dst_key_settime(key, DST_TIME_PUBLISH, now);
|
||||||
dst_key_settime(key, DST_TIME_ACTIVATE, now);
|
dst_key_settime(key, DST_TIME_ACTIVATE, now);
|
||||||
changed = ISC_TRUE;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!changed && setttl)
|
if (!changed && setttl)
|
||||||
changed = ISC_TRUE;
|
changed = true;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Print out time values, if -p was used.
|
* Print out time values, if -p was used.
|
||||||
@@ -672,9 +661,7 @@ main(int argc, char **argv) {
|
|||||||
if (prevkey != NULL)
|
if (prevkey != NULL)
|
||||||
dst_key_free(&prevkey);
|
dst_key_free(&prevkey);
|
||||||
dst_key_free(&key);
|
dst_key_free(&key);
|
||||||
isc_hash_destroy();
|
|
||||||
dst_lib_destroy();
|
dst_lib_destroy();
|
||||||
cleanup_entropy(&ectx);
|
|
||||||
if (verbose > 10)
|
if (verbose > 10)
|
||||||
isc_mem_stats(mctx, stdout);
|
isc_mem_stats(mctx, stdout);
|
||||||
cleanup_logging(&log);
|
cleanup_logging(&log);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2009-2011, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2009-2011, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2000-2009, 2011-2017 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2000-2009, 2011-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
dnssec-signzone \- DNSSEC zone signing tool
|
dnssec-signzone \- DNSSEC zone signing tool
|
||||||
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
||||||
.HP \w'\fBdnssec\-signzone\fR\ 'u
|
.HP \w'\fBdnssec\-signzone\fR\ 'u
|
||||||
\fBdnssec\-signzone\fR [\fB\-a\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-d\ \fR\fB\fIdirectory\fR\fR] [\fB\-D\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-e\ \fR\fB\fIend\-time\fR\fR] [\fB\-f\ \fR\fB\fIoutput\-file\fR\fR] [\fB\-g\fR] [\fB\-h\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-I\ \fR\fB\fIinput\-format\fR\fR] [\fB\-j\ \fR\fB\fIjitter\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\ \fR\fB\fIkey\fR\fR] [\fB\-L\ \fR\fB\fIserial\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-M\ \fR\fB\fImaxttl\fR\fR] [\fB\-N\ \fR\fB\fIsoa\-serial\-format\fR\fR] [\fB\-o\ \fR\fB\fIorigin\fR\fR] [\fB\-O\ \fR\fB\fIoutput\-format\fR\fR] [\fB\-P\fR] [\fB\-p\fR] [\fB\-Q\fR] [\fB\-R\fR] [\fB\-r\ \fR\fB\fIrandomdev\fR\fR] [\fB\-S\fR] [\fB\-s\ \fR\fB\fIstart\-time\fR\fR] [\fB\-T\ \fR\fB\fIttl\fR\fR] [\fB\-t\fR] [\fB\-u\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-V\fR] [\fB\-X\ \fR\fB\fIextended\ end\-time\fR\fR] [\fB\-x\fR] [\fB\-z\fR] [\fB\-3\ \fR\fB\fIsalt\fR\fR] [\fB\-H\ \fR\fB\fIiterations\fR\fR] [\fB\-A\fR] {zonefile} [key...]
|
\fBdnssec\-signzone\fR [\fB\-a\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-d\ \fR\fB\fIdirectory\fR\fR] [\fB\-D\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-e\ \fR\fB\fIend\-time\fR\fR] [\fB\-f\ \fR\fB\fIoutput\-file\fR\fR] [\fB\-g\fR] [\fB\-h\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-I\ \fR\fB\fIinput\-format\fR\fR] [\fB\-j\ \fR\fB\fIjitter\fR\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\ \fR\fB\fIkey\fR\fR] [\fB\-L\ \fR\fB\fIserial\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-M\ \fR\fB\fImaxttl\fR\fR] [\fB\-N\ \fR\fB\fIsoa\-serial\-format\fR\fR] [\fB\-o\ \fR\fB\fIorigin\fR\fR] [\fB\-O\ \fR\fB\fIoutput\-format\fR\fR] [\fB\-P\fR] [\fB\-Q\fR] [\fB\-R\fR] [\fB\-S\fR] [\fB\-s\ \fR\fB\fIstart\-time\fR\fR] [\fB\-T\ \fR\fB\fIttl\fR\fR] [\fB\-t\fR] [\fB\-u\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-V\fR] [\fB\-X\ \fR\fB\fIextended\ end\-time\fR\fR] [\fB\-x\fR] [\fB\-z\fR] [\fB\-3\ \fR\fB\fIsalt\fR\fR] [\fB\-H\ \fR\fB\fIiterations\fR\fR] [\fB\-A\fR] {zonefile} [key...]
|
||||||
.SH "DESCRIPTION"
|
.SH "DESCRIPTION"
|
||||||
.PP
|
.PP
|
||||||
\fBdnssec\-signzone\fR
|
\fBdnssec\-signzone\fR
|
||||||
@@ -278,11 +278,6 @@ specifies the format version of the raw zone file: if N is 0, the raw file can b
|
|||||||
\fBnamed\fR; if N is 1, the file can be read by release 9\&.9\&.0 or higher; the default is 1\&.
|
\fBnamed\fR; if N is 1, the file can be read by release 9\&.9\&.0 or higher; the default is 1\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-p
|
|
||||||
.RS 4
|
|
||||||
Use pseudo\-random data when signing the zone\&. This is faster, but less secure, than using real random data\&. This option may be useful when signing large zones or when the entropy source is limited\&.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
\-P
|
\-P
|
||||||
.RS 4
|
.RS 4
|
||||||
Disable post sign verification tests\&.
|
Disable post sign verification tests\&.
|
||||||
@@ -311,17 +306,6 @@ This option is similar to
|
|||||||
to signatures from keys that are no longer published\&. This enables ZSK rollover using the procedure described in RFC 4641, section 4\&.2\&.1\&.2 ("Double Signature Zone Signing Key Rollover")\&.
|
to signatures from keys that are no longer published\&. This enables ZSK rollover using the procedure described in RFC 4641, section 4\&.2\&.1\&.2 ("Double Signature Zone Signing Key Rollover")\&.
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
\-r \fIrandomdev\fR
|
|
||||||
.RS 4
|
|
||||||
Specifies the source of randomness\&. If the operating system does not provide a
|
|
||||||
/dev/random
|
|
||||||
or equivalent device, the default source of randomness is keyboard input\&.
|
|
||||||
randomdev
|
|
||||||
specifies the name of a character device or file containing random data to be used instead of the default\&. The special value
|
|
||||||
keyboard
|
|
||||||
indicates that keyboard input should be used\&.
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
\-S
|
\-S
|
||||||
.RS 4
|
.RS 4
|
||||||
Smart signing: Instructs
|
Smart signing: Instructs
|
||||||
@@ -484,5 +468,5 @@ RFC 4641\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2000-2009, 2011-2017 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2000-2009, 2011-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
+349
-299
File diff suppressed because it is too large
Load Diff
@@ -78,10 +78,8 @@
|
|||||||
<arg choice="opt" rep="norepeat"><option>-o <replaceable class="parameter">origin</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-o <replaceable class="parameter">origin</replaceable></option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-O <replaceable class="parameter">output-format</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-O <replaceable class="parameter">output-format</replaceable></option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-P</option></arg>
|
<arg choice="opt" rep="norepeat"><option>-P</option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-p</option></arg>
|
|
||||||
<arg choice="opt" rep="norepeat"><option>-Q</option></arg>
|
<arg choice="opt" rep="norepeat"><option>-Q</option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-R</option></arg>
|
<arg choice="opt" rep="norepeat"><option>-R</option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">randomdev</replaceable></option></arg>
|
|
||||||
<arg choice="opt" rep="norepeat"><option>-S</option></arg>
|
<arg choice="opt" rep="norepeat"><option>-S</option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">start-time</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">start-time</replaceable></option></arg>
|
||||||
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">ttl</replaceable></option></arg>
|
<arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">ttl</replaceable></option></arg>
|
||||||
@@ -508,18 +506,6 @@
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>-p</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Use pseudo-random data when signing the zone. This is faster,
|
|
||||||
but less secure, than using real random data. This option
|
|
||||||
may be useful when signing large zones or when the entropy
|
|
||||||
source is limited.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-P</term>
|
<term>-P</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
@@ -571,23 +557,6 @@
|
|||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
|
||||||
<term>-r <replaceable class="parameter">randomdev</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Specifies the source of randomness. If the operating
|
|
||||||
system does not provide a <filename>/dev/random</filename>
|
|
||||||
or equivalent device, the default source of randomness
|
|
||||||
is keyboard input. <filename>randomdev</filename>
|
|
||||||
specifies
|
|
||||||
the name of a character device or file containing random
|
|
||||||
data to be used instead of the default. The special value
|
|
||||||
<filename>keyboard</filename> indicates that keyboard
|
|
||||||
input should be used.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>-S</term>
|
<term>-S</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2000-2009, 2011-2017 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2000-2009, 2011-2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -54,10 +54,8 @@
|
|||||||
[<code class="option">-o <em class="replaceable"><code>origin</code></em></code>]
|
[<code class="option">-o <em class="replaceable"><code>origin</code></em></code>]
|
||||||
[<code class="option">-O <em class="replaceable"><code>output-format</code></em></code>]
|
[<code class="option">-O <em class="replaceable"><code>output-format</code></em></code>]
|
||||||
[<code class="option">-P</code>]
|
[<code class="option">-P</code>]
|
||||||
[<code class="option">-p</code>]
|
|
||||||
[<code class="option">-Q</code>]
|
[<code class="option">-Q</code>]
|
||||||
[<code class="option">-R</code>]
|
[<code class="option">-R</code>]
|
||||||
[<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>]
|
|
||||||
[<code class="option">-S</code>]
|
[<code class="option">-S</code>]
|
||||||
[<code class="option">-s <em class="replaceable"><code>start-time</code></em></code>]
|
[<code class="option">-s <em class="replaceable"><code>start-time</code></em></code>]
|
||||||
[<code class="option">-T <em class="replaceable"><code>ttl</code></em></code>]
|
[<code class="option">-T <em class="replaceable"><code>ttl</code></em></code>]
|
||||||
@@ -400,15 +398,6 @@
|
|||||||
can be read by release 9.9.0 or higher; the default is 1.
|
can be read by release 9.9.0 or higher; the default is 1.
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term">-p</span></dt>
|
|
||||||
<dd>
|
|
||||||
<p>
|
|
||||||
Use pseudo-random data when signing the zone. This is faster,
|
|
||||||
but less secure, than using real random data. This option
|
|
||||||
may be useful when signing large zones or when the entropy
|
|
||||||
source is limited.
|
|
||||||
</p>
|
|
||||||
</dd>
|
|
||||||
<dt><span class="term">-P</span></dt>
|
<dt><span class="term">-P</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
@@ -453,20 +442,6 @@
|
|||||||
("Double Signature Zone Signing Key Rollover").
|
("Double Signature Zone Signing Key Rollover").
|
||||||
</p>
|
</p>
|
||||||
</dd>
|
</dd>
|
||||||
<dt><span class="term">-r <em class="replaceable"><code>randomdev</code></em></span></dt>
|
|
||||||
<dd>
|
|
||||||
<p>
|
|
||||||
Specifies the source of randomness. If the operating
|
|
||||||
system does not provide a <code class="filename">/dev/random</code>
|
|
||||||
or equivalent device, the default source of randomness
|
|
||||||
is keyboard input. <code class="filename">randomdev</code>
|
|
||||||
specifies
|
|
||||||
the name of a character device or file containing random
|
|
||||||
data to be used instead of the default. The special value
|
|
||||||
<code class="filename">keyboard</code> indicates that keyboard
|
|
||||||
input should be used.
|
|
||||||
</p>
|
|
||||||
</dd>
|
|
||||||
<dt><span class="term">-S</span></dt>
|
<dt><span class="term">-S</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.\" Copyright (C) 2012, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
.\" Copyright (C) 2012, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.\"
|
.\"
|
||||||
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
.\" This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
.\" License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -113,5 +113,5 @@ RFC 4033\&.
|
|||||||
\fBInternet Systems Consortium, Inc\&.\fR
|
\fBInternet Systems Consortium, Inc\&.\fR
|
||||||
.SH "COPYRIGHT"
|
.SH "COPYRIGHT"
|
||||||
.br
|
.br
|
||||||
Copyright \(co 2012, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
Copyright \(co 2012, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
.br
|
.br
|
||||||
|
|||||||
+18
-35
@@ -13,13 +13,13 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include <isc/app.h>
|
#include <isc/app.h>
|
||||||
#include <isc/base32.h>
|
#include <isc/base32.h>
|
||||||
#include <isc/commandline.h>
|
#include <isc/commandline.h>
|
||||||
#include <isc/entropy.h>
|
|
||||||
#include <isc/event.h>
|
#include <isc/event.h>
|
||||||
#include <isc/file.h>
|
#include <isc/file.h>
|
||||||
#include <isc/hash.h>
|
#include <isc/hash.h>
|
||||||
@@ -59,10 +59,11 @@
|
|||||||
#include <dns/result.h>
|
#include <dns/result.h>
|
||||||
#include <dns/soa.h>
|
#include <dns/soa.h>
|
||||||
#include <dns/time.h>
|
#include <dns/time.h>
|
||||||
|
#include <dns/zoneverify.h>
|
||||||
|
|
||||||
#include <dst/dst.h>
|
#include <dst/dst.h>
|
||||||
|
|
||||||
#ifdef PKCS11CRYPTO
|
#if USE_PKCS11
|
||||||
#include <pk11/result.h>
|
#include <pk11/result.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -73,14 +74,13 @@ int verbose;
|
|||||||
|
|
||||||
static isc_stdtime_t now;
|
static isc_stdtime_t now;
|
||||||
static isc_mem_t *mctx = NULL;
|
static isc_mem_t *mctx = NULL;
|
||||||
static isc_entropy_t *ectx = NULL;
|
|
||||||
static dns_masterformat_t inputformat = dns_masterformat_text;
|
static dns_masterformat_t inputformat = dns_masterformat_text;
|
||||||
static dns_db_t *gdb; /* The database */
|
static dns_db_t *gdb; /* The database */
|
||||||
static dns_dbversion_t *gversion; /* The database version */
|
static dns_dbversion_t *gversion; /* The database version */
|
||||||
static dns_rdataclass_t gclass; /* The class */
|
static dns_rdataclass_t gclass; /* The class */
|
||||||
static dns_name_t *gorigin; /* The database origin */
|
static dns_name_t *gorigin; /* The database origin */
|
||||||
static isc_boolean_t ignore_kskflag = ISC_FALSE;
|
static bool ignore_kskflag = false;
|
||||||
static isc_boolean_t keyset_kskonly = ISC_FALSE;
|
static bool keyset_kskonly = false;
|
||||||
|
|
||||||
/*%
|
/*%
|
||||||
* Load the zone file from disk
|
* Load the zone file from disk
|
||||||
@@ -97,8 +97,7 @@ loadzone(char *file, char *origin, dns_rdataclass_t rdclass, dns_db_t **db) {
|
|||||||
isc_buffer_init(&b, origin, len);
|
isc_buffer_init(&b, origin, len);
|
||||||
isc_buffer_add(&b, len);
|
isc_buffer_add(&b, len);
|
||||||
|
|
||||||
dns_fixedname_init(&fname);
|
name = dns_fixedname_initname(&fname);
|
||||||
name = dns_fixedname_name(&fname);
|
|
||||||
result = dns_name_fromtext(name, &b, dns_rootname, 0, NULL);
|
result = dns_name_fromtext(name, &b, dns_rootname, 0, NULL);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
fatal("failed converting name '%s' to dns format: %s",
|
fatal("failed converting name '%s' to dns format: %s",
|
||||||
@@ -108,7 +107,7 @@ loadzone(char *file, char *origin, dns_rdataclass_t rdclass, dns_db_t **db) {
|
|||||||
rdclass, 0, NULL, db);
|
rdclass, 0, NULL, db);
|
||||||
check_result(result, "dns_db_create()");
|
check_result(result, "dns_db_create()");
|
||||||
|
|
||||||
result = dns_db_load2(*db, file, inputformat);
|
result = dns_db_load(*db, file, inputformat, 0);
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case DNS_R_SEENINCLUDE:
|
case DNS_R_SEENINCLUDE:
|
||||||
case ISC_R_SUCCESS:
|
case ISC_R_SUCCESS:
|
||||||
@@ -152,12 +151,9 @@ usage(void) {
|
|||||||
fprintf(stderr, "\t\tfile format of input zonefile (text)\n");
|
fprintf(stderr, "\t\tfile format of input zonefile (text)\n");
|
||||||
fprintf(stderr, "\t-c class (IN)\n");
|
fprintf(stderr, "\t-c class (IN)\n");
|
||||||
fprintf(stderr, "\t-E engine:\n");
|
fprintf(stderr, "\t-E engine:\n");
|
||||||
#if defined(PKCS11CRYPTO)
|
#if USE_PKCS11
|
||||||
fprintf(stderr, "\t\tpath to PKCS#11 provider library "
|
fprintf(stderr, "\t\tpath to PKCS#11 provider library "
|
||||||
"(default is %s)\n", PK11_LIB_LOCATION);
|
"(default is %s)\n", PK11_LIB_LOCATION);
|
||||||
#elif defined(USE_PKCS11)
|
|
||||||
fprintf(stderr, "\t\tname of an OpenSSL engine to use "
|
|
||||||
"(default is \"pkcs11\")\n");
|
|
||||||
#else
|
#else
|
||||||
fprintf(stderr, "\t\tname of an OpenSSL engine to use\n");
|
fprintf(stderr, "\t\tname of an OpenSSL engine to use\n");
|
||||||
#endif
|
#endif
|
||||||
@@ -173,11 +169,7 @@ main(int argc, char *argv[]) {
|
|||||||
char *inputformatstr = NULL;
|
char *inputformatstr = NULL;
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
isc_log_t *log = NULL;
|
isc_log_t *log = NULL;
|
||||||
#ifdef USE_PKCS11
|
|
||||||
const char *engine = PKCS11_ENGINE;
|
|
||||||
#else
|
|
||||||
const char *engine = NULL;
|
const char *engine = NULL;
|
||||||
#endif
|
|
||||||
char *classname = NULL;
|
char *classname = NULL;
|
||||||
dns_rdataclass_t rdclass;
|
dns_rdataclass_t rdclass;
|
||||||
char *endp;
|
char *endp;
|
||||||
@@ -207,19 +199,19 @@ main(int argc, char *argv[]) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
isc_commandline_reset = ISC_TRUE;
|
isc_commandline_reset = true;
|
||||||
check_result(isc_app_start(), "isc_app_start");
|
check_result(isc_app_start(), "isc_app_start");
|
||||||
|
|
||||||
result = isc_mem_create(0, 0, &mctx);
|
result = isc_mem_create(0, 0, &mctx);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
fatal("out of memory");
|
fatal("out of memory");
|
||||||
|
|
||||||
#ifdef PKCS11CRYPTO
|
#if USE_PKCS11
|
||||||
pk11_result_register();
|
pk11_result_register();
|
||||||
#endif
|
#endif
|
||||||
dns_result_register();
|
dns_result_register();
|
||||||
|
|
||||||
isc_commandline_errprint = ISC_FALSE;
|
isc_commandline_errprint = false;
|
||||||
|
|
||||||
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
@@ -250,11 +242,11 @@ main(int argc, char *argv[]) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'x':
|
case 'x':
|
||||||
keyset_kskonly = ISC_TRUE;
|
keyset_kskonly = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'z':
|
case 'z':
|
||||||
ignore_kskflag = ISC_TRUE;
|
ignore_kskflag = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '?':
|
case '?':
|
||||||
@@ -278,18 +270,11 @@ main(int argc, char *argv[]) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ectx == NULL)
|
result = dst_lib_init(mctx, engine);
|
||||||
setup_entropy(mctx, NULL, &ectx);
|
|
||||||
|
|
||||||
result = dst_lib_init2(mctx, ectx, engine, ISC_ENTROPY_BLOCKING);
|
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
fatal("could not initialize dst: %s",
|
fatal("could not initialize dst: %s",
|
||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
|
|
||||||
result = isc_hash_create(mctx, ectx, DNS_NAME_MAXWIRE);
|
|
||||||
if (result != ISC_R_SUCCESS)
|
|
||||||
fatal("could not create hash context");
|
|
||||||
|
|
||||||
isc_stdtime_get(&now);
|
isc_stdtime_get(&now);
|
||||||
|
|
||||||
rdclass = strtoclass(classname);
|
rdclass = strtoclass(classname);
|
||||||
@@ -332,16 +317,14 @@ main(int argc, char *argv[]) {
|
|||||||
result = dns_db_newversion(gdb, &gversion);
|
result = dns_db_newversion(gdb, &gversion);
|
||||||
check_result(result, "dns_db_newversion()");
|
check_result(result, "dns_db_newversion()");
|
||||||
|
|
||||||
verifyzone(gdb, gversion, gorigin, mctx,
|
result = dns_zoneverify_dnssec(NULL, gdb, gversion, gorigin, NULL,
|
||||||
ignore_kskflag, keyset_kskonly);
|
mctx, ignore_kskflag, keyset_kskonly);
|
||||||
|
|
||||||
dns_db_closeversion(gdb, &gversion, ISC_FALSE);
|
dns_db_closeversion(gdb, &gversion, false);
|
||||||
dns_db_detach(&gdb);
|
dns_db_detach(&gdb);
|
||||||
|
|
||||||
cleanup_logging(&log);
|
cleanup_logging(&log);
|
||||||
dst_lib_destroy();
|
dst_lib_destroy();
|
||||||
isc_hash_destroy();
|
|
||||||
cleanup_entropy(&ectx);
|
|
||||||
dns_name_destroy();
|
dns_name_destroy();
|
||||||
if (verbose > 10)
|
if (verbose > 10)
|
||||||
isc_mem_stats(mctx, stdout);
|
isc_mem_stats(mctx, stdout);
|
||||||
@@ -349,5 +332,5 @@ main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
(void) isc_app_finish();
|
(void) isc_app_finish();
|
||||||
|
|
||||||
return (0);
|
return (result == ISC_R_SUCCESS ? 0 : 1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||||
<!--
|
<!--
|
||||||
- Copyright (C) 2012, 2014-2016 Internet Systems Consortium, Inc. ("ISC")
|
- Copyright (C) 2012, 2014-2016, 2018 Internet Systems Consortium, Inc. ("ISC")
|
||||||
-
|
-
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
|||||||
+26
-1429
File diff suppressed because it is too large
Load Diff
+8
-30
@@ -9,21 +9,18 @@
|
|||||||
* information regarding copyright ownership.
|
* information regarding copyright ownership.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: dnssectool.h,v 1.33 2011/10/20 23:46:51 tbox Exp $ */
|
|
||||||
|
|
||||||
#ifndef DNSSECTOOL_H
|
#ifndef DNSSECTOOL_H
|
||||||
#define DNSSECTOOL_H 1
|
#define DNSSECTOOL_H 1
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
#include <isc/log.h>
|
#include <isc/log.h>
|
||||||
#include <isc/stdtime.h>
|
#include <isc/stdtime.h>
|
||||||
#include <dns/rdatastruct.h>
|
#include <dns/rdatastruct.h>
|
||||||
#include <dst/dst.h>
|
#include <dst/dst.h>
|
||||||
|
|
||||||
#define check_dns_dbiterator_current(result) \
|
|
||||||
check_result((result == DNS_R_NEWORIGIN) ? ISC_R_SUCCESS : result, \
|
|
||||||
"dns_dbiterator_current()")
|
|
||||||
|
|
||||||
|
|
||||||
typedef void (fatalcallback_t)(void);
|
typedef void (fatalcallback_t)(void);
|
||||||
|
|
||||||
ISC_PLATFORM_NORETURN_PRE void
|
ISC_PLATFORM_NORETURN_PRE void
|
||||||
@@ -42,10 +39,6 @@ vbprintf(int level, const char *fmt, ...) ISC_FORMAT_PRINTF(2, 3);
|
|||||||
ISC_PLATFORM_NORETURN_PRE void
|
ISC_PLATFORM_NORETURN_PRE void
|
||||||
version(const char *program) ISC_PLATFORM_NORETURN_POST;
|
version(const char *program) ISC_PLATFORM_NORETURN_POST;
|
||||||
|
|
||||||
void
|
|
||||||
type_format(const dns_rdatatype_t type, char *cp, unsigned int size);
|
|
||||||
#define TYPE_FORMATSIZE 20
|
|
||||||
|
|
||||||
void
|
void
|
||||||
sig_format(dns_rdata_rrsig_t *sig, char *cp, unsigned int size);
|
sig_format(dns_rdata_rrsig_t *sig, char *cp, unsigned int size);
|
||||||
#define SIG_FORMATSIZE (DNS_NAME_FORMATSIZE + DNS_SECALG_FORMATSIZE + sizeof("65535"))
|
#define SIG_FORMATSIZE (DNS_NAME_FORMATSIZE + DNS_SECALG_FORMATSIZE + sizeof("65535"))
|
||||||
@@ -56,17 +49,11 @@ setup_logging(isc_mem_t *mctx, isc_log_t **logp);
|
|||||||
void
|
void
|
||||||
cleanup_logging(isc_log_t **logp);
|
cleanup_logging(isc_log_t **logp);
|
||||||
|
|
||||||
void
|
|
||||||
setup_entropy(isc_mem_t *mctx, const char *randomfile, isc_entropy_t **ectx);
|
|
||||||
|
|
||||||
void
|
|
||||||
cleanup_entropy(isc_entropy_t **ectx);
|
|
||||||
|
|
||||||
dns_ttl_t strtottl(const char *str);
|
dns_ttl_t strtottl(const char *str);
|
||||||
|
|
||||||
isc_stdtime_t
|
isc_stdtime_t
|
||||||
strtotime(const char *str, isc_int64_t now, isc_int64_t base,
|
strtotime(const char *str, int64_t now, int64_t base,
|
||||||
isc_boolean_t *setp);
|
bool *setp);
|
||||||
|
|
||||||
unsigned int
|
unsigned int
|
||||||
strtodsdigest(const char *str);
|
strtodsdigest(const char *str);
|
||||||
@@ -83,20 +70,11 @@ check_keyversion(dst_key_t *key, char *keystr);
|
|||||||
void
|
void
|
||||||
set_keyversion(dst_key_t *key);
|
set_keyversion(dst_key_t *key);
|
||||||
|
|
||||||
isc_boolean_t
|
bool
|
||||||
key_collision(dst_key_t *key, dns_name_t *name, const char *dir,
|
key_collision(dst_key_t *key, dns_name_t *name, const char *dir,
|
||||||
isc_mem_t *mctx, isc_boolean_t *exact);
|
isc_mem_t *mctx, bool *exact);
|
||||||
|
|
||||||
isc_boolean_t
|
bool
|
||||||
is_delegation(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *origin,
|
|
||||||
dns_name_t *name, dns_dbnode_t *node, isc_uint32_t *ttlp);
|
|
||||||
|
|
||||||
void
|
|
||||||
verifyzone(dns_db_t *db, dns_dbversion_t *ver,
|
|
||||||
dns_name_t *origin, isc_mem_t *mctx,
|
|
||||||
isc_boolean_t ignore_kskflag, isc_boolean_t keyset_kskonly);
|
|
||||||
|
|
||||||
isc_boolean_t
|
|
||||||
isoptarg(const char *arg, char **argv, void (*usage)(void));
|
isoptarg(const char *arg, char **argv, void (*usage)(void));
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>WIN32;@CRYPTO@_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
|
||||||
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
|
||||||
<PreprocessorDefinitions>WIN32;@CRYPTO@NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
<StringPooling>true</StringPooling>
|
<StringPooling>true</StringPooling>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user