2 * Copyright (C) 2004-2014 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 2001-2003 Internet Software Consortium.
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 * PERFORMANCE OF THIS SOFTWARE.
24 #include <isc/buffer.h>
27 #include <isc/parseint.h>
28 #include <isc/region.h>
29 #include <isc/result.h>
30 #include <isc/sockaddr.h>
31 #include <isc/string.h>
34 #include <isccfg/namedconf.h>
36 #include <dns/fixedname.h>
38 #include <dns/rdataclass.h>
39 #include <dns/rdatatype.h>
45 #include <named/config.h>
46 #include <named/globals.h>
48 #include "bind.keys.h"
50 /*% default configuration */
51 static char defaultconf[] = "\
53 # blackhole {none;};\n"
55 " coresize default;\n\
60 "# session-keyfile \"" NS_LOCALSTATEDIR "/run/named/session.key\";\n\
61 session-keyname local-ddns;\n\
62 session-keyalg hmac-sha256;\n\
63 deallocate-on-exit true;\n\
65 dump-file \"named_dump.db\";\n\
67 has-old-clients false;\n\
68 heartbeat-interval 60;\n\
69 host-statistics no;\n\
70 interface-interval 60;\n\
72 listen-on-v6 {none;};\n\
73 match-mapped-addresses no;\n\
74 max-rsa-exponent-size 0; /* no limit */\n\
75 memstatistics-file \"named.memstats\";\n\
76 multiple-cnames no;\n\
77 # named-xfer <obsolete>;\n\
78 # pid-file \"" NS_LOCALSTATEDIR "/run/named/named.pid\"; /* or /lwresd.pid */\n\
79 bindkeys-file \"" NS_SYSCONFDIR "/bind.keys\";\n\
81 recursing-file \"named.recursing\";\n\
82 secroots-file \"named.secroots\";\n\
86 random-device \"" PATH_RANDOMDEV "\";\n\
90 recursive-clients 1000;\n\
91 resolver-query-timeout 10;\n\
92 rrset-order { order random; };\n\
94 serial-query-rate 20;\n\
96 statistics-file \"named.stats\";\n\
97 statistics-interval 60;\n\
99 tcp-listen-queue 10;\n\
100 # tkey-dhkey <none>\n\
101 # tkey-gssapi-credential <none>\n\
102 # tkey-domain <none>\n\
103 transfers-per-ns 2;\n\
106 treat-cr-as-space true;\n\
109 edns-udp-size 4096;\n\
110 max-udp-size 4096;\n\
111 request-nsid false;\n\
112 reserved-sockets 512;\n\
115 dnssec-lookaside . trust-anchor dlv.isc.org;\n\
118 allow-notify {none;};\n\
119 allow-update-forwarding {none;};\n\
120 allow-query-cache { localnets; localhost; };\n\
121 allow-query-cache-on { any; };\n\
122 allow-recursion { localnets; localhost; };\n\
123 allow-recursion-on { any; };\n\
124 # allow-v6-synthesis <obsolete>;\n\
127 auth-nxdomain false;\n\
128 minimal-responses false;\n\
130 provide-ixfr true;\n\
131 request-ixfr true;\n\
134 additional-from-auth true;\n\
135 additional-from-cache true;\n\
136 query-source address *;\n\
137 query-source-v6 address *;\n\
139 notify-source-v6 *;\n\
140 cleaning-interval 0; /* now meaningless */\n\
143 max-ncache-ttl 10800; /* 3 hours */\n\
144 max-cache-ttl 604800; /* 1 week */\n\
145 transfer-format many-answers;\n\
147 check-names master fail;\n\
148 check-names slave warn;\n\
149 check-names response ignore;\n\
150 check-dup-records warn;\n\
154 acache-cleaning-interval 60;\n\
155 max-acache-size 16M;\n\
156 dnssec-enable yes;\n\
157 dnssec-validation yes; \n\
158 dnssec-accept-expired no;\n\
159 clients-per-query 10;\n\
160 max-clients-per-query 100;\n\
161 max-recursion-depth 7;\n\
162 zero-no-soa-ttl-cache no;\n\
163 nsec3-test-zone no;\n\
164 allow-new-zones no;\n\
166 #ifdef ALLOW_FILTER_AAAA_ON_V4
167 " filter-aaaa-on-v4 no;\n\
168 filter-aaaa { any; };\n\
173 allow-query {any;};\n\
174 allow-query-on {any;};\n\
175 allow-transfer {any;};\n\
177 # also-notify <none>\n\
182 # forwarders <none>\n\
183 maintain-ixfr-base no;\n\
184 # max-ixfr-log-size <obsolete>\n\
185 transfer-source *;\n\
186 transfer-source-v6 *;\n\
187 alt-transfer-source *;\n\
188 alt-transfer-source-v6 *;\n\
189 max-transfer-time-in 120;\n\
190 max-transfer-time-out 120;\n\
191 max-transfer-idle-in 60;\n\
192 max-transfer-idle-out 60;\n\
193 max-retry-time 1209600; /* 2 weeks */\n\
194 min-retry-time 500;\n\
195 max-refresh-time 2419200; /* 4 weeks */\n\
196 min-refresh-time 300;\n\
198 dnssec-secure-to-insecure no;\n\
199 sig-validity-interval 30; /* days */\n\
200 sig-signing-nodes 100;\n\
201 sig-signing-signatures 10;\n\
202 sig-signing-type 65534;\n\
203 inline-signing no;\n\
204 zone-statistics terse;\n\
205 max-journal-size unlimited;\n\
206 ixfr-from-differences false;\n\
207 check-wildcard yes;\n\
208 check-sibling yes;\n\
209 check-integrity yes;\n\
210 check-mx-cname warn;\n\
211 check-srv-cname warn;\n\
212 zero-no-soa-ttl yes;\n\
213 update-check-ksk yes;\n\
214 serial-update-method increment;\n\
215 dnssec-update-mode maintain;\n\
216 dnssec-dnskey-kskonly no;\n\
217 dnssec-loadkeys-interval 60;\n\
218 try-tcp-refresh yes; /* BIND 8 compat */\n\
223 # Zones in the \"_bind\" view are NOT counted in the count of zones.\n\
225 view \"_bind\" chaos {\n\
228 allow-new-zones no;\n\
231 " # Prevent use of this zone in DNS amplified reflection DoS attacks\n\
233 responses-per-second 3;\n\
235 min-table-size 10;\n\
239 " zone \"version.bind\" chaos {\n\
241 database \"_builtin version\";\n\
244 zone \"hostname.bind\" chaos {\n\
246 database \"_builtin hostname\";\n\
249 zone \"authors.bind\" chaos {\n\
251 database \"_builtin authors\";\n\
254 zone \"id.server\" chaos {\n\
256 database \"_builtin id\";\n\
261 # Default trusted key(s) for builtin DLV support\n\
262 # (used if \"dnssec-lookaside auto;\" is set and\n\
263 # sysconfdir/bind.keys doesn't exist).\n\
265 # BEGIN MANAGED KEYS\n"
267 /* Imported from bind.keys.h: */
270 "# END MANAGED KEYS\n\
274 ns_config_parsedefaults(cfg_parser_t *parser, cfg_obj_t **conf) {
277 isc_buffer_init(&b, defaultconf, sizeof(defaultconf) - 1);
278 isc_buffer_add(&b, sizeof(defaultconf) - 1);
279 return (cfg_parse_buffer(parser, &b, &cfg_type_namedconf, conf));
283 ns_config_get(const cfg_obj_t **maps, const char *name, const cfg_obj_t **obj) {
288 return (ISC_R_NOTFOUND);
289 if (cfg_map_get(maps[i], name, obj) == ISC_R_SUCCESS)
290 return (ISC_R_SUCCESS);
295 ns_checknames_get(const cfg_obj_t **maps, const char *which,
296 const cfg_obj_t **obj)
298 const cfg_listelt_t *element;
299 const cfg_obj_t *checknames;
300 const cfg_obj_t *type;
301 const cfg_obj_t *value;
306 return (ISC_R_NOTFOUND);
308 if (cfg_map_get(maps[i], "check-names",
309 &checknames) == ISC_R_SUCCESS) {
311 * Zone map entry is not a list.
313 if (checknames != NULL && !cfg_obj_islist(checknames)) {
315 return (ISC_R_SUCCESS);
317 for (element = cfg_list_first(checknames);
319 element = cfg_list_next(element)) {
320 value = cfg_listelt_value(element);
321 type = cfg_tuple_get(value, "type");
322 if (strcasecmp(cfg_obj_asstring(type),
324 *obj = cfg_tuple_get(value, "mode");
325 return (ISC_R_SUCCESS);
334 ns_config_listcount(const cfg_obj_t *list) {
335 const cfg_listelt_t *e;
338 for (e = cfg_list_first(list); e != NULL; e = cfg_list_next(e))
345 ns_config_getclass(const cfg_obj_t *classobj, dns_rdataclass_t defclass,
346 dns_rdataclass_t *classp) {
350 if (!cfg_obj_isstring(classobj)) {
352 return (ISC_R_SUCCESS);
354 DE_CONST(cfg_obj_asstring(classobj), r.base);
355 r.length = strlen(r.base);
356 result = dns_rdataclass_fromtext(classp, &r);
357 if (result != ISC_R_SUCCESS)
358 cfg_obj_log(classobj, ns_g_lctx, ISC_LOG_ERROR,
359 "unknown class '%s'", r.base);
364 ns_config_gettype(const cfg_obj_t *typeobj, dns_rdatatype_t deftype,
365 dns_rdatatype_t *typep) {
369 if (!cfg_obj_isstring(typeobj)) {
371 return (ISC_R_SUCCESS);
373 DE_CONST(cfg_obj_asstring(typeobj), r.base);
374 r.length = strlen(r.base);
375 result = dns_rdatatype_fromtext(typep, &r);
376 if (result != ISC_R_SUCCESS)
377 cfg_obj_log(typeobj, ns_g_lctx, ISC_LOG_ERROR,
378 "unknown type '%s'", r.base);
383 ns_config_getzonetype(const cfg_obj_t *zonetypeobj) {
384 dns_zonetype_t ztype = dns_zone_none;
387 str = cfg_obj_asstring(zonetypeobj);
388 if (strcasecmp(str, "master") == 0)
389 ztype = dns_zone_master;
390 else if (strcasecmp(str, "slave") == 0)
391 ztype = dns_zone_slave;
392 else if (strcasecmp(str, "stub") == 0)
393 ztype = dns_zone_stub;
394 else if (strcasecmp(str, "static-stub") == 0)
395 ztype = dns_zone_staticstub;
396 else if (strcasecmp(str, "redirect") == 0)
397 ztype = dns_zone_redirect;
404 ns_config_getiplist(const cfg_obj_t *config, const cfg_obj_t *list,
405 in_port_t defport, isc_mem_t *mctx,
406 isc_sockaddr_t **addrsp, isc_uint32_t *countp)
409 const cfg_obj_t *addrlist;
410 const cfg_obj_t *portobj;
411 const cfg_listelt_t *element;
412 isc_sockaddr_t *addrs;
416 INSIST(addrsp != NULL && *addrsp == NULL);
417 INSIST(countp != NULL);
419 addrlist = cfg_tuple_get(list, "addresses");
420 count = ns_config_listcount(addrlist);
422 portobj = cfg_tuple_get(list, "port");
423 if (cfg_obj_isuint32(portobj)) {
424 isc_uint32_t val = cfg_obj_asuint32(portobj);
425 if (val > ISC_UINT16_MAX) {
426 cfg_obj_log(portobj, ns_g_lctx, ISC_LOG_ERROR,
427 "port '%u' out of range", val);
428 return (ISC_R_RANGE);
430 port = (in_port_t) val;
431 } else if (defport != 0)
434 result = ns_config_getport(config, &port);
435 if (result != ISC_R_SUCCESS)
439 addrs = isc_mem_get(mctx, count * sizeof(isc_sockaddr_t));
441 return (ISC_R_NOMEMORY);
443 for (element = cfg_list_first(addrlist);
445 element = cfg_list_next(element), i++)
448 addrs[i] = *cfg_obj_assockaddr(cfg_listelt_value(element));
449 if (isc_sockaddr_getport(&addrs[i]) == 0)
450 isc_sockaddr_setport(&addrs[i], port);
457 return (ISC_R_SUCCESS);
461 ns_config_putiplist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
464 INSIST(addrsp != NULL && *addrsp != NULL);
466 isc_mem_put(mctx, *addrsp, count * sizeof(isc_sockaddr_t));
471 get_masters_def(const cfg_obj_t *cctx, const char *name,
472 const cfg_obj_t **ret)
475 const cfg_obj_t *masters = NULL;
476 const cfg_listelt_t *elt;
478 result = cfg_map_get(cctx, "masters", &masters);
479 if (result != ISC_R_SUCCESS)
481 for (elt = cfg_list_first(masters);
483 elt = cfg_list_next(elt)) {
484 const cfg_obj_t *list;
485 const char *listname;
487 list = cfg_listelt_value(elt);
488 listname = cfg_obj_asstring(cfg_tuple_get(list, "name"));
490 if (strcasecmp(listname, name) == 0) {
492 return (ISC_R_SUCCESS);
495 return (ISC_R_NOTFOUND);
499 ns_config_getipandkeylist(const cfg_obj_t *config, const cfg_obj_t *list,
500 isc_mem_t *mctx, isc_sockaddr_t **addrsp,
501 dns_name_t ***keysp, isc_uint32_t *countp)
503 isc_uint32_t addrcount = 0, keycount = 0, i = 0;
504 isc_uint32_t listcount = 0, l = 0, j;
505 isc_uint32_t stackcount = 0, pushed = 0;
507 const cfg_listelt_t *element;
508 const cfg_obj_t *addrlist;
509 const cfg_obj_t *portobj;
511 dns_fixedname_t fname;
512 isc_sockaddr_t *addrs = NULL;
513 dns_name_t **keys = NULL;
514 struct { const char *name; } *lists = NULL;
516 const cfg_listelt_t *element;
520 REQUIRE(addrsp != NULL && *addrsp == NULL);
521 REQUIRE(keysp != NULL && *keysp == NULL);
522 REQUIRE(countp != NULL);
525 addrlist = cfg_tuple_get(list, "addresses");
526 portobj = cfg_tuple_get(list, "port");
527 if (cfg_obj_isuint32(portobj)) {
528 isc_uint32_t val = cfg_obj_asuint32(portobj);
529 if (val > ISC_UINT16_MAX) {
530 cfg_obj_log(portobj, ns_g_lctx, ISC_LOG_ERROR,
531 "port '%u' out of range", val);
532 result = ISC_R_RANGE;
535 port = (in_port_t) val;
537 result = ns_config_getport(config, &port);
538 if (result != ISC_R_SUCCESS)
542 result = ISC_R_NOMEMORY;
544 element = cfg_list_first(addrlist);
548 element = cfg_list_next(element))
550 const cfg_obj_t *addr;
551 const cfg_obj_t *key;
555 addr = cfg_tuple_get(cfg_listelt_value(element),
557 key = cfg_tuple_get(cfg_listelt_value(element), "key");
559 if (!cfg_obj_issockaddr(addr)) {
560 const char *listname = cfg_obj_asstring(addr);
561 isc_result_t tresult;
564 if (listcount == l) {
566 isc_uint32_t newlen = listcount + 16;
567 size_t newsize, oldsize;
569 newsize = newlen * sizeof(*lists);
570 oldsize = listcount * sizeof(*lists);
571 new = isc_mem_get(mctx, newsize);
574 if (listcount != 0) {
575 memmove(new, lists, oldsize);
576 isc_mem_put(mctx, lists, oldsize);
582 for (j = 0; j < l; j++)
583 if (strcasecmp(lists[j].name, listname) == 0)
587 tresult = get_masters_def(config, listname, &list);
588 if (tresult == ISC_R_NOTFOUND) {
589 cfg_obj_log(addr, ns_g_lctx, ISC_LOG_ERROR,
590 "masters \"%s\" not found", listname);
595 if (tresult != ISC_R_SUCCESS)
597 lists[l++].name = listname;
599 if (stackcount == pushed) {
601 isc_uint32_t newlen = stackcount + 16;
602 size_t newsize, oldsize;
604 newsize = newlen * sizeof(*stack);
605 oldsize = stackcount * sizeof(*stack);
606 new = isc_mem_get(mctx, newsize);
609 if (stackcount != 0) {
610 memmove(new, stack, oldsize);
611 isc_mem_put(mctx, stack, oldsize);
617 * We want to resume processing this list on the
620 stack[pushed].element = cfg_list_next(element);
621 stack[pushed].port = port;
626 if (i == addrcount) {
628 isc_uint32_t newlen = addrcount + 16;
629 size_t newsize, oldsize;
631 newsize = newlen * sizeof(isc_sockaddr_t);
632 oldsize = addrcount * sizeof(isc_sockaddr_t);
633 new = isc_mem_get(mctx, newsize);
636 if (addrcount != 0) {
637 memmove(new, addrs, oldsize);
638 isc_mem_put(mctx, addrs, oldsize);
643 newsize = newlen * sizeof(dns_name_t *);
644 oldsize = keycount * sizeof(dns_name_t *);
645 new = isc_mem_get(mctx, newsize);
649 memmove(new, keys, oldsize);
650 isc_mem_put(mctx, keys, oldsize);
656 addrs[i] = *cfg_obj_assockaddr(addr);
657 if (isc_sockaddr_getport(&addrs[i]) == 0)
658 isc_sockaddr_setport(&addrs[i], port);
660 i++; /* Increment here so that cleanup on error works. */
661 if (!cfg_obj_isstring(key))
663 keys[i - 1] = isc_mem_get(mctx, sizeof(dns_name_t));
664 if (keys[i - 1] == NULL)
666 dns_name_init(keys[i - 1], NULL);
668 keystr = cfg_obj_asstring(key);
669 isc_buffer_constinit(&b, keystr, strlen(keystr));
670 isc_buffer_add(&b, strlen(keystr));
671 dns_fixedname_init(&fname);
672 result = dns_name_fromtext(dns_fixedname_name(&fname), &b,
673 dns_rootname, 0, NULL);
674 if (result != ISC_R_SUCCESS)
676 result = dns_name_dup(dns_fixedname_name(&fname), mctx,
678 if (result != ISC_R_SUCCESS)
683 element = stack[pushed].element;
684 port = stack[pushed].port;
689 size_t newsize, oldsize;
691 newsize = i * sizeof(isc_sockaddr_t);
692 oldsize = addrcount * sizeof(isc_sockaddr_t);
694 new = isc_mem_get(mctx, newsize);
697 memmove(new, addrs, newsize);
700 isc_mem_put(mctx, addrs, oldsize);
704 newsize = i * sizeof(dns_name_t *);
705 oldsize = keycount * sizeof(dns_name_t *);
707 new = isc_mem_get(mctx, newsize);
710 memmove(new, keys, newsize);
713 isc_mem_put(mctx, keys, oldsize);
719 isc_mem_put(mctx, lists, listcount * sizeof(*lists));
721 isc_mem_put(mctx, stack, stackcount * sizeof(*stack));
723 INSIST(keycount == addrcount);
729 return (ISC_R_SUCCESS);
733 isc_mem_put(mctx, addrs, addrcount * sizeof(isc_sockaddr_t));
735 for (j = 0; j < i; j++) {
738 if (dns_name_dynamic(keys[j]))
739 dns_name_free(keys[j], mctx);
740 isc_mem_put(mctx, keys[j], sizeof(dns_name_t));
742 isc_mem_put(mctx, keys, keycount * sizeof(dns_name_t *));
745 isc_mem_put(mctx, lists, listcount * sizeof(*lists));
747 isc_mem_put(mctx, stack, stackcount * sizeof(*stack));
752 ns_config_putipandkeylist(isc_mem_t *mctx, isc_sockaddr_t **addrsp,
753 dns_name_t ***keysp, isc_uint32_t count)
756 dns_name_t **keys = *keysp;
758 INSIST(addrsp != NULL && *addrsp != NULL);
760 isc_mem_put(mctx, *addrsp, count * sizeof(isc_sockaddr_t));
761 for (i = 0; i < count; i++) {
764 if (dns_name_dynamic(keys[i]))
765 dns_name_free(keys[i], mctx);
766 isc_mem_put(mctx, keys[i], sizeof(dns_name_t));
768 isc_mem_put(mctx, *keysp, count * sizeof(dns_name_t *));
774 ns_config_getport(const cfg_obj_t *config, in_port_t *portp) {
775 const cfg_obj_t *maps[3];
776 const cfg_obj_t *options = NULL;
777 const cfg_obj_t *portobj = NULL;
781 (void)cfg_map_get(config, "options", &options);
785 maps[i++] = ns_g_defaults;
788 result = ns_config_get(maps, "port", &portobj);
789 INSIST(result == ISC_R_SUCCESS);
790 if (cfg_obj_asuint32(portobj) >= ISC_UINT16_MAX) {
791 cfg_obj_log(portobj, ns_g_lctx, ISC_LOG_ERROR,
792 "port '%u' out of range",
793 cfg_obj_asuint32(portobj));
794 return (ISC_R_RANGE);
796 *portp = (in_port_t)cfg_obj_asuint32(portobj);
797 return (ISC_R_SUCCESS);
800 struct keyalgorithms {
802 enum { hmacnone, hmacmd5, hmacsha1, hmacsha224,
803 hmacsha256, hmacsha384, hmacsha512 } hmac;
807 { "hmac-md5", hmacmd5, DST_ALG_HMACMD5, 128 },
808 { "hmac-md5.sig-alg.reg.int", hmacmd5, DST_ALG_HMACMD5, 0 },
809 { "hmac-md5.sig-alg.reg.int.", hmacmd5, DST_ALG_HMACMD5, 0 },
810 { "hmac-sha1", hmacsha1, DST_ALG_HMACSHA1, 160 },
811 { "hmac-sha224", hmacsha224, DST_ALG_HMACSHA224, 224 },
812 { "hmac-sha256", hmacsha256, DST_ALG_HMACSHA256, 256 },
813 { "hmac-sha384", hmacsha384, DST_ALG_HMACSHA384, 384 },
814 { "hmac-sha512", hmacsha512, DST_ALG_HMACSHA512, 512 },
815 { NULL, hmacnone, DST_ALG_UNKNOWN, 0 }
819 ns_config_getkeyalgorithm(const char *str, dns_name_t **name,
820 isc_uint16_t *digestbits)
822 return (ns_config_getkeyalgorithm2(str, name, NULL, digestbits));
826 ns_config_getkeyalgorithm2(const char *str, dns_name_t **name,
827 unsigned int *typep, isc_uint16_t *digestbits)
834 for (i = 0; algorithms[i].str != NULL; i++) {
835 len = strlen(algorithms[i].str);
836 if (strncasecmp(algorithms[i].str, str, len) == 0 &&
838 (algorithms[i].size != 0 && str[len] == '-')))
841 if (algorithms[i].str == NULL)
842 return (ISC_R_NOTFOUND);
843 if (str[len] == '-') {
844 result = isc_parse_uint16(&bits, str + len + 1, 10);
845 if (result != ISC_R_SUCCESS)
847 if (bits > algorithms[i].size)
848 return (ISC_R_RANGE);
849 } else if (algorithms[i].size == 0)
852 bits = algorithms[i].size;
855 switch (algorithms[i].hmac) {
856 case hmacmd5: *name = dns_tsig_hmacmd5_name; break;
857 case hmacsha1: *name = dns_tsig_hmacsha1_name; break;
858 case hmacsha224: *name = dns_tsig_hmacsha224_name; break;
859 case hmacsha256: *name = dns_tsig_hmacsha256_name; break;
860 case hmacsha384: *name = dns_tsig_hmacsha384_name; break;
861 case hmacsha512: *name = dns_tsig_hmacsha512_name; break;
867 *typep = algorithms[i].type;
868 if (digestbits != NULL)
870 return (ISC_R_SUCCESS);