From: Peter van Dijk Date: Tue, 22 Dec 2015 10:26:13 +0000 (+0100) Subject: refactor X-Git-Tag: dnsdist-1.0.0-alpha1~22^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36a885a9ab34c124e20f3e2f4c9647aa617204b8;p=thirdparty%2Fpdns.git refactor --- diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 7b46c5d9ad..f32c03fe12 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -1228,15 +1228,24 @@ bool secureZone(DNSSECKeeper& dk, const DNSName& zone) else cout << "Securing zone with " << k_algos[0] << " algorithm with default key size" << endl; - // run secure-zone with first default algorith, then add keys - if(!dk.addKey(zone, true, shorthand2algorithm(k_algos[0]), k_size)) { - cerr<<"No backend was able to secure '"<::iterator i = k_algos.begin(); i != k_algos.end(); i++) { + if(!dk.addKey(zone, true, shorthand2algorithm(k_algos[0]), k_size, true)) { + cerr<<"No backend was able to secure '"<::iterator i = k_algos.begin()+1; i != k_algos.end(); i++) - dk.addKey(zone, true, shorthand2algorithm(*i), k_size, true); // obvious errors will have been caught above - for(string z_algo : z_algos) { int algo = shorthand2algorithm(z_algo);