~mcf/dnssec-rr

841d6d8dd1997f73c23a781ffbd35bb8b0552de3 — Michael Forney 3 years ago 3a48e92
Handle unknown digest and algorithm properly
1 files changed, 2 insertions(+), 2 deletions(-)

M dnssec.c
M dnssec.c => dnssec.c +2 -2
@@ 97,7 97,7 @@ int
algorithm_from_string(const char *s)
{
	size_t i = find_string(algorithm_names, LEN(algorithm_names), s);
	if (i == -1)
	if (!i)
		errx(1, "unknown algorithm '%s'", s);
	return i;
}


@@ 118,7 118,7 @@ int
digest_from_string(const char *s)
{
	size_t i = find_string(digest_names, LEN(digest_names), s);
	if (i == -1)
	if (!i)
		errx(1, "unknown digest '%s'", s);
	return i;
}