tsig.h
Go to the documentation of this file.
/*
* tsig.h -- defines for TSIG [RFC2845]
*
* Copyright (c) 2005-2008, NLnet Labs. All rights reserved.
*
* See LICENSE for the license.
*/
#ifndef LDNS_TSIG_H
#define LDNS_TSIG_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct ldns_tsig_credentials_struct
{
const char *algorithm;
const char *keyname;
const char *keydata;
/* XXX More eventually. */
} ldns_tsig_credentials;
const char *ldns_tsig_algorithm(const ldns_tsig_credentials *);
const char *ldns_tsig_keyname(const ldns_tsig_credentials *);
const char *ldns_tsig_keydata(const ldns_tsig_credentials *);
char *ldns_tsig_keyname_clone(const ldns_tsig_credentials *);
char *ldns_tsig_keydata_clone(const ldns_tsig_credentials *);
bool ldns_pkt_tsig_verify(ldns_pkt *pkt, const uint8_t *wire, size_t wire_size, const char *key_name, const char *key_data, const ldns_rdf *mac);
bool ldns_pkt_tsig_verify_next(ldns_pkt *pkt, const uint8_t *wire, size_t wire_size, const char *key_name, const char *key_data, const ldns_rdf *mac,
int tsig_timers_only);
ldns_status ldns_pkt_tsig_sign(ldns_pkt *pkt, const char *key_name, const char *key_data, uint16_t fudge,
const char *algorithm_name, const ldns_rdf *query_mac);
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, const ldns_rdf *query_mac, int tsig_timers_only);
#ifdef __cplusplus
}
#endif
#endif /* LDNS_TSIG_H */
ldns_status
enum ldns_enum_status ldns_status
Definition error.h:152
ldns_pkt
struct ldns_struct_pkt ldns_pkt
Definition packet.h:272
ldns_rdf
struct ldns_struct_rdf ldns_rdf
Definition rdata.h:211
ldns_tsig_credentials_struct
Contains credentials for TSIG.
Definition tsig.h:27
ldns_tsig_credentials_struct::keydata
const char * keydata
Definition tsig.h:30
ldns_tsig_credentials_struct::algorithm
const char * algorithm
Definition tsig.h:28
ldns_tsig_credentials_struct::keyname
const char * keyname
Definition tsig.h:29
ldns_tsig_keyname_clone
char * ldns_tsig_keyname_clone(const ldns_tsig_credentials *)
Definition tsig.c:40
ldns_tsig_algorithm
const char * ldns_tsig_algorithm(const ldns_tsig_credentials *)
Definition tsig.c:22
ldns_pkt_tsig_verify
bool ldns_pkt_tsig_verify(ldns_pkt *pkt, const uint8_t *wire, size_t wire_size, const char *key_name, const char *key_data, const ldns_rdf *mac)
verifies the tsig rr for the given packet and key.
Definition tsig.c:288
ldns_tsig_keyname
const char * ldns_tsig_keyname(const ldns_tsig_credentials *)
Definition tsig.c:28
ldns_tsig_credentials
struct ldns_tsig_credentials_struct ldns_tsig_credentials
Contains credentials for TSIG.
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, const ldns_rdf *query_mac, int tsig_timers_only)
creates a tsig rr for the given packet and key.
Definition tsig.c:383
ldns_tsig_keydata_clone
char * ldns_tsig_keydata_clone(const ldns_tsig_credentials *)
Definition tsig.c:46
ldns_pkt_tsig_verify_next
bool ldns_pkt_tsig_verify_next(ldns_pkt *pkt, const uint8_t *wire, size_t wire_size, const char *key_name, const char *key_data, const ldns_rdf *mac, int tsig_timers_only)
verifies the tsig rr for the given packet and key.
Definition tsig.c:295
ldns_tsig_keydata
const char * ldns_tsig_keydata(const ldns_tsig_credentials *)
Definition tsig.c:34
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, const ldns_rdf *query_mac)
creates a tsig rr for the given packet and key.
Definition tsig.c:376