From: Willem Toorop Date: Fri, 20 Nov 2020 14:07:07 +0000 (+0100) Subject: Documentation X-Git-Tag: 1.8.0-rc.1~45^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b79babca696586c580626e1e25cd6ff6d076482;p=thirdparty%2Fldns.git Documentation --- diff --git a/examples/ldns-signzone.1 b/examples/ldns-signzone.1 index 9759a482..5f80b43f 100644 --- a/examples/ldns-signzone.1 +++ b/examples/ldns-signzone.1 @@ -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 diff --git a/examples/ldns-signzone.c b/examples/ldns-signzone.c index d383b9e4..d14526de 100644 --- a/examples/ldns-signzone.c +++ b/examples/ldns-signzone.c @@ -44,11 +44,10 @@ usage(FILE *fp, const char *prog) { fprintf(fp, " -o \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 \tAdd ZONEMD resource record\n"); - fprintf(fp, " \t" - " 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 should be \"simple\" (or 1)\n"); + fprintf(fp, "\t\t 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; }