Skip to content
Snippets Groups Projects
Commit 1c3335c2 authored by Jan Včelák's avatar Jan Včelák :rocket:
Browse files

DNSSEC: ignore K prefix for key filenames

refs #4
parent f31ae326
No related branches found
No related tags found
No related merge requests found
......@@ -78,15 +78,15 @@ int load_zone_keys(const char *keydir_name, const knot_dname_t *zone_name,
while (keys->count < KNOT_MAX_ZONE_KEYS &&
readdir_r(keydir, &entry_buf, &entry) == 0 &&
entry != NULL) {
if (entry->d_name[0] != 'K')
continue;
char *suffix = strrchr(entry->d_name, '.');
if (!suffix)
if (!suffix) {
continue;
}
if (strcmp(suffix, ".private") != 0)
if (strcmp(suffix, ".private") != 0) {
continue;
}
size_t path_len = strlen(keydir_name) + 1
+ strlen(entry->d_name) + 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment