OpenDNSSEC-signer 2.1.13
tsig.c File Reference
#include "config.h"
#include "compat.h"
#include "duration.h"
#include "file.h"
#include "log.h"
#include "status.h"
#include "util.h"
#include "wire/buffer.h"
#include "wire/tsig.h"
#include "wire/tsig-openssl.h"
#include <arpa/inet.h>

Go to the source code of this file.

Data Structures

struct  tsig_key_table_struct
struct  tsig_algo_table_struct

Macros

#define TSIG_SIGNED_TIME_FUDGE   300

Typedefs

typedef struct tsig_key_table_struct tsig_key_table_type
typedef struct tsig_algo_table_struct tsig_algo_table_type

Functions

void tsig_handler_add_key (tsig_key_type *key)
void tsig_handler_add_algo (tsig_algo_type *algo)
ods_status tsig_handler_init ()
void tsig_handler_cleanup (void)
tsig_typetsig_create (char *name, char *algo, char *secret)
tsig_typetsig_lookup_by_name (tsig_type *tsig, const char *name)
tsig_algo_typetsig_lookup_algo (const char *name)
tsig_rr_typetsig_rr_create ()
void tsig_rr_reset (tsig_rr_type *trr, tsig_algo_type *algo, tsig_key_type *key)
int tsig_rr_parse (tsig_rr_type *trr, buffer_type *buffer)
int tsig_rr_find (tsig_rr_type *trr, buffer_type *buffer)
int tsig_rr_lookup (tsig_rr_type *trr)
void tsig_rr_prepare (tsig_rr_type *trr)
void tsig_rr_update (tsig_rr_type *trr, buffer_type *buffer, size_t length)
void tsig_rr_sign (tsig_rr_type *trr)
int tsig_rr_verify (tsig_rr_type *trr)
void tsig_rr_append (tsig_rr_type *trr, buffer_type *buffer)
size_t tsig_rr_reserved_space (tsig_rr_type *trr)
void tsig_rr_error (tsig_rr_type *trr)
const char * tsig_status2str (tsig_status status)
const char * tsig_strerror (uint16_t error)
void tsig_rr_free (tsig_rr_type *trr)
void tsig_rr_cleanup (tsig_rr_type *trr)
void tsig_cleanup (tsig_type *tsig)

Macro Definition Documentation

◆ TSIG_SIGNED_TIME_FUDGE

#define TSIG_SIGNED_TIME_FUDGE   300

TSIG.

Definition at line 47 of file tsig.c.

Referenced by tsig_rr_sign().

Typedef Documentation

◆ tsig_algo_table_type

algorithm table

Definition at line 58 of file tsig.c.

◆ tsig_key_table_type

key table

Definition at line 51 of file tsig.c.

Function Documentation

◆ tsig_cleanup()

void tsig_cleanup ( tsig_type * tsig)

◆ tsig_create()

tsig_type * tsig_create ( char * name,
char * algo,
char * secret )

◆ tsig_handler_add_algo()

void tsig_handler_add_algo ( tsig_algo_type * algo)

Add algorithm to TSIG handler.

Definition at line 93 of file tsig.c.

References tsig_algo_table_struct::algorithm, tsig_algo_struct::max_digest_size, and tsig_algo_table_struct::next.

◆ tsig_handler_add_key()

void tsig_handler_add_key ( tsig_key_type * key)

Add key to TSIG handler.

Definition at line 73 of file tsig.c.

References tsig_key_table_struct::key, and tsig_key_table_struct::next.

◆ tsig_handler_cleanup()

◆ tsig_handler_init()

ods_status tsig_handler_init ( void )

Initialize TSIG handler.

Definition at line 116 of file tsig.c.

◆ tsig_lookup_algo()

tsig_algo_type * tsig_lookup_algo ( const char * name)

Lookup TSIG algorithm by name.

Definition at line 257 of file tsig.c.

References tsig_algo_table_struct::algorithm, tsig_algo_table_struct::next, and tsig_algo_struct::txt_name.

◆ tsig_lookup_by_name()

tsig_type * tsig_lookup_by_name ( tsig_type * tsig,
const char * name )

Lookup TSIG by key name.

Definition at line 235 of file tsig.c.

References tsig_struct::name, and tsig_struct::next.

Referenced by acl_create().

◆ tsig_rr_append()

◆ tsig_rr_cleanup()

void tsig_rr_cleanup ( tsig_rr_type * trr)

Cleanup TSIG RR.

Definition at line 832 of file tsig.c.

References tsig_rr_free().

Referenced by notify_cleanup(), query_cleanup(), and xfrd_cleanup().

◆ tsig_rr_create()

tsig_rr_type * tsig_rr_create ( void )

◆ tsig_rr_error()

void tsig_rr_error ( tsig_rr_type * trr)

Reply with error TSIG RR.

Definition at line 742 of file tsig.c.

References tsig_rr_struct::mac_data, and tsig_rr_struct::mac_size.

Referenced by query_add_optional().

◆ tsig_rr_find()

◆ tsig_rr_free()

void tsig_rr_free ( tsig_rr_type * trr)

◆ tsig_rr_lookup()

◆ tsig_rr_parse()

◆ tsig_rr_prepare()

◆ tsig_rr_reserved_space()

size_t tsig_rr_reserved_space ( tsig_rr_type * trr)

◆ tsig_rr_reset()

◆ tsig_rr_sign()

◆ tsig_rr_update()

◆ tsig_rr_verify()

◆ tsig_status2str()

const char * tsig_status2str ( tsig_status status)

Print TSIG status.

Definition at line 759 of file tsig.c.

References TSIG_ERROR, TSIG_NOT_PRESENT, and TSIG_OK.

Referenced by query_process().

◆ tsig_strerror()

const char * tsig_strerror ( uint16_t error)

Get human readable TSIG error code.

Definition at line 778 of file tsig.c.

References TSIG_ERROR_BADKEY, TSIG_ERROR_BADSIG, and TSIG_ERROR_BADTIME.