File: tsigverifier.hh

package info (click to toggle)
pdns-recursor 5.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,108 kB
  • sloc: cpp: 109,513; javascript: 20,651; python: 5,657; sh: 5,069; makefile: 780; ansic: 582; xml: 37
file content (22 lines) | stat: -rw-r--r-- 522 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

#pragma once

#include "dnsrecords.hh"
#include "iputils.hh"

class TSIGTCPVerifier
{
public:
  TSIGTCPVerifier(const TSIGTriplet& tt, const ComboAddress& remote, TSIGRecordContent& trc): d_tt(tt), d_remote(remote), d_trc(trc)
  {
  }
  bool check(const string& data, const MOADNSParser& mdp);
private:
  const TSIGTriplet& d_tt;
  const ComboAddress& d_remote;
  TSIGRecordContent& d_trc;
  string d_prevMac; // RFC2845 4.4
  string d_signData;
  size_t d_tsigPos{0};
  uint8_t d_nonSignedMessages{0}; // RFC2845 4.4
};