]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Documentation
authorWillem Toorop <willem@nlnetlabs.nl>
Fri, 20 Nov 2020 14:07:07 +0000 (15:07 +0100)
committerWillem Toorop <willem@nlnetlabs.nl>
Fri, 20 Nov 2020 14:07:07 +0000 (15:07 +0100)
examples/ldns-signzone.1
examples/ldns-signzone.c

index 9759a482e3a08b2c8fa663e1474e51502d02940f..5f80b43f8a89ab7ece057b679fc9f8ff1ed931bc 100644 (file)
@@ -65,10 +65,20 @@ YYYYMMDD[hhmmss], or a timestamp.
 \fB-o\fR \fIorigin\fR
 Use this as the origin of the zone
 
+.TP
+\fB-u\fR
+set SOA serial to the number of seconds since 1-1-1970
+
 .TP
 \fB-v\fR
 Print the version and exit
 
+.TP
+\fB-z\fR \fI[scheme:]hash\fR
+Calculate the zone's digest and add those as ZONEMD RRs. The (optional)
+`scheme' must be `simple` (or 1) and `hash' should be `sha384' (or 1) or
+`sha512' (or 2).  This option can be given more than once.
+
 .TP
 \fB-A\fR
 Sign the DNSKEY record with all keys.  By default it is signed with a
index d383b9e4e27f5b34f1bd1ffa73ff13e10a246c8e..d14526de14de4e7f2c877f693b8b1d0fd75a9304 100644 (file)
@@ -44,11 +44,10 @@ usage(FILE *fp, const char *prog) {
        fprintf(fp, "  -o <domain>\torigin for the zone\n");
        fprintf(fp, "  -u\t\tset SOA serial to the number of seconds since 1-1-1970\n");
        fprintf(fp, "  -v\t\tprint version and exit\n");
-       fprintf(fp, "  -z <algorithm>\tAdd ZONEMD resource record\n");
-       fprintf(fp, "                \t"
-                   "<algorithm> can be 1 for SHA384 or 2 for SHA512\n");
-       fprintf(fp, "                \t"
-                   "this option can be given more than once\n");
+       fprintf(fp, "  -z <[scheme:]hash>\tAdd ZONEMD resource record\n");
+       fprintf(fp, "\t\t<scheme> should be \"simple\" (or 1)\n");
+       fprintf(fp, "\t\t<hash> should be \"sha384\" or \"sha512\" (or 1 or 2)\n");
+       fprintf(fp, "\t\tthis option can be given more than once\n");
        fprintf(fp, "  -A\t\tsign DNSKEY with all keys instead of minimal\n");
        fprintf(fp, "  -U\t\tSign with every unique algorithm in the provided keys\n");
 #ifndef OPENSSL_NO_ENGINE
@@ -595,7 +594,7 @@ int str2zonemd_signflag(const char *str, const char **reason)
        if (!strcasecmp(str, "2") || !strcasecmp(str, "sha512"))
                return LDNS_SIGN_WITH_ZONEMD_SIMPLE_SHA512;
 
-       if (reason) *reason = reason[2];
+       if (reason) *reason = reasons[2];
        return 0;
 }