#include <config.h>
#include <isc/base64.h>
#include <isc/buffer.h>
#include <isc/mem.h>
#include <isc/string.h>
#include <isccfg/cfg.h>
#include <dns/tsig.h>
#include <dns/result.h>
#include <named/log.h>
#include <named/tsigconf.h>
Go to the source code of this file.
Functions | |
static isc_result_t | add_initial_keys (const cfg_obj_t *list, dns_tsig_keyring_t *ring, isc_mem_t *mctx) |
isc_result_t | ns_tsigkeyring_fromconfig (const cfg_obj_t *config, const cfg_obj_t *vconfig, isc_mem_t *mctx, dns_tsig_keyring_t **ringp) |
Create a TSIG key ring and configure it according to the 'key' statements in the global and view configuration objects. |
Definition in file tsigconf.c.
static isc_result_t add_initial_keys | ( | const cfg_obj_t * | list, | |
dns_tsig_keyring_t * | ring, | |||
isc_mem_t * | mctx | |||
) | [static] |
Definition at line 40 of file tsigconf.c.
References cfg_list_first(), cfg_list_next(), cfg_listelt_value(), cfg_map_get(), cfg_map_getname(), cfg_obj_asstring(), cfg_obj_log(), DNS_NAME_DOWNCASE, dns_name_fromtext(), dns_name_init(), DNS_R_BADALG, dns_rootname, dns_tsigkey_create(), dns_tsigkey_detach(), dst_key_setbits(), INSIST, isc_base64_decodestring(), isc_buffer_add, isc_buffer_constinit, isc_buffer_init, isc_buffer_usedlength, ISC_FALSE, ISC_LOG_ERROR, isc_mem_get, isc_mem_put, ISC_R_NOMEMORY, ISC_R_SUCCESS, isc_result_totext(), isc_stdtime_get(), dns_tsigkey::key, key, now, ns_config_getkeyalgorithm(), secret, and tsigkey.
Referenced by ns_tsigkeyring_fromconfig().
isc_result_t ns_tsigkeyring_fromconfig | ( | const cfg_obj_t * | config, | |
const cfg_obj_t * | vconfig, | |||
isc_mem_t * | mctx, | |||
dns_tsig_keyring_t ** | ringp | |||
) |
Create a TSIG key ring and configure it according to the 'key' statements in the global and view configuration objects.
Requires:
Definition at line 143 of file tsigconf.c.
References add_initial_keys(), cfg_map_get(), cfg_tuple_get(), dns_tsigkeyring_create(), dns_tsigkeyring_detach(), ISC_R_SUCCESS, keylist, and REQUIRE.
Referenced by configure_view().