Store key directory when reading the key from file. This is the
directory it was read from and can be used when saving the key back
to disk.
}
key->modified = false;
+
+ if (dirname != NULL) {
+ key->directory = isc_mem_strdup(mctx, dirname);
+ }
*keyp = key;
key = NULL;
INSIST(key->func->destroy != NULL);
key->func->destroy(key);
}
+ if (key->directory != NULL) {
+ isc_mem_free(mctx, key->directory);
+ }
if (key->engine != NULL) {
isc_mem_free(mctx, key->engine);
}
dns_rdataclass_t key_class; /*%< class of the key record */
dns_ttl_t key_ttl; /*%< default/initial dnskey ttl */
isc_mem_t *mctx; /*%< memory context */
+ char *directory; /*%< key directory */
char *engine; /*%< engine name (HSM) */
char *label; /*%< engine label (HSM) */
char *object; /*%< engine object (HSM) */