summaryrefslogtreecommitdiff
path: root/usr.bin/dig/lib/dns/rdata/generic/keydata_65533.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/dig/lib/dns/rdata/generic/keydata_65533.c')
-rw-r--r--usr.bin/dig/lib/dns/rdata/generic/keydata_65533.c68
1 files changed, 0 insertions, 68 deletions
diff --git a/usr.bin/dig/lib/dns/rdata/generic/keydata_65533.c b/usr.bin/dig/lib/dns/rdata/generic/keydata_65533.c
index d58d5d49996..b3fb50e8718 100644
--- a/usr.bin/dig/lib/dns/rdata/generic/keydata_65533.c
+++ b/usr.bin/dig/lib/dns/rdata/generic/keydata_65533.c
@@ -23,74 +23,6 @@
#define RRTYPE_KEYDATA_ATTRIBUTES (0)
-static inline isc_result_t
-fromtext_keydata(ARGS_FROMTEXT) {
- isc_result_t result;
- isc_token_t token;
- dns_secalg_t alg;
- dns_secproto_t proto;
- dns_keyflags_t flags;
- uint32_t refresh, addhd, removehd;
-
- REQUIRE(type == dns_rdatatype_keydata);
-
- UNUSED(type);
- UNUSED(rdclass);
- UNUSED(origin);
- UNUSED(options);
- UNUSED(callbacks);
-
- /* refresh timer */
- RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
- ISC_FALSE));
- RETTOK(dns_time32_fromtext(DNS_AS_STR(token), &refresh));
- RETERR(uint32_tobuffer(refresh, target));
-
- /* add hold-down */
- RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
- ISC_FALSE));
- RETTOK(dns_time32_fromtext(DNS_AS_STR(token), &addhd));
- RETERR(uint32_tobuffer(addhd, target));
-
- /* remove hold-down */
- RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
- ISC_FALSE));
- RETTOK(dns_time32_fromtext(DNS_AS_STR(token), &removehd));
- RETERR(uint32_tobuffer(removehd, target));
-
- /* flags */
- RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
- ISC_FALSE));
- RETTOK(dns_keyflags_fromtext(&flags, &token.value.as_textregion));
- RETERR(uint16_tobuffer(flags, target));
-
- /* protocol */
- RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
- ISC_FALSE));
- RETTOK(dns_secproto_fromtext(&proto, &token.value.as_textregion));
- RETERR(mem_tobuffer(target, &proto, 1));
-
- /* algorithm */
- RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
- ISC_FALSE));
- RETTOK(dns_secalg_fromtext(&alg, &token.value.as_textregion));
- RETERR(mem_tobuffer(target, &alg, 1));
-
- /* No Key? */
- if ((flags & 0xc000) == 0xc000)
- return (ISC_R_SUCCESS);
-
- result = isc_base64_tobuffer(lexer, target, -1);
- if (result != ISC_R_SUCCESS)
- return (result);
-
- /* Ensure there's at least enough data to compute a key ID for MD5 */
- if (alg == DST_ALG_RSAMD5 && isc_buffer_usedlength(target) < 19)
- return (ISC_R_UNEXPECTEDEND);
-
- return (ISC_R_SUCCESS);
-}
-
/*
* ISC_FORMATHTTPTIMESTAMP_SIZE needs to be 30 in C locale and potentially
* more for other locales to handle longer national abbreviations when