mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
- print the names of the files generated, expand the usages a bit
- add -d directory option to dnssec-signzone
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssec-keygen.c,v 1.42 2000/09/26 22:11:20 bwelling Exp $ */
|
||||
/* $Id: dnssec-keygen.c,v 1.43 2000/10/31 20:09:12 bwelling Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -63,7 +63,7 @@ usage(void) {
|
||||
printf(" -b key size, in bits:\n");
|
||||
printf(" RSA:\t\t[512..%d]\n", MAX_RSA);
|
||||
printf(" DH:\t\t[128..4096]\n");
|
||||
printf(" DSA:\t\t[512..1024] and dividable by 64\n");
|
||||
printf(" DSA:\t\t[512..1024] and divisible by 64\n");
|
||||
printf(" HMAC-MD5:\t[1..512]\n");
|
||||
printf(" -n nametype: ZONE | HOST | ENTITY | USER\n");
|
||||
printf(" name: owner of the key\n");
|
||||
@@ -79,6 +79,8 @@ usage(void) {
|
||||
"(default: 0)\n");
|
||||
printf(" -r randomdev (a file containing random data)\n");
|
||||
printf(" -v verbose level\n");
|
||||
printf("Output:\n");
|
||||
printf(" K<name>+<alg>+<id>.key, K<name>+<alg>+<id>.private\n");
|
||||
|
||||
exit (-1);
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssec-makekeyset.c,v 1.42 2000/10/20 02:21:34 marka Exp $ */
|
||||
/* $Id: dnssec-makekeyset.c,v 1.43 2000/10/31 20:09:13 bwelling Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -89,6 +89,11 @@ usage(void) {
|
||||
|
||||
fprintf(stderr, "keys:\n");
|
||||
fprintf(stderr, "\tkeyfile (Kname+alg+tag)\n");
|
||||
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
fprintf(stderr, "Output:\n");
|
||||
fprintf(stderr, "\tkeyset (keyset-<name>)\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -369,6 +374,8 @@ main(int argc, char *argv[]) {
|
||||
domainstr, output);
|
||||
}
|
||||
|
||||
printf("%s\n", output);
|
||||
|
||||
dns_db_detach(&db);
|
||||
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
|
@@ -17,7 +17,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssec-signkey.c,v 1.41 2000/10/31 03:21:40 marka Exp $ */
|
||||
/* $Id: dnssec-signkey.c,v 1.42 2000/10/31 20:09:14 bwelling Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -88,9 +88,13 @@ usage(void) {
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
fprintf(stderr, "keyset:\n");
|
||||
fprintf(stderr, "\tfile name of key set to be signed\n");
|
||||
fprintf(stderr, "\tfile with keyset to be signed (keyset-<name>)\n");
|
||||
fprintf(stderr, "keys:\n");
|
||||
fprintf(stderr, "\tkeyfile (Kname+alg+tag)\n");
|
||||
|
||||
fprintf(stderr, "\n");
|
||||
fprintf(stderr, "Output:\n");
|
||||
fprintf(stderr, "\tsigned keyset (signedkey-<name>)\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -402,6 +406,8 @@ main(int argc, char *argv[]) {
|
||||
fatal("failed to write database to '%s': %s",
|
||||
output, isc_result_totext(result));
|
||||
|
||||
printf("%s\n", output);
|
||||
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
dns_rdataset_disassociate(&newsigrdataset);
|
||||
|
||||
|
@@ -17,7 +17,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dnssec-signzone.c,v 1.111 2000/10/31 03:21:41 marka Exp $ */
|
||||
/* $Id: dnssec-signzone.c,v 1.112 2000/10/31 20:09:15 bwelling Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -81,6 +81,7 @@ static FILE *fp;
|
||||
static const dns_master_style_t *masterstyle = &dns_master_style_explicitttl;
|
||||
static unsigned int nsigned = 0, nretained = 0, ndropped = 0;
|
||||
static unsigned int nverified = 0, nverifyfailed = 0;
|
||||
static const char *directory;
|
||||
|
||||
static inline void
|
||||
set_bit(unsigned char *array, unsigned int index, unsigned int bit) {
|
||||
@@ -471,6 +472,11 @@ opendb(const char *prefix, dns_name_t *name, dns_rdataclass_t rdclass,
|
||||
isc_result_t result;
|
||||
|
||||
isc_buffer_init(&b, filename, sizeof(filename));
|
||||
if (directory != NULL) {
|
||||
isc_buffer_putstr(&b, directory);
|
||||
if (directory[strlen(directory) - 1] != '/')
|
||||
isc_buffer_putstr(&b, "/");
|
||||
}
|
||||
isc_buffer_putstr(&b, prefix);
|
||||
result = dns_name_totext(name, ISC_FALSE, &b);
|
||||
check_result(result, "dns_name_totext()");
|
||||
@@ -1256,6 +1262,8 @@ usage(void) {
|
||||
|
||||
fprintf(stderr, "Options: (default value in parenthesis) \n");
|
||||
fprintf(stderr, "\t-c class (IN)\n");
|
||||
fprintf(stderr, "\t-d directory\n");
|
||||
fprintf(stderr, "\t\tdirectory to find signedkey files (.)\n");
|
||||
fprintf(stderr, "\t-s YYYYMMDDHHMMSS|+offset:\n");
|
||||
fprintf(stderr, "\t\tSIG start time - absolute|offset (now)\n");
|
||||
fprintf(stderr, "\t-e YYYYMMDDHHMMSS|+offset|\"now\"+offset]:\n");
|
||||
@@ -1312,7 +1320,8 @@ main(int argc, char *argv[]) {
|
||||
|
||||
dns_result_register();
|
||||
|
||||
while ((ch = isc_commandline_parse(argc, argv, "c:s:e:i:v:o:f:ahpr:t"))
|
||||
while ((ch = isc_commandline_parse(argc, argv,
|
||||
"c:s:e:i:v:o:f:ahpr:td:"))
|
||||
!= -1) {
|
||||
switch (ch) {
|
||||
case 'c':
|
||||
@@ -1366,6 +1375,10 @@ main(int argc, char *argv[]) {
|
||||
printstats = ISC_TRUE;
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
directory = isc_commandline_argument;
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
default:
|
||||
usage();
|
||||
@@ -1502,6 +1515,8 @@ main(int argc, char *argv[]) {
|
||||
result = isc_stdio_close(fp);
|
||||
check_result(result, "isc_stdio_close");
|
||||
|
||||
printf("%s\n", output);
|
||||
|
||||
dns_db_closeversion(db, &version, ISC_FALSE);
|
||||
|
||||
dns_db_detach(&db);
|
||||
|
Reference in New Issue
Block a user