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

key parsing: default origin, TTL and class; parse as a last line

refs #2353
parent cd01a095
No related branches found
No related tags found
No related merge requests found
......@@ -109,6 +109,10 @@ static int get_key_info_from_public_key(const char *filename,
scanner->process_record = key_scan_noop;
scanner->process_error = key_scan_noop;
scanner->default_ttl = 0;
scanner->default_class = KNOT_CLASS_IN;
scanner->zone_origin[0] = '\0';
scanner->zone_origin_length = 1;
char *buffer = NULL;
size_t buffer_size;
......@@ -121,7 +125,7 @@ static int get_key_info_from_public_key(const char *filename,
return KNOT_KEY_EPUBLIC_KEY_INVALID;
}
if (scanner_process(buffer, buffer + read, false, scanner) != 0) {
if (scanner_process(buffer, buffer + read, true, scanner) != 0) {
free(buffer);
scanner_free(scanner);
return KNOT_KEY_EPUBLIC_KEY_INVALID;
......
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