Lines Matching defs:key
60 fprintf(stderr, " -K directory: use directory for key files\n");
67 fprintf(stderr, " K<name>+<alg>+<new id>.key, "
88 dst_key_t *key = NULL;
161 fatal("The key file name was not specified");
194 mctx, &key);
200 fprintf(stdout, "%u\n", dst_key_rid(key));
203 dst_key_format(key, keystr, sizeof(keystr));
209 set_keyversion(key);
211 check_keyversion(key, keystr);
214 flags = dst_key_flags(key);
225 dst_key_settime(key, DST_TIME_REVOKE, now);
227 dst_key_setflags(key, flags | DNS_KEYFLAG_REVOKE);
230 dst_key_buildfilename(key, DST_TYPE_PUBLIC, dir, &buf);
237 result = dst_key_tofile(key, DST_TYPE_PUBLIC|DST_TYPE_PRIVATE,
240 dst_key_format(key, keystr, sizeof(keystr));
241 fatal("Failed to write key %s: %s", keystr,
246 dst_key_buildfilename(key, 0, dir, &buf);
250 * Remove old key file, if told to (and if
253 if (removefile && dst_key_alg(key) != DST_ALG_RSAMD5) {
255 dst_key_setflags(key, flags & ~DNS_KEYFLAG_REVOKE);
256 dst_key_buildfilename(key, DST_TYPE_PRIVATE, dir, &buf);
261 dst_key_buildfilename(key, DST_TYPE_PUBLIC, dir, &buf);
265 dst_key_format(key, keystr, sizeof(keystr));
270 dst_key_free(&key);