From: Bert Hubert Date: Thu, 6 Jan 2011 21:14:41 +0000 (+0000) Subject: make importing keys a bit more resilient against whitespace, plus fix up setting... X-Git-Tag: auth-3.0~423 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c34fc2df29794bbbde82f22dda1b762e5c26b0a7;p=pdns make importing keys a bit more resilient against whitespace, plus fix up setting the flag on import git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1824 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/dnssecinfra.cc b/pdns/dnssecinfra.cc index 33e0acf55..eec44bfa0 100644 --- a/pdns/dnssecinfra.cc +++ b/pdns/dnssecinfra.cc @@ -90,7 +90,9 @@ DNSKEYRecordContent getRSAKeyFromISC(rsa_context* rsa, const char* fname) while(stringfgets(fp, sline)) { tie(key,value)=splitField(sline, ':'); trim(value); - + trim(key); + if(key.empty()) + continue; if(places.count(key)) { if(places[key]) { @@ -110,7 +112,7 @@ DNSKEYRecordContent getRSAKeyFromISC(rsa_context* rsa, const char* fname) } else { if(key != "Private-key-format" && key != "Algorithm") - cerr<<"Unknown field '"<len = ( mpi_msb( &rsa->N ) + 7 ) >> 3; // no clue what this does diff --git a/pdns/pdnssec.cc b/pdns/pdnssec.cc index 7069fd531..a24e928e0 100644 --- a/pdns/pdnssec.cc +++ b/pdns/pdnssec.cc @@ -351,7 +351,7 @@ try cout << dpk.d_key.convertToISC(dpk.d_algorithm) <