summaryrefslogtreecommitdiff
path: root/lib/dns/dst_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dns/dst_api.c')
-rw-r--r--lib/dns/dst_api.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/dns/dst_api.c b/lib/dns/dst_api.c
index 98607246effc..641627376047 100644
--- a/lib/dns/dst_api.c
+++ b/lib/dns/dst_api.c
@@ -443,6 +443,16 @@ dst_key_tofile(const dst_key_t *key, int type, const char *directory) {
return (ISC_R_SUCCESS);
}
+void
+dst_key_setexternal(dst_key_t *key, isc_boolean_t value) {
+ key->external = value;
+}
+
+isc_boolean_t
+dst_key_isexternal(dst_key_t *key) {
+ return (key->external);
+}
+
isc_result_t
dst_key_fromfile(dns_name_t *name, dns_keytag_t id,
unsigned int alg, int type, const char *directory,
@@ -1349,10 +1359,27 @@ get_key_struct(dns_name_t *name, unsigned int alg,
key->times[i] = 0;
key->timeset[i] = ISC_FALSE;
}
+ key->inactive = ISC_FALSE;
key->magic = KEY_MAGIC;
return (key);
}
+isc_boolean_t
+dst_key_inactive(const dst_key_t *key) {
+
+ REQUIRE(VALID_KEY(key));
+
+ return (key->inactive);
+}
+
+void
+dst_key_setinactive(dst_key_t *key, isc_boolean_t inactive) {
+
+ REQUIRE(VALID_KEY(key));
+
+ key->inactive = inactive;
+}
+
/*%
* Reads a public key from disk
*/