Commit b03c1bf7 authored by Brian Wellington's avatar Brian Wellington
Browse files

Make sure to create all keyset- and signedkey- files with downcased names;

downcase names before looking for signedkey- files in dnssec-signzone.
parent b8a85202
......@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-makekeyset.c,v 1.47 2001/03/22 19:28:23 bwelling Exp $ */
/* $Id: dnssec-makekeyset.c,v 1.48 2001/03/23 03:58:58 bwelling Exp $ */
#include <config.h>
......@@ -246,6 +246,7 @@ main(int argc, char *argv[]) {
for (i = 0; i < argc; i++) {
char namestr[DNS_NAME_FORMATSIZE];
dns_fixedname_t fname;
isc_buffer_t namebuf;
key = NULL;
......@@ -257,7 +258,12 @@ main(int argc, char *argv[]) {
rdatalist.rdclass = dst_key_class(key);
isc_buffer_init(&namebuf, namestr, sizeof namestr);
result = dns_name_totext(dst_key_name(key), ISC_FALSE,
dns_fixedname_init(&fname);
dns_name_downcase(dst_key_name(key),
dns_fixedname_name(&fname),
NULL);
result = dns_name_totext(dns_fixedname_name(&fname),
ISC_FALSE,
&namebuf);
check_result(result, "dns_name_totext");
isc_buffer_putuint8(&namebuf, 0);
......
......@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-signkey.c,v 1.46 2001/01/09 21:39:24 bwelling Exp $ */
/* $Id: dnssec-signkey.c,v 1.47 2001/03/23 03:58:59 bwelling Exp $ */
#include <config.h>
......@@ -262,7 +262,7 @@ main(int argc, char *argv[]) {
isc_buffer_init(&b, argv[0] + strlen("keyset-"),
strlen(argv[0]) - strlen("keyset-"));
isc_buffer_add(&b, strlen(argv[0]) - strlen("keyset-"));
result = dns_name_fromtext(domain, &b, dns_rootname, ISC_FALSE, NULL);
result = dns_name_fromtext(domain, &b, dns_rootname, ISC_TRUE, NULL);
if (result != ISC_R_SUCCESS)
fatal("'%s' does not contain a valid domain name", argv[0]);
isc_buffer_init(&b, tdomain, sizeof(tdomain) - 1);
......
......@@ -17,7 +17,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dnssec-signzone.c,v 1.129 2001/01/12 23:36:03 bwelling Exp $ */
/* $Id: dnssec-signzone.c,v 1.130 2001/03/23 03:59:00 bwelling Exp $ */
#include <config.h>
......@@ -505,6 +505,7 @@ static void
opendb(const char *prefix, dns_name_t *name, dns_rdataclass_t rdclass,
dns_db_t **dbp)
{
dns_fixedname_t fname;
char filename[256];
isc_buffer_t b;
isc_result_t result;
......@@ -516,7 +517,9 @@ opendb(const char *prefix, dns_name_t *name, dns_rdataclass_t rdclass,
isc_buffer_putstr(&b, "/");
}
isc_buffer_putstr(&b, prefix);
result = dns_name_totext(name, ISC_FALSE, &b);
dns_fixedname_init(&fname);
(void)dns_name_downcase(name, dns_fixedname_name(&fname), NULL);
result = dns_name_totext(dns_fixedname_name(&fname), ISC_FALSE, &b);
check_result(result, "dns_name_totext()");
if (isc_buffer_availablelength(&b) == 0) {
char namestr[DNS_NAME_FORMATSIZE];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment