From: Remi Gacogne Date: Tue, 30 Mar 2021 15:57:11 +0000 (+0200) Subject: auth: Implement pdnsutil hash-password X-Git-Tag: dnsdist-1.7.0-alpha1~12^2~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22a0944305aba419ad16536d3b2359f8a61b7c24;p=thirdparty%2Fpdns.git auth: Implement pdnsutil hash-password --- diff --git a/docs/manpages/pdnsutil.1.rst b/docs/manpages/pdnsutil.1.rst index 9649979042..2e141cd8d1 100644 --- a/docs/manpages/pdnsutil.1.rst +++ b/docs/manpages/pdnsutil.1.rst @@ -189,6 +189,10 @@ edit-zone *ZONE* **EDITOR** is empty, *pdnsutil* falls back to using *editor*. get-meta *ZONE* [*ATTRIBUTE*]... Get zone metadata. If no *ATTRIBUTE* given, lists all known. +hash-password *PASSWORD* + This convenience command returns a hashed and salted version of the + password passed in parameter, for use as a webserver password or + api key. hash-zone-record *ZONE* *RNAME* This convenience command hashes the name *RNAME* according to the NSEC3 settings of *ZONE*. Refuses to hash for zones with no NSEC3 diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index de5503f37d..4c73ff07e6 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -5,6 +5,7 @@ #include +#include "credentials.hh" #include "dnsseckeeper.hh" #include "dnssecinfra.hh" #include "statbag.hh" @@ -2331,6 +2332,7 @@ try cout<<"generate-zone-key {zsk|ksk} [ALGORITHM] [BITS]"<