42 #ifndef _DWMDNSRRDATACERT_HH_ 43 #define _DWMDNSRRDATACERT_HH_ 64 static const uint16_t k_rrtype = 37;
66 static const uint16_t k_typePKIX = 1;
67 static const uint16_t k_typeSPKI = 2;
68 static const uint16_t k_typePGP = 3;
69 static const uint16_t k_typeIPKIX = 4;
70 static const uint16_t k_typeISPKI = 5;
71 static const uint16_t k_typeIPGP = 6;
72 static const uint16_t k_typeACPKIX = 7;
73 static const uint16_t k_typeIACPKIX = 8;
74 static const uint16_t k_typeURI = 253;
75 static const uint16_t k_typeOID = 254;
77 static const uint8_t k_algorithmReserved = 0;
78 static const uint8_t k_algorithmRSAMD5 = 1;
79 static const uint8_t k_algorithmDH = 2;
80 static const uint8_t k_algorithmDSA = 3;
81 static const uint8_t k_algorithmECC = 4;
92 RRDataCERT(uint16_t type, uint16_t keyTag, uint8_t algorithm,
93 const std::string & certificate);
103 uint16_t
Type()
const;
108 uint16_t
Type(uint16_t type);
118 uint16_t
KeyTag(uint16_t keyTag);
138 const std::string &
Certificate(
const std::string & certificate);
147 uint8_t *
Encode(uint8_t *pkt, uint8_t *ptr, uint16_t pktlen,
157 const uint8_t *
Decode(
const uint8_t *pkt,
const uint8_t *ptr,
158 uint16_t pktlen, uint16_t rdlen);
164 friend std::ostream &
operator << (std::ostream & os,
171 std::string _certificate;
178 #endif // _DWMDNSRRDATACERT_HH_
Encapsulates CERT resource record data.
Definition: DwmDnsRRDataCERT.hh:60
uint16_t KeyTag() const
Returns the key tag in the CERT resource record data.
uint16_t Type() const
Returns the type in the CERT resource record data.
uint8_t * Encode(uint8_t *pkt, uint8_t *ptr, uint16_t pktlen, LabelPositions &lps) const
Encodes the CERT resource record data into buffer @ pkt of length pktlen, starting at ptr...
Definition: DwmDnsEtcHosts.hh:60
const uint8_t * Decode(const uint8_t *pkt, const uint8_t *ptr, uint16_t pktlen, uint16_t rdlen)
Decodes the CERT resource record data from buffer pkt of length pktlen, starting at ptr...
const std::string & Certificate() const
Returns the certificate in the CERT resource record data.
Dwm::Dns::RRData class definition.
uint8_t Algorithm() const
Returns the algorithm in the CERT resource record data.
bool operator==(const RRDataCERT &cert) const
Equal-to operator, mostly for unit testing.
A helper class used when performing label sequence compression.
Definition: DwmDnsLabelPositions.hh:57
friend std::ostream & operator<<(std::ostream &os, const RRDataCERT &cert)
Print the CERT resource record data to an ostream in human readable form.
Abstract (pure virtual) base for resource record data classes.
Definition: DwmDnsRRData.hh:71