return (result);
}
+#define ROOT_KSK_2010 0x1
+#define ROOT_KSK_2017 0x2
+#define DLV_KSK_KEY 0x4
+
static isc_result_t
check_trusted_key(const cfg_obj_t *key, isc_boolean_t managed,
- isc_log_t *logctx)
+ unsigned int *keyflags, isc_log_t *logctx)
{
const char *keystr, *keynamestr;
dns_fixedname_t fkeyname;
keynamestr);
}
+ if (result == ISC_R_SUCCESS && dns_name_equal(keyname, dns_rootname)) {
+ static const unsigned char root_ksk_2010[] = {
+ 0x03, 0x01, 0x00, 0x01, 0xa8, 0x00, 0x20, 0xa9,
+ 0x55, 0x66, 0xba, 0x42, 0xe8, 0x86, 0xbb, 0x80,
+ 0x4c, 0xda, 0x84, 0xe4, 0x7e, 0xf5, 0x6d, 0xbd,
+ 0x7a, 0xec, 0x61, 0x26, 0x15, 0x55, 0x2c, 0xec,
+ 0x90, 0x6d, 0x21, 0x16, 0xd0, 0xef, 0x20, 0x70,
+ 0x28, 0xc5, 0x15, 0x54, 0x14, 0x4d, 0xfe, 0xaf,
+ 0xe7, 0xc7, 0xcb, 0x8f, 0x00, 0x5d, 0xd1, 0x82,
+ 0x34, 0x13, 0x3a, 0xc0, 0x71, 0x0a, 0x81, 0x18,
+ 0x2c, 0xe1, 0xfd, 0x14, 0xad, 0x22, 0x83, 0xbc,
+ 0x83, 0x43, 0x5f, 0x9d, 0xf2, 0xf6, 0x31, 0x32,
+ 0x51, 0x93, 0x1a, 0x17, 0x6d, 0xf0, 0xda, 0x51,
+ 0xe5, 0x4f, 0x42, 0xe6, 0x04, 0x86, 0x0d, 0xfb,
+ 0x35, 0x95, 0x80, 0x25, 0x0f, 0x55, 0x9c, 0xc5,
+ 0x43, 0xc4, 0xff, 0xd5, 0x1c, 0xbe, 0x3d, 0xe8,
+ 0xcf, 0xd0, 0x67, 0x19, 0x23, 0x7f, 0x9f, 0xc4,
+ 0x7e, 0xe7, 0x29, 0xda, 0x06, 0x83, 0x5f, 0xa4,
+ 0x52, 0xe8, 0x25, 0xe9, 0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3a,
+ 0xf9, 0xc9, 0xfc, 0x1c, 0x54, 0x66, 0xfb, 0x68,
+ 0x4c, 0xf0, 0x09, 0xd7, 0x19, 0x7c, 0x2c, 0xf7,
+ 0x9e, 0x79, 0x2a, 0xb5, 0x01, 0xe6, 0xa8, 0xa1,
+ 0xca, 0x51, 0x9a, 0xf2, 0xcb, 0x9b, 0x5f, 0x63,
+ 0x67, 0xe9, 0x4c, 0x0d, 0x47, 0x50, 0x24, 0x51,
+ 0x35, 0x7b, 0xe1, 0xb5 };
+ if (flags == 257 && proto == 3 && alg == 8 &&
+ isc_buffer_usedlength(&b) == sizeof(root_ksk_2010) &&
+ !memcmp(keydata, root_ksk_2010, sizeof(root_ksk_2010))) {
+ *keyflags |= ROOT_KSK_2010;
+ }
+ if (flags == 257 && proto == 3 && alg == 8 &&
+ isc_buffer_usedlength(&b) == sizeof(root_ksk_2017) &&
+ !memcmp(keydata, root_ksk_2017, sizeof(root_ksk_2017))) {
+ *keyflags |= ROOT_KSK_2017;
+ }
+ }
+ if (result == ISC_R_SUCCESS && dns_name_equal(keyname, &dlviscorg)) {
+ static const unsigned char dlviscorgkey[] = {
+ 0x04, 0x40, 0x00, 0x00, 0x03, 0xc7, 0x32, 0xef,
+ 0xf9, 0xa2, 0x7c, 0xeb, 0x10, 0x4e, 0xf3, 0xd5,
+ 0xe8, 0x26, 0x86, 0x0f, 0xd6, 0x3c, 0xed, 0x3e,
+ 0x8e, 0xea, 0x19, 0xad, 0x6d, 0xde, 0xb9, 0x61,
+ 0x27, 0xe0, 0xcc, 0x43, 0x08, 0x4d, 0x7e, 0x94,
+ 0xbc, 0xb6, 0x6e, 0xb8, 0x50, 0xbf, 0x9a, 0xcd,
+ 0xdf, 0x64, 0x4a, 0xb4, 0xcc, 0xd7, 0xe8, 0xc8,
+ 0xfb, 0xd2, 0x37, 0x73, 0x78, 0xd0, 0xf8, 0x5e,
+ 0x49, 0xd6, 0xe7, 0xc7, 0x67, 0x24, 0xd3, 0xc2,
+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0x7c, 0xe9, 0x4f, 0x9f,
+ 0x64, 0xfd, 0x54, 0xad, 0x4c, 0x33, 0x74, 0x61,
+ 0x4b, 0x96, 0xac, 0x13, 0x61 };
+ if (flags == 257 && proto == 3 && alg == 5 &&
+ isc_buffer_usedlength(&b) == sizeof(dlviscorgkey) &&
+ !memcmp(keydata, dlviscorgkey, sizeof(dlviscorgkey))) {
+ *keyflags |= DLV_KSK_KEY;
+ }
+ }
+
return (result);
}
const cfg_obj_t *opts = NULL;
isc_boolean_t enablednssec, enablevalidation;
const char *valstr = "no";
+ unsigned int tflags, mflags;
/*
* Get global options block
if (keys == NULL)
(void)cfg_map_get(config, "trusted-keys", &keys);
+ tflags = 0;
for (element = cfg_list_first(keys);
element != NULL;
element = cfg_list_next(element))
element2 != NULL;
element2 = cfg_list_next(element2)) {
obj = cfg_listelt_value(element2);
- tresult = check_trusted_key(obj, ISC_FALSE, logctx);
+ tresult = check_trusted_key(obj, ISC_FALSE, &tflags,
+ logctx);
if (tresult != ISC_R_SUCCESS)
result = tresult;
}
}
+ if ((tflags & ROOT_KSK_2010) != 0 && (tflags & ROOT_KSK_2017) == 0) {
+ cfg_obj_log(keys, logctx, ISC_LOG_WARNING,
+ "trusted-key for root from 2010 without updated "
+ "trusted-key from 2017");
+ }
+
+ if ((tflags & DLV_KSK_KEY) != 0) {
+ cfg_obj_log(keys, logctx, ISC_LOG_WARNING,
+ "trusted-key for dlv.isc.org still present; "
+ "dlv.isc.org has been shut down");
+ }
+
keys = NULL;
if (voptions != NULL)
(void)cfg_map_get(voptions, "managed-keys", &keys);
if (keys == NULL)
(void)cfg_map_get(config, "managed-keys", &keys);
+ mflags = 0;
for (element = cfg_list_first(keys);
element != NULL;
element = cfg_list_next(element))
element2 != NULL;
element2 = cfg_list_next(element2)) {
obj = cfg_listelt_value(element2);
- tresult = check_trusted_key(obj, ISC_TRUE, logctx);
+ tresult = check_trusted_key(obj, ISC_TRUE, &mflags,
+ logctx);
if (tresult != ISC_R_SUCCESS)
result = tresult;
}
}
+ if ((mflags & ROOT_KSK_2010) != 0 && (mflags & ROOT_KSK_2017) == 0) {
+ cfg_obj_log(keys, logctx, ISC_LOG_WARNING,
+ "managed-key for root from 2010 without updated "
+ "managed-key from 2017");
+ }
+
+ if ((mflags & DLV_KSK_KEY) != 0) {
+ cfg_obj_log(keys, logctx, ISC_LOG_WARNING,
+ "managed-key for dlv.isc.org still present; "
+ "dlv.isc.org has been shut down");
+ }
+
+ if ((tflags & (ROOT_KSK_2010|ROOT_KSK_2017)) != 0 &&
+ (mflags & (ROOT_KSK_2010|ROOT_KSK_2017)) != 0)
+ {
+ cfg_obj_log(keys, logctx, ISC_LOG_WARNING,
+ "both trusted-keys and managed-keys for the ICANN "
+ "root are present");
+ }
+
/*
* Check options.
*/