Skip to content

Commit 1e05b07

Browse files
committed
Whitespace
1 parent 489bab5 commit 1e05b07

18 files changed

+715
-719
lines changed

codedocs/doxygen.conf

Lines changed: 494 additions & 494 deletions
Large diffs are not rendered by default.

pdns/backends/gsql/gsqlbackend.cc

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ bool GSQLBackend::getTSIGKey(const DNSName& name, DNSName* algorithm, string* co
888888
d_getTSIGKeyQuery_stmt->
889889
bind("key_name", name)->
890890
execute();
891-
891+
892892
SSqlStatement::row_t row;
893893

894894
content->clear();
@@ -955,7 +955,7 @@ bool GSQLBackend::getTSIGKeys(std::vector< struct TSIGKey > &keys)
955955
execute();
956956

957957
SSqlStatement::row_t row;
958-
958+
959959
while(d_getTSIGKeysQuery_stmt->hasNextRow()) {
960960
d_getTSIGKeysQuery_stmt->nextRow(row);
961961
ASSERT_ROW_COLUMNS("get-tsig-keys-query", row, 3);
@@ -990,7 +990,7 @@ bool GSQLBackend::getDomainKeys(const DNSName& name, std::vector<KeyData>& keys)
990990
d_ListDomainKeysQuery_stmt->
991991
bind("domain", name)->
992992
execute();
993-
993+
994994
SSqlStatement::row_t row;
995995
KeyData kd;
996996
while(d_ListDomainKeysQuery_stmt->hasNextRow()) {
@@ -1007,7 +1007,7 @@ bool GSQLBackend::getDomainKeys(const DNSName& name, std::vector<KeyData>& keys)
10071007
keys.push_back(kd);
10081008
}
10091009

1010-
d_ListDomainKeysQuery_stmt->reset();
1010+
d_ListDomainKeysQuery_stmt->reset();
10111011
}
10121012
catch (SSqlException &e) {
10131013
throw PDNSException("GSQLBackend unable to list keys: "+e.txtReason());
@@ -1035,7 +1035,7 @@ bool GSQLBackend::getAllDomainMetadata(const DNSName& name, std::map<std::string
10351035
execute();
10361036

10371037
SSqlStatement::row_t row;
1038-
1038+
10391039
while(d_GetAllDomainMetadataQuery_stmt->hasNextRow()) {
10401040
d_GetAllDomainMetadataQuery_stmt->nextRow(row);
10411041
ASSERT_ROW_COLUMNS("get-all-domain-metadata-query", row, 2);
@@ -1066,9 +1066,9 @@ bool GSQLBackend::getDomainMetadata(const DNSName& name, const std::string& kind
10661066
bind("domain", name)->
10671067
bind("kind", kind)->
10681068
execute();
1069-
1069+
10701070
SSqlStatement::row_t row;
1071-
1071+
10721072
while(d_GetDomainMetadataQuery_stmt->hasNextRow()) {
10731073
d_GetDomainMetadataQuery_stmt->nextRow(row);
10741074
ASSERT_ROW_COLUMNS("get-domain-metadata-query", row, 1);
@@ -1111,7 +1111,7 @@ bool GSQLBackend::setDomainMetadata(const DNSName& name, const std::string& kind
11111111
catch (SSqlException &e) {
11121112
throw PDNSException("GSQLBackend unable to set metadata kind '" + kind + "' for domain '" + name.toLogString() + "': "+e.txtReason());
11131113
}
1114-
1114+
11151115
return true;
11161116
}
11171117

@@ -1199,7 +1199,7 @@ bool GSQLBackend::listSubZone(const DNSName &zone, int domain_id) {
11991199
bind("zone", zone)->
12001200
bind("wildzone", wildzone)->
12011201
bind("domain_id", domain_id)->
1202-
execute();
1202+
execute();
12031203
}
12041204
catch(SSqlException &e) {
12051205
throw PDNSException("GSQLBackend unable to list SubZones for domain '" + zone.toLogString() + "': "+e.txtReason());
@@ -1251,7 +1251,7 @@ bool GSQLBackend::superMasterAdd(const AutoPrimary& primary)
12511251
try{
12521252
reconnectIfNeeded();
12531253

1254-
d_AddSuperMaster_stmt ->
1254+
d_AddSuperMaster_stmt ->
12551255
bind("ip",primary.ip)->
12561256
bind("nameserver",primary.nameserver)->
12571257
bind("account",primary.account)->
@@ -1260,7 +1260,7 @@ bool GSQLBackend::superMasterAdd(const AutoPrimary& primary)
12601260

12611261
}
12621262
catch (SSqlException &e){
1263-
throw PDNSException("GSQLBackend unable to insert an autoprimary with IP " + primary.ip + " and nameserver name '" + primary.nameserver + "' and account '" + primary.account + "': " + e.txtReason());
1263+
throw PDNSException("GSQLBackend unable to insert an autoprimary with IP " + primary.ip + " and nameserver name '" + primary.nameserver + "' and account '" + primary.account + "': " + e.txtReason());
12641264
}
12651265
return true;
12661266

@@ -1470,7 +1470,7 @@ void GSQLBackend::getAllDomains(vector<DomainInfo>* domains, bool getSerial, boo
14701470
g_log<<Logger::Warning<<"Could not parse domain kind '"<<row[3]<<"' as one of 'MASTER', 'SLAVE' or 'NATIVE'. Setting zone kind to 'NATIVE'"<<endl;
14711471
di.kind = DomainInfo::Native;
14721472
}
1473-
1473+
14741474
if (!row[4].empty()) {
14751475
vector<string> masters;
14761476
stringtok(masters, row[4], " ,\t");
@@ -1568,7 +1568,7 @@ bool GSQLBackend::replaceRRSet(uint32_t domain_id, const DNSName& qname, const Q
15681568
for(const auto& rr: rrset) {
15691569
feedRecord(rr, DNSName());
15701570
}
1571-
1571+
15721572
return true;
15731573
}
15741574

@@ -1614,7 +1614,7 @@ bool GSQLBackend::feedRecord(const DNSResourceRecord &r, const DNSName &ordernam
16141614
catch (SSqlException &e) {
16151615
throw PDNSException("GSQLBackend unable to feed record " + r.qname.toLogString() + "|" + r.qtype.toString() + ": "+e.txtReason());
16161616
}
1617-
return true; // XXX FIXME this API should not return 'true' I think -ahu
1617+
return true; // XXX FIXME this API should not return 'true' I think -ahu
16181618
}
16191619

16201620
bool GSQLBackend::feedEnts(int domain_id, map<DNSName,bool>& nonterm)
@@ -1983,6 +1983,6 @@ void GSQLBackend::extractComment(SSqlStatement::row_t& row, Comment& comment)
19831983
comment.content = std::move(row[5]);
19841984
}
19851985

1986-
SSqlStatement::~SSqlStatement() {
1987-
// make sure vtable won't break
1986+
SSqlStatement::~SSqlStatement() {
1987+
// make sure vtable won't break
19881988
}

pdns/dnsparser.hh

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
We can add: 2 -> 1 easily by reversing the packetwriter
5050
And we might be able to reverse 2 -> 3 as well
5151
*/
52-
52+
5353
#include "namespaces.hh"
5454

5555
class MOADNSException : public runtime_error
@@ -78,7 +78,7 @@ public:
7878
uint32_t get32BitInt();
7979
uint16_t get16BitInt();
8080
uint8_t get8BitInt();
81-
81+
8282
void xfrNodeOrLocatorID(NodeOrLocatorID& val);
8383
void xfr48BitInt(uint64_t& val);
8484

@@ -211,7 +211,7 @@ public:
211211

212212
pw.startRecord(qname, this->getType());
213213
this->toPacket(pw);
214-
214+
215215
string record;
216216
pw.getRecordPayload(record); // needs to be called before commit()
217217
return record;
@@ -221,7 +221,7 @@ public:
221221
{
222222
return typeid(*this)==typeid(rhs) && this->getZoneRepresentation() == rhs.getZoneRepresentation();
223223
}
224-
224+
225225
static shared_ptr<DNSRecordContent> deserialize(const DNSName& qname, uint16_t qtype, const string& serialized);
226226

227227
void doRecordCheck(const struct DNSRecord&){}
@@ -240,7 +240,7 @@ public:
240240
getN2Typemap().emplace(name, pair(cl, ty));
241241
}
242242

243-
static void unregist(uint16_t cl, uint16_t ty)
243+
static void unregist(uint16_t cl, uint16_t ty)
244244
{
245245
auto key = pair(cl, ty);
246246
getTypemap().erase(key);
@@ -267,7 +267,7 @@ public:
267267
static const string NumberToType(uint16_t num, uint16_t classnum=1)
268268
{
269269
auto iter = getT2Namemap().find(pair(classnum, num));
270-
if(iter == getT2Namemap().end())
270+
if(iter == getT2Namemap().end())
271271
return "TYPE" + std::to_string(num);
272272
// throw runtime_error("Unknown DNS type with numerical id "+std::to_string(num));
273273
return iter->second;
@@ -303,24 +303,24 @@ struct DNSRecord
303303
{
304304
if(std::tie(d_name, d_type, d_class, d_ttl) < std::tie(rhs.d_name, rhs.d_type, rhs.d_class, rhs.d_ttl))
305305
return true;
306-
306+
307307
if(std::tie(d_name, d_type, d_class, d_ttl) != std::tie(rhs.d_name, rhs.d_type, rhs.d_class, rhs.d_ttl))
308308
return false;
309-
309+
310310
string lzrp, rzrp;
311311
if(d_content)
312312
lzrp=toLower(d_content->getZoneRepresentation());
313313
if(rhs.d_content)
314314
rzrp=toLower(rhs.d_content->getZoneRepresentation());
315-
315+
316316
return lzrp < rzrp;
317317
}
318318

319319
// this orders in canonical order and keeps the SOA record on top
320-
static bool prettyCompare(const DNSRecord& a, const DNSRecord& b)
320+
static bool prettyCompare(const DNSRecord& a, const DNSRecord& b)
321321
{
322-
auto aType = (a.d_type == QType::SOA) ? 0 : a.d_type;
323-
auto bType = (b.d_type == QType::SOA) ? 0 : b.d_type;
322+
auto aType = (a.d_type == QType::SOA) ? 0 : a.d_type;
323+
auto bType = (b.d_type == QType::SOA) ? 0 : b.d_type;
324324

325325
if(a.d_name.canonCompare(b.d_name))
326326
return true;
@@ -329,16 +329,16 @@ struct DNSRecord
329329

330330
if(std::tie(aType, a.d_class, a.d_ttl) < std::tie(bType, b.d_class, b.d_ttl))
331331
return true;
332-
332+
333333
if(std::tie(aType, a.d_class, a.d_ttl) != std::tie(bType, b.d_class, b.d_ttl))
334334
return false;
335-
335+
336336
string lzrp, rzrp;
337337
if(a.d_content)
338338
lzrp=toLower(a.d_content->getZoneRepresentation());
339339
if(b.d_content)
340340
rzrp=toLower(b.d_content->getZoneRepresentation());
341-
341+
342342
return lzrp < rzrp;
343343
}
344344

@@ -347,7 +347,7 @@ struct DNSRecord
347347
{
348348
if(d_type != rhs.d_type || d_class != rhs.d_class || d_name != rhs.d_name)
349349
return false;
350-
350+
351351
return *d_content == *rhs.d_content;
352352
}
353353
};
@@ -413,7 +413,7 @@ public:
413413
dnsheader d_header;
414414

415415
typedef vector<pair<DNSRecord, uint16_t > > answers_t;
416-
416+
417417
//! All answers contained in this packet (everything *but* the question section)
418418
answers_t d_answers;
419419

pdns/dnssecinfra.cc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include "iputils.hh"
3434

3535
#include <boost/algorithm/string.hpp>
36-
#include "dnssecinfra.hh"
36+
#include "dnssecinfra.hh"
3737
#include "dnsseckeeper.hh"
3838
#include <openssl/hmac.h>
3939
#include <openssl/sha.h>
@@ -55,7 +55,7 @@ std::unique_ptr<DNSCryptoKeyEngine> DNSCryptoKeyEngine::makeFromISCFile(DNSKEYRe
5555
if(!fp) {
5656
throw runtime_error("Unable to read file '"+string(fname)+"' for generating DNS Private Key");
5757
}
58-
58+
5959
while(stringfgets(fp.get(), sline)) {
6060
isc += sline;
6161
}
@@ -157,7 +157,7 @@ std::unique_ptr<DNSCryptoKeyEngine> DNSCryptoKeyEngine::makeFromISCString(DNSKEY
157157
if (stormap.count("pin") == 0) {
158158
stormap["pin"] = "";
159159
}
160-
dpk = PKCS11DNSCryptoKeyEngine::maker(algorithm);
160+
dpk = PKCS11DNSCryptoKeyEngine::maker(algorithm);
161161
#else
162162
throw PDNSException("Cannot load PKCS#11 key without support for it");
163163
#endif
@@ -174,7 +174,7 @@ std::string DNSCryptoKeyEngine::convertToISC() const
174174
ostringstream ret;
175175
ret<<"Private-key-format: v1.2\n";
176176
for(const storvector_t::value_type& value : storvector) {
177-
if(value.first != "Algorithm" && value.first != "PIN" &&
177+
if(value.first != "Algorithm" && value.first != "PIN" &&
178178
value.first != "Slot" && value.first != "Engine" &&
179179
value.first != "Label" && value.first != "PubLabel")
180180
ret<<value.first<<": "<<Base64Encode(value.second)<<"\n";
@@ -229,7 +229,7 @@ bool DNSCryptoKeyEngine::testAll()
229229

230230
for(maker_t* signer : value.second) {
231231
// multi_map<unsigned int, maker_t*> bestSigner, bestVerifier;
232-
232+
233233
for(maker_t* verifier : value.second) {
234234
try {
235235
testMakers(value.first, creator, signer, verifier);
@@ -336,13 +336,13 @@ void DNSCryptoKeyEngine::testMakers(unsigned int algo, maker_t* creator, maker_t
336336
}
337337

338338
string message("Hi! How is life?");
339-
339+
340340
string signature;
341341
dt.set();
342342
for(unsigned int n = 0; n < 100; ++n)
343343
signature = dckeSign->sign(message);
344344
unsigned int udiffSign= dt.udiff()/100, udiffVerify;
345-
345+
346346
dckeVerify->fromPublicKeyString(dckeSign->getPublicKeyString());
347347
if (dckeVerify->getPublicKeyString().compare(dckeSign->getPublicKeyString())) {
348348
throw runtime_error("Comparison of public key loaded into verifier produced by signer failed");
@@ -371,7 +371,7 @@ std::unique_ptr<DNSCryptoKeyEngine> DNSCryptoKeyEngine::makeFromPublicKeyString(
371371

372372
std::unique_ptr<DNSCryptoKeyEngine> DNSCryptoKeyEngine::makeFromPEMString(DNSKEYRecordContent& drc, const std::string& raw)
373373
{
374-
374+
375375
for (const makers_t::value_type& val : getMakers())
376376
{
377377
std::unique_ptr<DNSCryptoKeyEngine> ret=nullptr;
@@ -447,7 +447,7 @@ string getMessageForRRSET(const DNSName& qname, const RRSIGRecordContent& rrc, c
447447
toHash.append((char*)&tmp, 2);
448448
toHash.append(rdata);
449449
}
450-
450+
451451
return toHash;
452452
}
453453

@@ -489,9 +489,9 @@ bool DNSCryptoKeyEngine::isDigestSupported(uint8_t digest)
489489
DSRecordContent makeDSFromDNSKey(const DNSName& qname, const DNSKEYRecordContent& drc, uint8_t digest)
490490
{
491491
string toHash;
492-
toHash.assign(qname.toDNSStringLC());
492+
toHash.assign(qname.toDNSStringLC());
493493
toHash.append(const_cast<DNSKEYRecordContent&>(drc).serialize(DNSName(), true, true));
494-
494+
495495
DSRecordContent dsrc;
496496
try {
497497
unsigned int algo = digestToAlgorithmNumber(digest);
@@ -501,7 +501,7 @@ DSRecordContent makeDSFromDNSKey(const DNSName& qname, const DNSKEYRecordContent
501501
catch(const std::exception& e) {
502502
throw std::runtime_error("Asked to create (C)DS record of unknown digest type " + std::to_string(digest));
503503
}
504-
504+
505505
dsrc.d_algorithm = drc.d_algorithm;
506506
dsrc.d_digesttype = digest;
507507
dsrc.d_tag = const_cast<DNSKEYRecordContent&>(drc).getTag();
@@ -662,8 +662,8 @@ static string makeTSIGPayload(const string& previous, const char* packetBegin, s
662662
dw.xfr32BitInt(0); // TTL
663663
dw.xfrName(trc.d_algoName.makeLowerCase(), false);
664664
}
665-
666-
uint32_t now = trc.d_time;
665+
666+
uint32_t now = trc.d_time;
667667
dw.xfr48BitInt(now);
668668
dw.xfr16BitInt(trc.d_fudge); // fudge
669669
if(!timersonly) {
@@ -682,7 +682,7 @@ static string makeTSIGMessageFromTSIGPacket(const string& opacket, unsigned int
682682

683683
packet.resize(tsigOffset); // remove the TSIG record at the end as per RFC2845 3.4.1
684684
packet[(dnsHeaderOffset + sizeof(struct dnsheader))-1]--; // Decrease ARCOUNT because we removed the TSIG RR in the previous line.
685-
685+
686686

687687
// Replace the message ID with the original message ID from the TSIG record.
688688
// This is needed for forwarded DNS Update as they get a new ID when forwarding (section 6.1 of RFC2136). The TSIG record stores the original ID and the

0 commit comments

Comments
 (0)