|
OpenDNSSEC-signer
2.1.3
|
#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 |
| #define TSIG_SIGNED_TIME_FUDGE 300 |
| typedef struct tsig_algo_table_struct tsig_algo_table_type |
| typedef struct tsig_key_table_struct tsig_key_table_type |
| void tsig_cleanup | ( | tsig_type * | tsig | ) |
Clean up TSIG.
Definition at line 847 of file tsig.c.
References tsig_struct::algorithm, tsig_struct::name, tsig_struct::next, tsig_struct::secret, and tsig_cleanup().
Referenced by dnsin_cleanup(), dnsout_cleanup(), and tsig_cleanup().
| tsig_type* tsig_create | ( | char * | name, |
| char * | algo, | ||
| char * | secret | ||
| ) |
Create new TSIG.
Definition at line 208 of file tsig.c.
References tsig_struct::algorithm, tsig_struct::key, tsig_struct::name, tsig_struct::next, and tsig_struct::secret.
| 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, and tsig_algo_table_struct::next.
| 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.
| ods_status tsig_handler_init | ( | void | ) |
| 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.
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().
| void tsig_rr_append | ( | tsig_rr_type * | trr, |
| buffer_type * | buffer | ||
| ) |
Append TSIG RR.
Definition at line 672 of file tsig.c.
References tsig_rr_struct::algo_name, buffer_position(), buffer_skip(), buffer_write(), buffer_write_rdf(), buffer_write_u16(), buffer_write_u16_at(), buffer_write_u32(), buffer_write_u8(), tsig_rr_struct::error_code, tsig_rr_struct::key_name, tsig_rr_struct::mac_data, tsig_rr_struct::mac_size, tsig_rr_struct::original_query_id, tsig_rr_struct::other_data, tsig_rr_struct::other_size, tsig_rr_struct::signed_time_fudge, tsig_rr_struct::signed_time_high, and tsig_rr_struct::signed_time_low.
Referenced by query_add_optional().
| 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(), and query_cleanup().
| tsig_rr_type* tsig_rr_create | ( | void | ) |
Create new TSIG RR.
Definition at line 274 of file tsig.c.
References tsig_rr_struct::algo_name, tsig_rr_struct::key_name, tsig_rr_struct::mac_data, tsig_rr_struct::other_data, and tsig_rr_reset().
Referenced by query_create(), and xfrd_create().
| 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().
| int tsig_rr_find | ( | tsig_rr_type * | trr, |
| buffer_type * | buffer | ||
| ) |
Find TSIG RR.
Definition at line 435 of file tsig.c.
References buffer_pkt_ancount(), buffer_pkt_arcount(), BUFFER_PKT_HEADER_SIZE, buffer_pkt_nscount(), buffer_pkt_qdcount(), buffer_position(), buffer_set_position(), buffer_skip_rr(), tsig_rr_struct::status, TSIG_NOT_PRESENT, and tsig_rr_parse().
| void tsig_rr_free | ( | tsig_rr_type * | trr | ) |
Free TSIG RR.
Definition at line 811 of file tsig.c.
References tsig_rr_struct::algo_name, tsig_rr_struct::key_name, tsig_rr_struct::mac_data, and tsig_rr_struct::other_data.
Referenced by tsig_rr_cleanup(), and tsig_rr_reset().
| int tsig_rr_lookup | ( | tsig_rr_type * | trr | ) |
Lookup TSIG RR.
Definition at line 469 of file tsig.c.
References tsig_rr_struct::algo, tsig_rr_struct::algo_name, tsig_algo_table_struct::algorithm, tsig_key_struct::dname, tsig_key_table_struct::key, tsig_rr_struct::key, tsig_rr_struct::key_name, tsig_key_table_struct::next, tsig_algo_table_struct::next, tsig_rr_struct::status, TSIG_OK, and tsig_algo_struct::wf_name.
| int tsig_rr_parse | ( | tsig_rr_type * | trr, |
| buffer_type * | buffer | ||
| ) |
Parse TSIG RR.
Definition at line 322 of file tsig.c.
References buffer_position(), buffer_set_position(), buffer_skip_dname(), tsig_rr_struct::position, tsig_rr_struct::status, and TSIG_NOT_PRESENT.
Referenced by tsig_rr_find().
| void tsig_rr_prepare | ( | tsig_rr_type * | trr | ) |
Prepare TSIG RR.
Definition at line 537 of file tsig.c.
References tsig_rr_struct::algo, tsig_rr_struct::context, tsig_algo_struct::hmac_create, tsig_algo_struct::hmac_init, tsig_algo_struct::hmac_update, tsig_rr_struct::key, tsig_algo_struct::max_digest_size, tsig_rr_struct::prior_mac_data, tsig_rr_struct::prior_mac_size, and tsig_rr_struct::update_since_last_prepare.
Referenced by query_add_optional().
| size_t tsig_rr_reserved_space | ( | tsig_rr_type * | trr | ) |
Definition at line 713 of file tsig.c.
References tsig_rr_struct::algo_name, tsig_rr_struct::key_name, tsig_rr_struct::status, and TSIG_NOT_PRESENT.
Referenced by query_prepare().
| void tsig_rr_reset | ( | tsig_rr_type * | trr, |
| tsig_algo_type * | algo, | ||
| tsig_key_type * | key | ||
| ) |
Reset TSIG RR.
Definition at line 292 of file tsig.c.
References tsig_rr_struct::algo, tsig_rr_struct::context, tsig_rr_struct::error_code, tsig_key_table_struct::key, tsig_rr_struct::key, tsig_rr_struct::mac_size, tsig_rr_struct::original_query_id, tsig_rr_struct::other_size, tsig_rr_struct::position, tsig_rr_struct::prior_mac_data, tsig_rr_struct::prior_mac_size, tsig_rr_struct::response_count, tsig_rr_struct::signed_time_fudge, tsig_rr_struct::signed_time_high, tsig_rr_struct::signed_time_low, tsig_rr_struct::status, TSIG_NOT_PRESENT, tsig_rr_free(), and tsig_rr_struct::update_since_last_prepare.
Referenced by query_reset(), and tsig_rr_create().
| void tsig_rr_sign | ( | tsig_rr_type * | trr | ) |
Sign TSIG RR.
Definition at line 629 of file tsig.c.
References tsig_rr_struct::context, tsig_rr_struct::signed_time_fudge, tsig_rr_struct::signed_time_high, tsig_rr_struct::signed_time_low, and TSIG_SIGNED_TIME_FUDGE.
Referenced by query_add_optional().
| void tsig_rr_update | ( | tsig_rr_type * | trr, |
| buffer_type * | buffer, | ||
| size_t | length | ||
| ) |
Update TSIG RR.
Definition at line 559 of file tsig.c.
References tsig_rr_struct::algo, buffer_at(), buffer_limit(), buffer_pkt_qr(), tsig_rr_struct::context, tsig_algo_struct::hmac_update, tsig_rr_struct::original_query_id, tsig_rr_struct::response_count, and tsig_rr_struct::update_since_last_prepare.
Referenced by query_add_optional().
| int tsig_rr_verify | ( | tsig_rr_type * | trr | ) |
| 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.
| 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.
1.8.13