• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PowerDNS / pdns / 17948634627

22 Sep 2025 02:18PM UTC coverage: 61.57% (-1.6%) from 63.132%
17948634627

push

github

web-flow
Merge pull request #16158 from miodvallat/backport-16109-to-auth-4.9.x

auth 4.9.x: backport "memory corruption in ODBC" and "odbc tweaks to appease coverity"

12343 of 26772 branches covered (46.1%)

Branch coverage included in aggregate %.

10 of 16 new or added lines in 1 file covered. (62.5%)

1114 existing lines in 26 files now uncovered.

39860 of 58014 relevant lines covered (68.71%)

5531399.47 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

40.63
/modules/bindbackend/binddnssec.cc
1
/*
2
 * This file is part of PowerDNS or dnsdist.
3
 * Copyright -- PowerDNS.COM B.V. and its contributors
4
 *
5
 * This program is free software; you can redistribute it and/or modify
6
 * it under the terms of version 2 of the GNU General Public License as
7
 * published by the Free Software Foundation.
8
 *
9
 * In addition, for the avoidance of any doubt, permission is granted to
10
 * link this program with OpenSSL and to (re)distribute the binaries
11
 * produced as the result of such linking.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with this program; if not, write to the Free Software
20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21
 */
22

23
#ifdef HAVE_CONFIG_H
24
#include "config.h"
25
#endif
26
#include "bindbackend2.hh"
27
#include "pdns/arguments.hh"
28
#include "pdns/dnsrecords.hh"
29

30
#ifndef HAVE_SQLITE3
31

32
void Bind2Backend::setupDNSSEC()
33
{
34
  if (!getArg("dnssec-db").empty()) {
35
    throw runtime_error("bind-dnssec-db requires building PowerDNS with SQLite3");
36
  }
37
}
38

39
bool Bind2Backend::doesDNSSEC()
40
{
41
  return d_hybrid;
42
}
43

44
bool Bind2Backend::getNSEC3PARAM(const DNSName& /* name */, NSEC3PARAMRecordContent* /* ns3p */)
45
{
46
  return false;
47
}
48

49
bool Bind2Backend::getNSEC3PARAMuncached(const DNSName& /* name */, NSEC3PARAMRecordContent* /* ns3p */)
50
{
51
  return false;
52
}
53

54
bool Bind2Backend::getAllDomainMetadata(const DNSName& /* name */, std::map<std::string, std::vector<std::string>>& /* meta */)
55
{
56
  return false;
57
}
58

59
bool Bind2Backend::getDomainMetadata(const DNSName& /* name */, const std::string& /* kind */, std::vector<std::string>& /* meta */)
60
{
61
  return false;
62
}
63

64
bool Bind2Backend::setDomainMetadata(const DNSName& /* name */, const std::string& /* kind */, const std::vector<std::string>& /* meta */)
65
{
66
  return false;
67
}
68

69
bool Bind2Backend::getDomainKeys(const DNSName& /* name */, std::vector<KeyData>& /* keys */)
70
{
71
  return false;
72
}
73

74
bool Bind2Backend::removeDomainKey(const DNSName& /* name */, unsigned int /* id */)
75
{
76
  return false;
77
}
78

79
bool Bind2Backend::addDomainKey(const DNSName& /* name */, const KeyData& /* key */, int64_t& /* id */)
80
{
81
  return false;
82
}
83

84
bool Bind2Backend::activateDomainKey(const DNSName& /* name */, unsigned int /* id */)
85
{
86
  return false;
87
}
88

89
bool Bind2Backend::deactivateDomainKey(const DNSName& /* name */, unsigned int /* id */)
90
{
91
  return false;
92
}
93

94
bool Bind2Backend::publishDomainKey(const DNSName& /* name */, unsigned int /* id */)
95
{
96
  return false;
97
}
98

99
bool Bind2Backend::unpublishDomainKey(const DNSName& /* name */, unsigned int /* id */)
100
{
101
  return false;
102
}
103

104
bool Bind2Backend::getTSIGKey(const DNSName& /* name */, DNSName& /* algorithm */, string& /* content */)
105
{
106
  return false;
107
}
108

109
bool Bind2Backend::setTSIGKey(const DNSName& /* name */, const DNSName& /* algorithm */, const string& /* content */)
110
{
111
  return false;
112
}
113

