Skip to content
Snippets Groups Projects
Commit e6a38dc0 authored by Jan Včelák's avatar Jan Včelák :rocket: Committed by Gerrit Code Review
Browse files

nsupdate: disallow key specification multiple times

norefs
parent fd7175c6
No related branches found
No related tags found
No related merge requests found
......@@ -316,7 +316,8 @@ int params_parse_tsig(const char *value, knot_key_params_t *key_params)
/* Invalidate previous key. */
if (key_params->name) {
knot_free_key_params(key_params);
ERR("Key specified multiple times.\n");
return KNOT_EINVAL;
}
char *h = strdup(value);
......@@ -375,7 +376,8 @@ int params_parse_keyfile(const char *value, knot_key_params_t *key_params)
}
if (key_params->name) {
knot_free_key_params(key_params);
ERR("Key specified multiple times.\n");
return KNOT_EINVAL;
}
int result = knot_load_key_params(value, key_params);
......
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