diff --git a/lib/dns/sec/dst/dst_api.c b/lib/dns/sec/dst/dst_api.c index fee784e43a..18094d7509 100644 --- a/lib/dns/sec/dst/dst_api.c +++ b/lib/dns/sec/dst/dst_api.c @@ -19,7 +19,7 @@ /* * Principal Author: Brian Wellington - * $Id: dst_api.c,v 1.64 2000/10/25 04:26:57 marka Exp $ + * $Id: dst_api.c,v 1.65 2000/11/01 00:17:17 bwelling Exp $ */ #include @@ -861,6 +861,8 @@ read_public_key(const char *filename, isc_mem_t *mctx, dst_key_t **keyp) { if (strcmp(filename + strlen(filename) - 8, ".private") == 0) sprintf(newfilename + strlen(filename) - 8, ".key"); + else if (strcmp(filename + strlen(filename) - 1, ".") == 0) + sprintf(newfilename + strlen(filename), "key"); else if (strcmp(filename + strlen(filename) - 4, ".key") != 0) sprintf(newfilename + strlen(filename), ".key"); diff --git a/lib/dns/sec/dst/dst_parse.c b/lib/dns/sec/dst/dst_parse.c index f3ba247cd6..f3f7848193 100644 --- a/lib/dns/sec/dst/dst_parse.c +++ b/lib/dns/sec/dst/dst_parse.c @@ -19,7 +19,7 @@ /* * Principal Author: Brian Wellington - * $Id: dst_parse.c,v 1.25 2000/09/08 14:25:40 bwelling Exp $ + * $Id: dst_parse.c,v 1.26 2000/11/01 00:17:18 bwelling Exp $ */ #include @@ -209,6 +209,8 @@ dst__privstruct_parsefile(dst_key_t *key, const isc_uint16_t id, if (strcmp(filename + strlen(filename) - 4, ".key") == 0) sprintf(newfilename + strlen(filename) - 4, ".private"); + else if (strcmp(filename + strlen(filename) - 1, ".") == 0) + sprintf(newfilename + strlen(filename), "private"); else if (strcmp(filename + strlen(filename) - 8, ".private") != 0) sprintf(newfilename + strlen(filename), ".private");