ldns documentation

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

tsig.h
Go to the documentation of this file.
1 /*
2 * tsig.h -- defines for TSIG [RFC2845]
3 *
4 * Copyright (c) 2005-2008, NLnet Labs. All rights reserved.
5 *
6 * See LICENSE for the license.
7 */
8
9 #ifndef LDNS_TSIG_H
10 #define LDNS_TSIG_H
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
26 typedef struct ldns_tsig_credentials_struct
27 {
28 char *algorithm;
29 char *keyname;
30 char *keydata;
31 /* XXX More eventually. */
32 } ldns_tsig_credentials;
33
34 char *ldns_tsig_algorithm(ldns_tsig_credentials *);
35 char *ldns_tsig_keyname(ldns_tsig_credentials *);
36 char *ldns_tsig_keydata(ldns_tsig_credentials *);
37 char *ldns_tsig_keyname_clone(ldns_tsig_credentials *);
38 char *ldns_tsig_keydata_clone(ldns_tsig_credentials *);
39
51 bool ldns_pkt_tsig_verify(ldns_pkt *pkt, uint8_t *wire, size_t wire_size, const char *key_name, const char *key_data, ldns_rdf *mac);
52
66 bool ldns_pkt_tsig_verify_next(ldns_pkt *pkt, uint8_t *wire, size_t wire_size, const char *key_name, const char *key_data, ldns_rdf *mac,
67 int tsig_timers_only);
68
79 ldns_status ldns_pkt_tsig_sign(ldns_pkt *pkt, const char *key_name, const char *key_data, uint16_t fudge,
80 const char *algorithm_name, ldns_rdf *query_mac);
81
94 ldns_status ldns_pkt_tsig_sign_next(ldns_pkt *pkt, const char *key_name, const char *key_data, uint16_t fudge,
95 const char *algorithm_name, ldns_rdf *query_mac, int tsig_timers_only);
96
97 #ifdef __cplusplus
98 }
99 #endif
100
101 #endif /* LDNS_TSIG_H */
ldns_tsig_keyname_clone
char * ldns_tsig_keyname_clone(ldns_tsig_credentials *)
Definition: tsig.c:40
ldns_tsig_credentials
struct ldns_tsig_credentials_struct ldns_tsig_credentials
Contains credentials for TSIG.
ldns_tsig_credentials_struct::algorithm
char * algorithm
Definition: tsig.h:28
ldns_pkt_tsig_verify_next
bool ldns_pkt_tsig_verify_next(ldns_pkt *pkt, uint8_t *wire, size_t wire_size, const char *key_name, const char *key_data, ldns_rdf *mac, int tsig_timers_only)
verifies the tsig rr for the given packet and key.
Definition: tsig.c:283
ldns_pkt_tsig_sign
ldns_status ldns_pkt_tsig_sign(ldns_pkt *pkt, const char *key_name, const char *key_data, uint16_t fudge, const char *algorithm_name, ldns_rdf *query_mac)
creates a tsig rr for the given packet and key.
Definition: tsig.c:352
ldns_pkt_tsig_verify
bool ldns_pkt_tsig_verify(ldns_pkt *pkt, uint8_t *wire, size_t wire_size, const char *key_name, const char *key_data, ldns_rdf *mac)
verifies the tsig rr for the given packet and key.
Definition: tsig.c:276
ldns_pkt_tsig_sign_next
ldns_status ldns_pkt_tsig_sign_next(ldns_pkt *pkt, const char *key_name, const char *key_data, uint16_t fudge, const char *algorithm_name, ldns_rdf *query_mac, int tsig_timers_only)
creates a tsig rr for the given packet and key.
Definition: tsig.c:359
ldns_tsig_keyname
char * ldns_tsig_keyname(ldns_tsig_credentials *)
Definition: tsig.c:28
ldns_tsig_algorithm
char * ldns_tsig_algorithm(ldns_tsig_credentials *)
Definition: tsig.c:22
ldns_struct_pkt
DNS packet.
Definition: packet.h:233
ldns_status
enum ldns_enum_status ldns_status
Definition: error.h:131
ldns_tsig_keydata_clone
char * ldns_tsig_keydata_clone(ldns_tsig_credentials *)
Definition: tsig.c:46
ldns_tsig_credentials_struct::keydata
char * keydata
Definition: tsig.h:30
ldns_struct_rdf
Resource record data field.
Definition: rdata.h:166
ldns_tsig_credentials_struct::keyname
char * keyname
Definition: tsig.h:29
ldns_tsig_credentials_struct
Contains credentials for TSIG.
Definition: tsig.h:26
ldns_tsig_keydata
char * ldns_tsig_keydata(ldns_tsig_credentials *)
Definition: tsig.c:34