Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

tsig.h File Reference

Go to the source code of this file.

Data Structures

struct  _ldns_tsig_credentials

Typedefs

typedef _ldns_tsig_credentials ldns_tsig_credentials

Functions

char * ldns_tsig_algorithm (ldns_tsig_credentials *)
char * ldns_tsig_keyname (ldns_tsig_credentials *)
char * ldns_tsig_keydata (ldns_tsig_credentials *)
char * ldns_tsig_keyname_clone (ldns_tsig_credentials *)
char * ldns_tsig_keydata_clone (ldns_tsig_credentials *)
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 (string?).
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 (string?).


Typedef Documentation

typedef struct _ldns_tsig_credentials ldns_tsig_credentials
 


Function Documentation

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 (string?).

Parameters:
[in] pkt the packet to sign
[in] key_name the name of the shared key
[in] key_data the key in base 64 format
[in] fudge seconds of error permitted in time signed
[in] algorithm_name the name of the algorithm used (TODO more than only hmac-md5.sig-alg.reg.int.?)
[in] query_mac is added to the digest if not NULL (so NULL is for signing queries, not NULL is for signing answers)
Returns:
status (OK if success)

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 (string?).

The wire must be given too because tsig does not sign normalized packets.

Returns:
true if tsig is correct, false if not, or if tsig is not set

char* ldns_tsig_algorithm ldns_tsig_credentials  ) 
 

char* ldns_tsig_keydata ldns_tsig_credentials  ) 
 

char* ldns_tsig_keydata_clone ldns_tsig_credentials  ) 
 

char* ldns_tsig_keyname ldns_tsig_credentials  ) 
 

char* ldns_tsig_keyname_clone ldns_tsig_credentials  ) 
 


Generated on Tue Jan 24 02:22:27 2006 for ldns by  doxygen 1.4.4