114
bool Bind2Backend::deleteTSIGKey(const DNSName& /* name */)
115
{
116
  return false;
117
}
118

119
bool Bind2Backend::getTSIGKeys(std::vector<struct TSIGKey>& /* keys */)
120
{
121
  return false;
122
}
123

124
void Bind2Backend::setupStatements()
125
{
126
}
127

128
void Bind2Backend::freeStatements()
129
{
130
}
131

132
#else
133

134
#include "pdns/logger.hh"
135
#include "pdns/ssqlite3.hh"
136

137
#define ASSERT_ROW_COLUMNS(query, row, num)                                                                                                \
138
  {                                                                                                                                        \
13✔
139
    if (row.size() != num) {                                                                                                               \
13✔
140
      throw PDNSException(std::string(query) + " returned wrong number of columns, expected " #num ", got " + std::to_string(row.size())); \
×
141
    }                                                                                                                                      \
×
142
  }
13✔
143

144
void Bind2Backend::setupDNSSEC()
145
{
1,390✔
146
  if (getArg("dnssec-db").empty() || d_hybrid)
1,390!
147
    return;
1,338✔
148
  try {
52✔
149
    d_dnssecdb = std::make_shared<SSQLite3>(getArg("dnssec-db"), getArg("dnssec-db-journal-mode"));
52✔
150
    setupStatements();
52✔
151
  }
52✔
152
  catch (SSqlException& se) {
52✔
153
    // this error is meant to kill the server dead - it makes no sense to continue..
154
    throw runtime_error("Error opening DNSSEC database in BIND backend: " + se.txtReason());
×
155
  }
×
156

157
  d_dnssecdb->setLog(::arg().mustDo("query-logging"));
52✔
158
}
52✔
159

160
void Bind2Backend::setupStatements()
161
{
52✔
162
  d_getAllDomainMetadataQuery_stmt = d_dnssecdb->prepare("select kind, content from domainmetadata where domain=:domain", 1);
52✔
163
  d_getDomainMetadataQuery_stmt = d_dnssecdb->prepare("select content from domainmetadata where domain=:domain and kind=:kind", 2);
52✔
164
  d_deleteDomainMetadataQuery_stmt = d_dnssecdb->prepare("delete from domainmetadata where domain=:domain and kind=:kind", 2);
52✔
165
  d_insertDomainMetadataQuery_stmt = d_dnssecdb->prepare("insert into domainmetadata (domain, kind, content) values (:domain,:kind,:content)", 3);
52✔
166
  d_getDomainKeysQuery_stmt = d_dnssecdb->prepare("select id,flags, active, published, content from cryptokeys where domain=:domain", 1);
52✔
167
  d_deleteDomainKeyQuery_stmt = d_dnssecdb->prepare("delete from cryptokeys where domain=:domain and id=:key_id", 2);
52✔
168
  d_insertDomainKeyQuery_stmt = d_dnssecdb->prepare("insert into cryptokeys (domain, flags, active, published, content) values (:domain, :flags, :active, :published, :content)", 5);
52✔
169
  d_GetLastInsertedKeyIdQuery_stmt = d_dnssecdb->prepare("select last_insert_rowid()", 0);
52✔
170
  d_activateDomainKeyQuery_stmt = d_dnssecdb->prepare("update cryptokeys set active=1 where domain=:domain and id=:key_id", 2);
52✔
171
  d_deactivateDomainKeyQuery_stmt = d_dnssecdb->prepare("update cryptokeys set active=0 where domain=:domain and id=:key_id", 2);
52✔
172
  d_publishDomainKeyQuery_stmt = d_dnssecdb->prepare("update cryptokeys set published=1 where domain=:domain and id=:key_id", 2);
52✔
173
  d_unpublishDomainKeyQuery_stmt = d_dnssecdb->prepare("update cryptokeys set published=0 where domain=:domain and id=:key_id", 2);
52✔
174
  d_getTSIGKeyQuery_stmt = d_dnssecdb->prepare("select algorithm, secret from tsigkeys where name=:key_name", 1);
52✔
175
  d_setTSIGKeyQuery_stmt = d_dnssecdb->prepare("replace into tsigkeys (name,algorithm,secret) values(:key_name, :algorithm, :content)", 3);
52✔
176
  d_deleteTSIGKeyQuery_stmt = d_dnssecdb->prepare("delete from tsigkeys where name=:key_name", 1);
52✔
177
  d_getTSIGKeysQuery_stmt = d_dnssecdb->prepare("select name,algorithm,secret from tsigkeys", 0);
52✔
178
}
52✔
179

180
void Bind2Backend::freeStatements()
181
{
1,358✔
182
  d_getAllDomainMetadataQuery_stmt.reset();
1,358✔
183
  d_getDomainMetadataQuery_stmt.reset();
1,358✔
184
  d_deleteDomainMetadataQuery_stmt.reset();
1,358✔
185
  d_insertDomainMetadataQuery_stmt.reset();
1,358✔
186
  d_getDomainKeysQuery_stmt.reset();
1,358✔
187
  d_deleteDomainKeyQuery_stmt.reset();
1,358✔
188
  d_insertDomainKeyQuery_stmt.reset();
1,358✔
189
  d_GetLastInsertedKeyIdQuery_stmt.reset();
1,358✔
190
  d_activateDomainKeyQuery_stmt.reset();
1,358✔
191
  d_deactivateDomainKeyQuery_stmt.reset();
1,358✔
192
  d_publishDomainKeyQuery_stmt.reset();
1,358✔
193
  d_unpublishDomainKeyQuery_stmt.reset();
1,358✔
194
  d_getTSIGKeyQuery_stmt.reset();
1,358✔
195
  d_setTSIGKeyQuery_stmt.reset();
1,358✔
196
  d_deleteTSIGKeyQuery_stmt.reset();
1,358✔
197
  d_getTSIGKeysQuery_stmt.reset();
1,358✔
198
}
1,358✔
199

200
bool Bind2Backend::doesDNSSEC()
UNCOV
201
{
×
UNCOV
202
  return d_dnssecdb || d_hybrid;
×
UNCOV
203
}
×
204

205
bool Bind2Backend::getNSEC3PARAM(const DNSName& name, NSEC3PARAMRecordContent* ns3p)
206
{
×
207
  BB2DomainInfo bbd;
×
208
  if (!safeGetBBDomainInfo(name, &bbd))
×
209
    return false;
×
210

211
  if (ns3p != nullptr) {
×
212
    *ns3p = bbd.d_nsec3param;
×
213
  }
×
214

215
  return bbd.d_nsec3zone;
×
216
}
×
217

218
bool Bind2Backend::getNSEC3PARAMuncached(const DNSName& name, NSEC3PARAMRecordContent* ns3p)
219
{
9✔
220
  if (!d_dnssecdb || d_hybrid)
9!
221
    return false;
4✔
222

223
  string value;
5✔
224
  vector<string> meta;
5✔
225
  getDomainMetadata(name, "NSEC3PARAM", meta);
5✔
226
  if (!meta.empty())
5!
UNCOV
227
    value = *meta.begin();
×
228
  else
5✔
229
    return false; // No NSEC3 zone
5✔
230

UNCOV
231
  static int maxNSEC3Iterations = ::arg().asNum("max-nsec3-iterations");
×
UNCOV
232
  if (ns3p) {
×
UNCOV
233
    auto tmp = std::dynamic_pointer_cast<NSEC3PARAMRecordContent>(DNSRecordContent::make(QType::NSEC3PARAM, 1, value));
×
UNCOV
234
    *ns3p = *tmp;
×
235

UNCOV
236
    if (ns3p->d_iterations > maxNSEC3Iterations) {
×
237
      ns3p->d_iterations = maxNSEC3Iterations;
×
238
      g_log << Logger::Error << "Number of NSEC3 iterations for zone '" << name << "' is above 'max-nsec3-iterations'. Value adjusted to: " << maxNSEC3Iterations << endl;
×
239
    }
×
240

UNCOV
241
    if (ns3p->d_algorithm != 1) {
×
242
      g_log << Logger::Error << "Invalid hash algorithm for NSEC3: '" << std::to_string(ns3p->d_algorithm) << "', setting to 1 for zone '" << name << "'." << endl;
×
243
      ns3p->d_algorithm = 1;
×
244
    }
×
UNCOV
245
  }
×
246

UNCOV
247
  return true;
×
248
}
5✔
249

250
bool Bind2Backend::getAllDomainMetadata(const DNSName& name, std::map<std::string, std::vector<std::string>>& meta)
251
{
82✔
252
  if (!d_dnssecdb || d_hybrid)
82!
253
    return false;
4✔
254

255
  try {
78✔
256
    d_getAllDomainMetadataQuery_stmt->bind("domain", name)->execute();
78✔
257

258
    SSqlStatement::row_t row;
78✔
259
    while (d_getAllDomainMetadataQuery_stmt->hasNextRow()) {
124✔
260
      d_getAllDomainMetadataQuery_stmt->nextRow(row);
46✔
261
      meta[row[0]].push_back(row[1]);
46✔
262
    }
46✔
263

264
    d_getAllDomainMetadataQuery_stmt->reset();
78✔
265
  }
78✔
266
  catch (SSqlException& se) {
78✔
267
    throw PDNSException("Error accessing DNSSEC database in BIND backend, getAllDomainMetadata(): " + se.txtReason());
×
268
  }
×
269
  return true;
78✔
270
}
78✔
271

272
bool Bind2Backend::getDomainMetadata(const DNSName& name, const std::string& kind, std::vector<std::string>& meta)
273
{
8✔
274
  if (!d_dnssecdb || d_hybrid)
8!
275
    return false;
3✔
276

277
  try {
5✔
278
    d_getDomainMetadataQuery_stmt->bind("domain", name)->bind("kind", kind)->execute();
5✔
279

280
    SSqlStatement::row_t row;
5✔
281
    while (d_getDomainMetadataQuery_stmt->hasNextRow()) {
5!
UNCOV
282
      d_getDomainMetadataQuery_stmt->nextRow(row);
×
UNCOV
283
      meta.push_back(row[0]);
×
UNCOV
284
    }
×
285

286
    d_getDomainMetadataQuery_stmt->reset();
5✔
287
  }
5✔
288
  catch (SSqlException& se) {
5✔
289
    throw PDNSException("Error accessing DNSSEC database in BIND backend, getDomainMetadata(): " + se.txtReason());
×
290
  }
×
291
  return true;
5✔
292
}
5✔
293

294
bool Bind2Backend::setDomainMetadata(const DNSName& name, const std::string& kind, const std::vector<std::string>& meta)
295
{
5✔
296
  if (!d_dnssecdb || d_hybrid)
5!
297
    return false;
×
298

299
  try {
5✔
300
    d_deleteDomainMetadataQuery_stmt->bind("domain", name)->bind("kind", kind)->execute()->reset();
5✔
301
    if (!meta.empty()) {
5✔
302
      for (const auto& value : meta) {
4✔
303
        d_insertDomainMetadataQuery_stmt->bind("domain", name)->bind("kind", kind)->bind("content", value)->execute()->reset();
4✔
304
      }
4✔
305
    }
4✔
306
  }
5✔
307
  catch (SSqlException& se) {
5✔
308
    throw PDNSException("Error accessing DNSSEC database in BIND backend, setDomainMetadata(): " + se.txtReason());
×
309
  }
×
310
  return true;
5✔
311
}
5✔
312

313
bool Bind2Backend::getDomainKeys(const DNSName& name, std::vector<KeyData>& keys)
314
{
5✔
315
  if (!d_dnssecdb || d_hybrid)
5!
UNCOV
316
    return false;
×
317

318
  try {
5✔
319
    d_getDomainKeysQuery_stmt->bind("domain", name)->execute();
5✔
320

321
    KeyData kd;
5✔
322
    SSqlStatement::row_t row;
5✔
323
    while (d_getDomainKeysQuery_stmt->hasNextRow()) {
15✔
324
      d_getDomainKeysQuery_stmt->nextRow(row);
10✔
325
      pdns::checked_stoi_into(kd.id, row[0]);
10✔
326
      pdns::checked_stoi_into(kd.flags, row[1]);
10✔
327
      kd.active = (row[2] == "1");
10✔
328
      kd.published = (row[3] == "1");
10✔
329
      kd.content = row[4];
10✔
330
      keys.push_back(kd);
10✔
331
    }
10✔
332

333
    d_getDomainKeysQuery_stmt->reset();
5✔
334
  }
5✔
335
  catch (SSqlException& se) {
5✔
336
    throw PDNSException("Error accessing DNSSEC database in BIND backend, getDomainKeys(): " + se.txtReason());
×
337
  }
×
338
  return true;
5✔
339
}
5✔
340

341
bool Bind2Backend::removeDomainKey(const DNSName& name, unsigned int id)
342
{
×
343
  if (!d_dnssecdb || d_hybrid)
×
344
    return false;
×
345

346
  try {
×
347
    d_deleteDomainKeyQuery_stmt->bind("domain", name)->bind("key_id", id)->execute()->reset();
×
348
  }
×
349
  catch (SSqlException& se) {
×
350
    throw PDNSException("Error accessing DNSSEC database in BIND backend, removeDomainKeys(): " + se.txtReason());
×
351
  }
×
352
  return true;
×
353
}
×
354

355
bool Bind2Backend::addDomainKey(const DNSName& name, const KeyData& key, int64_t& id)
356
{
13✔
357
  if (!d_dnssecdb || d_hybrid)
13!
358
    return false;
×
359

360
  try {
13✔
361
    d_insertDomainKeyQuery_stmt->bind("domain", name)->bind("flags", key.flags)->bind("active", key.active)->bind("published", key.published)->bind("content", key.content)->execute()->reset();
13✔
362
  }
13✔
363
  catch (SSqlException& se) {
13✔
364
    throw PDNSException("Error accessing DNSSEC database in BIND backend, addDomainKey(): " + se.txtReason());
×
365
  }
×
366

367
  try {
13✔
368
    d_GetLastInsertedKeyIdQuery_stmt->execute();
13✔
369
    if (!d_GetLastInsertedKeyIdQuery_stmt->hasNextRow()) {
13!
370
      id = -2;
×
371
      return true;
×
372
    }
×
373
    SSqlStatement::row_t row;
13✔
374
    d_GetLastInsertedKeyIdQuery_stmt->nextRow(row);
13✔
375
    ASSERT_ROW_COLUMNS("get-last-inserted-key-id-query", row, 1);
13!
376
    id = std::stoi(row[0]);
13✔
377
    d_GetLastInsertedKeyIdQuery_stmt->reset();
13✔
378
    return true;
13✔
379
  }
13✔
380
  catch (SSqlException& e) {
13✔
381
    id = -2;
×
382
    return true;
×
383
  }
×
384
}
13✔
385

386
bool Bind2Backend::activateDomainKey(const DNSName& name, unsigned int id)
387
{
×
388
  if (!d_dnssecdb || d_hybrid)
×
389
    return false;
×
390

391
  try {
×
392
    d_activateDomainKeyQuery_stmt->bind("domain", name)->bind("key_id", id)->execute()->reset();
×
393
  }
×
394
  catch (SSqlException& se) {
×
395
    throw PDNSException("Error accessing DNSSEC database in BIND backend, activateDomainKey(): " + se.txtReason());
×
396
  }
×
397
  return true;
×
398
}
×
399

400
bool Bind2Backend::deactivateDomainKey(const DNSName& name, unsigned int id)
401
{
×
402
  if (!d_dnssecdb || d_hybrid)
×
403
    return false;
×
404

405
  try {
×
406
    d_deactivateDomainKeyQuery_stmt->bind("domain", name)->bind("key_id", id)->execute()->reset();
×
407
  }
×
408
  catch (SSqlException& se) {
×
409
    throw PDNSException("Error accessing DNSSEC database in BIND backend, deactivateDomainKey(): " + se.txtReason());
×
410
  }
×
411
  return true;
×
412
}
×
413

414
bool Bind2Backend::publishDomainKey(const DNSName& name, unsigned int id)
415
{
×
416
  if (!d_dnssecdb || d_hybrid)
×
417
    return false;
×
418

419
  try {
×
420
    d_publishDomainKeyQuery_stmt->bind("domain", name)->bind("key_id", id)->execute()->reset();
×
421
  }
×
422
  catch (SSqlException& se) {
×
423
    throw PDNSException("Error accessing DNSSEC database in BIND backend, publishDomainKey(): " + se.txtReason());
×
424
  }
×
425
  return true;
×
426
}
×
427

428
bool Bind2Backend::unpublishDomainKey(const DNSName& name, unsigned int id)
UNCOV
429
{
×
UNCOV
430
  if (!d_dnssecdb || d_hybrid)
×
431
    return false;
×
432

UNCOV
433
  try {
×
UNCOV
434
    d_unpublishDomainKeyQuery_stmt->bind("domain", name)->bind("key_id", id)->execute()->reset();
×
UNCOV
435
  }
×
UNCOV
436
  catch (SSqlException& se) {
×
437
    throw PDNSException("Error accessing DNSSEC database in BIND backend, unpublishDomainKey(): " + se.txtReason());
×
438
  }
×
UNCOV
439
  return true;
×
UNCOV
440
}
×
441

442
bool Bind2Backend::getTSIGKey(const DNSName& name, DNSName& algorithm, string& content)
UNCOV
443
{
×
UNCOV
444
  if (!d_dnssecdb || d_hybrid)
×
445
    return false;
×
446

UNCOV
447
  try {
×
UNCOV
448
    d_getTSIGKeyQuery_stmt->bind("key_name", name)->execute();
×
449

UNCOV
450
    SSqlStatement::row_t row;
×
UNCOV
451
    while (d_getTSIGKeyQuery_stmt->hasNextRow()) {
×
UNCOV
452
      d_getTSIGKeyQuery_stmt->nextRow(row);
×
UNCOV
453
      if (row.size() >= 2 && (algorithm.empty() || algorithm == DNSName(row[0]))) {
×
UNCOV
454
        algorithm = DNSName(row[0]);
×
UNCOV
455
        content = row[1];
×
UNCOV
456
      }
×
UNCOV
457
    }
×
458

UNCOV
459
    d_getTSIGKeyQuery_stmt->reset();
×
UNCOV
460
  }
×
UNCOV
461
  catch (SSqlException& e) {
×
462
    throw PDNSException("Error accessing DNSSEC database in BIND backend, getTSIGKey(): " + e.txtReason());
×
463
  }
×
UNCOV
464
  return true;
×
UNCOV
465
}
×
466

467
bool Bind2Backend::setTSIGKey(const DNSName& name, const DNSName& algorithm, const string& content)
UNCOV
468
{
×
UNCOV
469
  if (!d_dnssecdb || d_hybrid)
×
470
    return false;
×
471

UNCOV
472
  try {
×
UNCOV
473
    d_setTSIGKeyQuery_stmt->bind("key_name", name)->bind("algorithm", algorithm)->bind("content", content)->execute()->reset();
×
UNCOV
474
  }
×
UNCOV
475
  catch (SSqlException& e) {
×
476
    throw PDNSException("Error accessing DNSSEC database in BIND backend, setTSIGKey(): " + e.txtReason());
×
477
  }
×
UNCOV
478
  return true;
×
UNCOV
479
}
×
480

481
bool Bind2Backend::deleteTSIGKey(const DNSName& name)
482
{
×
483
  if (!d_dnssecdb || d_hybrid)
×
484
    return false;
×
485

486
  try {
×
487
    d_deleteTSIGKeyQuery_stmt->bind("key_name", name)->execute()->reset();
×
488
  }
×
489
  catch (SSqlException& e) {
×
490
    throw PDNSException("Error accessing DNSSEC database in BIND backend, deleteTSIGKey(): " + e.txtReason());
×
491
  }
×
492
  return true;
×
493
}
×
494

495
bool Bind2Backend::getTSIGKeys(std::vector<struct TSIGKey>& keys)
496
{
×
497
  if (!d_dnssecdb || d_hybrid)
×
498
    return false;
×
499

500
  try {
×
501
    d_getTSIGKeysQuery_stmt->execute();
×
502

503
    SSqlStatement::row_t row;
×
504
    while (d_getTSIGKeysQuery_stmt->hasNextRow()) {
×
505
      d_getTSIGKeysQuery_stmt->nextRow(row);
×
506
      struct TSIGKey key;
×
507
      key.name = DNSName(row[0]);
×
508
      key.algorithm = DNSName(row[1]);
×
509
      key.key = row[2];
×
510
      keys.push_back(key);
×
511
    }
×
512

513
    d_getTSIGKeysQuery_stmt->reset();
×
514
  }
×
515
  catch (SSqlException& e) {
×
516
    throw PDNSException("Error accessing DNSSEC database in BIND backend, getTSIGKeys(): " + e.txtReason());
×
517
  }
×
518
  return true;
×
519
}
×
520

521
#endif
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc