From 96eb58dd46484492d8ed80bc5ec0ea62a2caba09 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Thu, 27 Apr 2000 22:09:59 +0000 Subject: [PATCH] conform to buffer API changes --- bin/dnssec/dnssec-makekeyset.c | 8 ++++---- bin/dnssec/dnssec-signkey.c | 6 +++--- bin/tests/keysettool.c | 8 ++++---- bin/tests/keysigner.c | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/bin/dnssec/dnssec-makekeyset.c b/bin/dnssec/dnssec-makekeyset.c index 539326dd8d..906277af0d 100644 --- a/bin/dnssec/dnssec-makekeyset.c +++ b/bin/dnssec/dnssec-makekeyset.c @@ -236,11 +236,11 @@ main(int argc, char *argv[]) { dns_fixedname_init(&fdomain); domain = dns_fixedname_name(&fdomain); - isc_buffer_init(&b, argv[0], strlen(argv[0]), ISC_BUFFERTYPE_TEXT); + isc_buffer_init(&b, argv[0], strlen(argv[0])); isc_buffer_add(&b, strlen(argv[0])); result = dns_name_fromtext(domain, &b, dns_rootname, ISC_FALSE, NULL); check_result(result, "dns_name_fromtext()"); - isc_buffer_init(&b, tdomain, sizeof(tdomain) - 1, ISC_BUFFERTYPE_TEXT); + isc_buffer_init(&b, tdomain, sizeof(tdomain) - 1); result = dns_name_totext(domain, ISC_FALSE, &b); check_result(result, "dns_name_totext()"); isc_buffer_usedregion(&b, &r); @@ -306,7 +306,7 @@ main(int argc, char *argv[]) { data = isc_mem_get(mctx, BUFSIZE); if (data == NULL) check_result(ISC_R_NOMEMORY, "isc_mem_get()"); - isc_buffer_init(&b, data, BUFSIZE, ISC_BUFFERTYPE_BINARY); + isc_buffer_init(&b, data, BUFSIZE); result = dst_key_todns(key, &b); check_result(result, "dst_key_todns()"); isc_buffer_usedregion(&b, &r); @@ -339,7 +339,7 @@ main(int argc, char *argv[]) { data = isc_mem_get(mctx, BUFSIZE); if (data == NULL) check_result(ISC_R_NOMEMORY, "isc_mem_get()"); - isc_buffer_init(&b, data, BUFSIZE, ISC_BUFFERTYPE_BINARY); + isc_buffer_init(&b, data, BUFSIZE); result = dns_dnssec_sign(domain, &rdataset, keynode->key, &starttime, &endtime, mctx, &b, rdata); check_result(result, "dst_key_todns()"); diff --git a/bin/dnssec/dnssec-signkey.c b/bin/dnssec/dnssec-signkey.c index 3beeef049f..f694e29438 100644 --- a/bin/dnssec/dnssec-signkey.c +++ b/bin/dnssec/dnssec-signkey.c @@ -219,11 +219,11 @@ main(int argc, char *argv[]) { dns_fixedname_init(&fdomain); domain = dns_fixedname_name(&fdomain); - isc_buffer_init(&b, argv[0], strlen(argv[0]) - 7, ISC_BUFFERTYPE_TEXT); + isc_buffer_init(&b, argv[0], strlen(argv[0]) - 7); isc_buffer_add(&b, strlen(argv[0]) - 7); result = dns_name_fromtext(domain, &b, dns_rootname, ISC_FALSE, NULL); check_result(result, "dns_name_fromtext()"); - isc_buffer_init(&b, tdomain, sizeof(tdomain) - 1, ISC_BUFFERTYPE_TEXT); + isc_buffer_init(&b, tdomain, sizeof(tdomain) - 1); result = dns_name_totext(domain, ISC_FALSE, &b); check_result(result, "dns_name_totext()"); isc_buffer_usedregion(&b, &r); @@ -331,7 +331,7 @@ main(int argc, char *argv[]) { data = isc_mem_get(mctx, BUFSIZE); if (data == NULL) check_result(ISC_R_NOMEMORY, "isc_mem_get()"); - isc_buffer_init(&b, data, BUFSIZE, ISC_BUFFERTYPE_BINARY); + isc_buffer_init(&b, data, BUFSIZE); result = dns_dnssec_sign(domain, &rdataset, key, &sig.timesigned, &sig.timeexpire, mctx, &b, rdata); diff --git a/bin/tests/keysettool.c b/bin/tests/keysettool.c index 539326dd8d..906277af0d 100644 --- a/bin/tests/keysettool.c +++ b/bin/tests/keysettool.c @@ -236,11 +236,11 @@ main(int argc, char *argv[]) { dns_fixedname_init(&fdomain); domain = dns_fixedname_name(&fdomain); - isc_buffer_init(&b, argv[0], strlen(argv[0]), ISC_BUFFERTYPE_TEXT); + isc_buffer_init(&b, argv[0], strlen(argv[0])); isc_buffer_add(&b, strlen(argv[0])); result = dns_name_fromtext(domain, &b, dns_rootname, ISC_FALSE, NULL); check_result(result, "dns_name_fromtext()"); - isc_buffer_init(&b, tdomain, sizeof(tdomain) - 1, ISC_BUFFERTYPE_TEXT); + isc_buffer_init(&b, tdomain, sizeof(tdomain) - 1); result = dns_name_totext(domain, ISC_FALSE, &b); check_result(result, "dns_name_totext()"); isc_buffer_usedregion(&b, &r); @@ -306,7 +306,7 @@ main(int argc, char *argv[]) { data = isc_mem_get(mctx, BUFSIZE); if (data == NULL) check_result(ISC_R_NOMEMORY, "isc_mem_get()"); - isc_buffer_init(&b, data, BUFSIZE, ISC_BUFFERTYPE_BINARY); + isc_buffer_init(&b, data, BUFSIZE); result = dst_key_todns(key, &b); check_result(result, "dst_key_todns()"); isc_buffer_usedregion(&b, &r); @@ -339,7 +339,7 @@ main(int argc, char *argv[]) { data = isc_mem_get(mctx, BUFSIZE); if (data == NULL) check_result(ISC_R_NOMEMORY, "isc_mem_get()"); - isc_buffer_init(&b, data, BUFSIZE, ISC_BUFFERTYPE_BINARY); + isc_buffer_init(&b, data, BUFSIZE); result = dns_dnssec_sign(domain, &rdataset, keynode->key, &starttime, &endtime, mctx, &b, rdata); check_result(result, "dst_key_todns()"); diff --git a/bin/tests/keysigner.c b/bin/tests/keysigner.c index 3beeef049f..f694e29438 100644 --- a/bin/tests/keysigner.c +++ b/bin/tests/keysigner.c @@ -219,11 +219,11 @@ main(int argc, char *argv[]) { dns_fixedname_init(&fdomain); domain = dns_fixedname_name(&fdomain); - isc_buffer_init(&b, argv[0], strlen(argv[0]) - 7, ISC_BUFFERTYPE_TEXT); + isc_buffer_init(&b, argv[0], strlen(argv[0]) - 7); isc_buffer_add(&b, strlen(argv[0]) - 7); result = dns_name_fromtext(domain, &b, dns_rootname, ISC_FALSE, NULL); check_result(result, "dns_name_fromtext()"); - isc_buffer_init(&b, tdomain, sizeof(tdomain) - 1, ISC_BUFFERTYPE_TEXT); + isc_buffer_init(&b, tdomain, sizeof(tdomain) - 1); result = dns_name_totext(domain, ISC_FALSE, &b); check_result(result, "dns_name_totext()"); isc_buffer_usedregion(&b, &r); @@ -331,7 +331,7 @@ main(int argc, char *argv[]) { data = isc_mem_get(mctx, BUFSIZE); if (data == NULL) check_result(ISC_R_NOMEMORY, "isc_mem_get()"); - isc_buffer_init(&b, data, BUFSIZE, ISC_BUFFERTYPE_BINARY); + isc_buffer_init(&b, data, BUFSIZE); result = dns_dnssec_sign(domain, &rdataset, key, &sig.timesigned, &sig.timeexpire, mctx, &b, rdata);