#include <config.h>
#include <isc/buffer.h>
#include <isc/hmacmd5.h>
#include <isc/hmacsha.h>
#include <isc/md5.h>
#include <isc/sha1.h>
#include <isc/mem.h>
#include <isc/safe.h>
#include <isc/string.h>
#include <isc/util.h>
#include <dst/result.h>
#include "dst_internal.h"
#include "dst_parse.h"
Go to the source code of this file.
Definition in file hmac_link.c.
static isc_result_t hmacmd5_fromdns | ( | dst_key_t * | key, | |
isc_buffer_t * | data | |||
) | [static] |
Definition at line 210 of file hmac_link.c.
References isc_region::base, isc_buffer_remainingregion, ISC_MD5_DIGESTLENGTH, isc_md5_final(), isc_md5_init(), isc_md5_update(), isc_mem_get, ISC_R_NOMEMORY, ISC_R_SUCCESS, ISC_SHA1_BLOCK_LENGTH, dst_hmacmd5_key::key, isc_region::length, and r.
Referenced by hmacmd5_generate(), and hmacmd5_parse().
static isc_result_t getkeybits | ( | dst_key_t * | key, | |
struct dst_private_element * | element | |||
) | [static] |
Definition at line 61 of file hmac_link.c.
References dst_private_element::data, DST_R_INVALIDPRIVATEKEY, ISC_R_SUCCESS, dst_private_element::length, and return().
Referenced by hmacmd5_parse(), hmacsha1_parse(), hmacsha224_parse(), hmacsha256_parse(), hmacsha384_parse(), and hmacsha512_parse().
static isc_result_t hmacmd5_createctx | ( | dst_key_t * | key, | |
dst_context_t * | dctx | |||
) | [static] |
Definition at line 72 of file hmac_link.c.
References dst_context::ctxdata, dst_context::hmacmd5ctx, isc_hmacmd5_init(), isc_mem_get, ISC_R_NOMEMORY, ISC_R_SUCCESS, ISC_SHA1_BLOCK_LENGTH, dst_hmacmd5_key::key, and dst_context::mctx.
static void hmacmd5_destroyctx | ( | dst_context_t * | dctx | ) | [static] |
Definition at line 85 of file hmac_link.c.
References dst_context::ctxdata, dst_context::hmacmd5ctx, isc_hmacmd5_invalidate(), isc_mem_put, and dst_context::mctx.
static isc_result_t hmacmd5_adddata | ( | dst_context_t * | dctx, | |
const isc_region_t * | data | |||
) | [static] |
Definition at line 96 of file hmac_link.c.
References isc_region::base, dst_context::ctxdata, dst_context::hmacmd5ctx, isc_hmacmd5_update(), ISC_R_SUCCESS, and isc_region::length.
static isc_result_t hmacmd5_sign | ( | dst_context_t * | dctx, | |
isc_buffer_t * | sig | |||
) | [static] |
Definition at line 104 of file hmac_link.c.
References dst_context::ctxdata, digest, dst_context::hmacmd5ctx, isc_buffer_add, isc_buffer_availablelength, isc_buffer_used, isc_hmacmd5_sign(), ISC_MD5_DIGESTLENGTH, ISC_R_NOSPACE, and ISC_R_SUCCESS.
static isc_result_t hmacmd5_verify | ( | dst_context_t * | dctx, | |
const isc_region_t * | sig | |||
) | [static] |
Definition at line 118 of file hmac_link.c.
References isc_region::base, dst_context::ctxdata, DST_R_VERIFYFAILURE, dst_context::hmacmd5ctx, isc_hmacmd5_verify2(), ISC_MD5_DIGESTLENGTH, ISC_R_SUCCESS, and isc_region::length.
static isc_boolean_t hmacmd5_compare | ( | const dst_key_t * | key1, | |
const dst_key_t * | key2 | |||
) | [static] |
Definition at line 131 of file hmac_link.c.
References ISC_FALSE, isc_safe_memcmp(), ISC_SHA1_BLOCK_LENGTH, ISC_TRUE, and dst_hmacmd5_key::key.
static isc_result_t hmacmd5_generate | ( | dst_key_t * | key, | |
int | pseudorandom_ok, | |||
void(*)(int) | callback | |||
) | [static] |
Definition at line 149 of file hmac_link.c.
References dst__entropy_getdata(), hmacmd5_fromdns(), isc_buffer_add, isc_buffer_init, ISC_R_SUCCESS, ISC_SHA1_BLOCK_LENGTH, ISC_TF, and UNUSED.
static isc_boolean_t hmacmd5_isprivate | ( | const dst_key_t * | key | ) | [static] |
static void hmacmd5_destroy | ( | dst_key_t * | key | ) | [static] |
static isc_result_t hmacmd5_todns | ( | const dst_key_t * | key, | |
isc_buffer_t * | data | |||
) | [static] |
Definition at line 193 of file hmac_link.c.
References isc_buffer_availablelength, isc_buffer_putmem, ISC_R_NOSPACE, ISC_R_SUCCESS, dst_hmacmd5_key::key, and REQUIRE.
static isc_result_t hmacmd5_tofile | ( | const dst_key_t * | key, | |
const char * | directory | |||
) | [static] |
Definition at line 243 of file hmac_link.c.
References dst_private_element::data, dst__privstruct_writefile(), DST_R_EXTERNALKEY, DST_R_NULLKEY, dst_private::elements, dst_hmacmd5_key::key, dst_private_element::length, dst_private::nelements, dst_private_element::tag, TAG_HMACMD5_BITS, and TAG_HMACMD5_KEY.
static isc_result_t hmacmd5_parse | ( | dst_key_t * | key, | |
isc_lex_t * | lexer, | |||
dst_key_t * | pub | |||
) | [static] |
Definition at line 273 of file hmac_link.c.
References dst_private_element::data, dst__privstruct_free(), dst__privstruct_parse(), DST_ALG_HMACMD5, DST_R_EXTERNALKEY, DST_R_INVALIDPRIVATEKEY, dst_private::elements, getkeybits(), hmacmd5_fromdns(), isc_buffer_add, isc_buffer_init, ISC_R_SUCCESS, dst_private_element::length, mctx, dst_private::nelements, dst_private_element::tag, TAG_HMACMD5_BITS, TAG_HMACMD5_KEY, and UNUSED.
isc_result_t dst__hmacmd5_init | ( | dst_func_t ** | funcp | ) |
Definition at line 341 of file hmac_link.c.
References ISC_R_SUCCESS, and REQUIRE.
Referenced by dst_lib_init2().
static isc_result_t hmacsha1_fromdns | ( | dst_key_t * | key, | |
isc_buffer_t * | data | |||
) | [static] |
Definition at line 493 of file hmac_link.c.
References isc_region::base, isc_buffer_remainingregion, isc_mem_get, ISC_R_NOMEMORY, ISC_R_SUCCESS, ISC_SHA1_BLOCK_LENGTH, ISC_SHA1_DIGESTLENGTH, isc_sha1_final(), isc_sha1_init(), isc_sha1_update(), dst_hmacsha1_key::key, isc_region::length, and r.
Referenced by hmacsha1_generate(), and hmacsha1_parse().
static isc_result_t hmacsha1_createctx | ( | dst_key_t * | key, | |
dst_context_t * | dctx | |||
) | [static] |
Definition at line 355 of file hmac_link.c.
References dst_context::ctxdata, dst_context::hmacsha1ctx, isc_hmacsha1_init(), isc_mem_get, ISC_R_NOMEMORY, ISC_R_SUCCESS, ISC_SHA1_BLOCK_LENGTH, dst_hmacsha1_key::key, and dst_context::mctx.
static void hmacsha1_destroyctx | ( | dst_context_t * | dctx | ) | [static] |
Definition at line 368 of file hmac_link.c.
References dst_context::ctxdata, dst_context::hmacsha1ctx, isc_hmacsha1_invalidate(), isc_mem_put, and dst_context::mctx.
static isc_result_t hmacsha1_adddata | ( | dst_context_t * | dctx, | |
const isc_region_t * | data | |||
) | [static] |
Definition at line 379 of file hmac_link.c.
References isc_region::base, dst_context::ctxdata, dst_context::hmacsha1ctx, isc_hmacsha1_update(), ISC_R_SUCCESS, and isc_region::length.
static isc_result_t hmacsha1_sign | ( | dst_context_t * | dctx, | |
isc_buffer_t * | sig | |||
) | [static] |
Definition at line 387 of file hmac_link.c.
References dst_context::ctxdata, digest, dst_context::hmacsha1ctx, isc_buffer_add, isc_buffer_availablelength, isc_buffer_used, isc_hmacsha1_sign(), ISC_R_NOSPACE, ISC_R_SUCCESS, and ISC_SHA1_DIGESTLENGTH.
static isc_result_t hmacsha1_verify | ( | dst_context_t * | dctx, | |
const isc_region_t * | sig | |||
) | [static] |
Definition at line 401 of file hmac_link.c.
References isc_region::base, dst_context::ctxdata, DST_R_VERIFYFAILURE, dst_context::hmacsha1ctx, isc_hmacsha1_verify(), ISC_R_SUCCESS, ISC_SHA1_DIGESTLENGTH, and isc_region::length.
static isc_boolean_t hmacsha1_compare | ( | const dst_key_t * | key1, | |
const dst_key_t * | key2 | |||
) | [static] |
Definition at line 414 of file hmac_link.c.
References ISC_FALSE, isc_safe_memcmp(), ISC_SHA1_BLOCK_LENGTH, ISC_TRUE, and dst_hmacsha1_key::key.
static isc_result_t hmacsha1_generate | ( | dst_key_t * | key, | |
int | pseudorandom_ok, | |||
void(*)(int) | callback | |||
) | [static] |
Definition at line 432 of file hmac_link.c.
References dst__entropy_getdata(), hmacsha1_fromdns(), isc_buffer_add, isc_buffer_init, ISC_R_SUCCESS, ISC_SHA1_BLOCK_LENGTH, ISC_TF, and UNUSED.
static isc_boolean_t hmacsha1_isprivate | ( | const dst_key_t * | key | ) | [static] |
static void hmacsha1_destroy | ( | dst_key_t * | key | ) | [static] |
static isc_result_t hmacsha1_todns | ( | const dst_key_t * | key, | |
isc_buffer_t * | data | |||
) | [static] |
Definition at line 476 of file hmac_link.c.
References isc_buffer_availablelength, isc_buffer_putmem, ISC_R_NOSPACE, ISC_R_SUCCESS, dst_hmacsha1_key::key, and REQUIRE.
static isc_result_t hmacsha1_tofile | ( | const dst_key_t * | key, | |
const char * | directory | |||
) | [static] |
Definition at line 526 of file hmac_link.c.
References dst_private_element::data, dst__privstruct_writefile(), DST_R_EXTERNALKEY, DST_R_NULLKEY, dst_private::elements, dst_hmacsha1_key::key, dst_private_element::length, dst_private::nelements, dst_private_element::tag, TAG_HMACSHA1_BITS, and TAG_HMACSHA1_KEY.
static isc_result_t hmacsha1_parse | ( | dst_key_t * | key, | |
isc_lex_t * | lexer, | |||
dst_key_t * | pub | |||
) | [static] |
Definition at line 556 of file hmac_link.c.
References dst_private_element::data, dst__privstruct_free(), dst__privstruct_parse(), DST_ALG_HMACSHA1, DST_R_EXTERNALKEY, DST_R_INVALIDPRIVATEKEY, dst_private::elements, getkeybits(), hmacsha1_fromdns(), isc_buffer_add, isc_buffer_init, ISC_R_SUCCESS, dst_private_element::length, mctx, dst_private::nelements, dst_private_element::tag, TAG_HMACSHA1_BITS, TAG_HMACSHA1_KEY, and UNUSED.
isc_result_t dst__hmacsha1_init | ( | dst_func_t ** | funcp | ) |
Definition at line 624 of file hmac_link.c.
References ISC_R_SUCCESS, and REQUIRE.
Referenced by dst_lib_init2().
static isc_result_t hmacsha224_fromdns | ( | dst_key_t * | key, | |
isc_buffer_t * | data | |||
) | [static] |
Definition at line 778 of file hmac_link.c.
References isc_region::base, isc_buffer_remainingregion, isc_mem_get, ISC_R_NOMEMORY, ISC_R_SUCCESS, ISC_SHA224_BLOCK_LENGTH, ISC_SHA224_DIGESTLENGTH, isc_sha224_final(), isc_sha224_init(), isc_sha224_update(), dst_hmacsha224_key::key, isc_region::length, and r.
Referenced by hmacsha224_generate(), and hmacsha224_parse().
static isc_result_t hmacsha224_createctx | ( | dst_key_t * | key, | |
dst_context_t * | dctx | |||
) | [static] |
Definition at line 638 of file hmac_link.c.
References dst_context::ctxdata, dst_context::hmacsha224ctx, isc_hmacsha224_init(), isc_mem_get, ISC_R_NOMEMORY, ISC_R_SUCCESS, ISC_SHA224_BLOCK_LENGTH, dst_hmacsha224_key::key, and dst_context::mctx.
static void hmacsha224_destroyctx | ( | dst_context_t * | dctx | ) | [static] |
Definition at line 651 of file hmac_link.c.
References dst_context::ctxdata, dst_context::hmacsha224ctx, isc_hmacsha224_invalidate(), isc_mem_put, and dst_context::mctx.
static isc_result_t hmacsha224_adddata | ( | dst_context_t * | dctx, | |
const isc_region_t * | data | |||
) | [static] |
Definition at line 662 of file hmac_link.c.
References isc_region::base, dst_context::ctxdata, dst_context::hmacsha224ctx, isc_hmacsha224_update(), ISC_R_SUCCESS, and isc_region::length.
static isc_result_t hmacsha224_sign | ( | dst_context_t * | dctx, | |
isc_buffer_t * | sig | |||
) | [static] |
Definition at line 670 of file hmac_link.c.
References dst_context::ctxdata, digest, dst_context::hmacsha224ctx, isc_buffer_add, isc_buffer_availablelength, isc_buffer_used, isc_hmacsha224_sign(), ISC_R_NOSPACE, ISC_R_SUCCESS, and ISC_SHA224_DIGESTLENGTH.
static isc_result_t hmacsha224_verify | ( | dst_context_t * | dctx, | |
const isc_region_t * | sig | |||
) | [static] |
Definition at line 684 of file hmac_link.c.
References isc_region::base, dst_context::ctxdata, DST_R_VERIFYFAILURE, dst_context::hmacsha224ctx, isc_hmacsha224_verify(), ISC_R_SUCCESS, ISC_SHA224_DIGESTLENGTH, and isc_region::length.
static isc_boolean_t hmacsha224_compare | ( | const dst_key_t * | key1, | |
const dst_key_t * | key2 | |||
) | [static] |
Definition at line 697 of file hmac_link.c.
References ISC_FALSE, isc_safe_memcmp(), ISC_SHA224_BLOCK_LENGTH, ISC_TRUE, and dst_hmacsha224_key::key.
static isc_result_t hmacsha224_generate | ( | dst_key_t * | key, | |
int | pseudorandom_ok, | |||
void(*)(int) | callback | |||
) | [static] |
Definition at line 715 of file hmac_link.c.
References dst__entropy_getdata(), hmacsha224_fromdns(), isc_buffer_add, isc_buffer_init, ISC_R_SUCCESS, ISC_SHA224_BLOCK_LENGTH, ISC_TF, and UNUSED.
static isc_boolean_t hmacsha224_isprivate | ( | const dst_key_t * | key | ) | [static] |
static void hmacsha224_destroy | ( | dst_key_t * | key | ) | [static] |
static isc_result_t hmacsha224_todns | ( | const dst_key_t * | key, | |
isc_buffer_t * | data | |||
) | [static] |
Definition at line 761 of file hmac_link.c.
References isc_buffer_availablelength, isc_buffer_putmem, ISC_R_NOSPACE, ISC_R_SUCCESS, dst_hmacsha224_key::key, and REQUIRE.
static isc_result_t hmacsha224_tofile | ( | const dst_key_t * | key, | |
const char * | directory | |||
) | [static] |
Definition at line 811 of file hmac_link.c.
References dst_private_element::data, dst__privstruct_writefile(), DST_R_EXTERNALKEY, DST_R_NULLKEY, dst_private::elements, dst_hmacsha224_key::key, dst_private_element::length, dst_private::nelements, dst_private_element::tag, TAG_HMACSHA224_BITS, and TAG_HMACSHA224_KEY.
static isc_result_t hmacsha224_parse | ( | dst_key_t * | key, | |
isc_lex_t * | lexer, | |||
dst_key_t * | pub | |||
) | [static] |
Definition at line 841 of file hmac_link.c.
References dst_private_element::data, dst__privstruct_free(), dst__privstruct_parse(), DST_ALG_HMACSHA224, DST_R_EXTERNALKEY, DST_R_INVALIDPRIVATEKEY, dst_private::elements, getkeybits(), hmacsha224_fromdns(), isc_buffer_add, isc_buffer_init, ISC_R_SUCCESS, dst_private_element::length, mctx, dst_private::nelements, dst_private_element::tag, TAG_HMACSHA224_BITS, TAG_HMACSHA224_KEY, and UNUSED.
isc_result_t dst__hmacsha224_init | ( | dst_func_t ** | funcp | ) |
Definition at line 909 of file hmac_link.c.
References ISC_R_SUCCESS, and REQUIRE.
Referenced by dst_lib_init2().
static isc_result_t hmacsha256_fromdns | ( | dst_key_t * | key, | |
isc_buffer_t * | data | |||
) | [static] |
Definition at line 1063 of file hmac_link.c.
References isc_region::base, isc_buffer_remainingregion, isc_mem_get, ISC_R_NOMEMORY, ISC_R_SUCCESS, ISC_SHA256_BLOCK_LENGTH, ISC_SHA256_DIGESTLENGTH, isc_sha256_final(), isc_sha256_init(), isc_sha256_update(), dst_hmacsha256_key::key, isc_region::length, and r.
Referenced by hmacsha256_generate(), and hmacsha256_parse().
static isc_result_t hmacsha256_createctx | ( | dst_key_t * | key, | |
dst_context_t * | dctx | |||
) | [static] |
Definition at line 923 of file hmac_link.c.
References dst_context::ctxdata, dst_context::hmacsha256ctx, isc_hmacsha256_init(), isc_mem_get, ISC_R_NOMEMORY, ISC_R_SUCCESS, ISC_SHA256_BLOCK_LENGTH, dst_hmacsha256_key::key, and dst_context::mctx.
static void hmacsha256_destroyctx | ( | dst_context_t * | dctx | ) | [static] |
Definition at line 936 of file hmac_link.c.
References dst_context::ctxdata, dst_context::hmacsha256ctx, isc_hmacsha256_invalidate(), isc_mem_put, and dst_context::mctx.
static isc_result_t hmacsha256_adddata | ( | dst_context_t * | dctx, | |
const isc_region_t * | data | |||
) | [static] |
Definition at line 947 of file hmac_link.c.
References isc_region::base, dst_context::ctxdata, dst_context::hmacsha256ctx, isc_hmacsha256_update(), ISC_R_SUCCESS, and isc_region::length.
static isc_result_t hmacsha256_sign | ( | dst_context_t * | dctx, | |
isc_buffer_t * | sig | |||
) | [static] |
Definition at line 955 of file hmac_link.c.
References dst_context::ctxdata, digest, dst_context::hmacsha256ctx, isc_buffer_add, isc_buffer_availablelength, isc_buffer_used, isc_hmacsha256_sign(), ISC_R_NOSPACE, ISC_R_SUCCESS, and ISC_SHA256_DIGESTLENGTH.
static isc_result_t hmacsha256_verify | ( | dst_context_t * | dctx, | |
const isc_region_t * | sig | |||
) | [static] |
Definition at line 969 of file hmac_link.c.
References isc_region::base, dst_context::ctxdata, DST_R_VERIFYFAILURE, dst_context::hmacsha256ctx, isc_hmacsha256_verify(), ISC_R_SUCCESS, ISC_SHA256_DIGESTLENGTH, and isc_region::length.
static isc_boolean_t hmacsha256_compare | ( | const dst_key_t * | key1, | |
const dst_key_t * | key2 | |||
) | [static] |
Definition at line 982 of file hmac_link.c.
References ISC_FALSE, isc_safe_memcmp(), ISC_SHA256_BLOCK_LENGTH, ISC_TRUE, and dst_hmacsha256_key::key.
static isc_result_t hmacsha256_generate | ( | dst_key_t * | key, | |
int | pseudorandom_ok, | |||
void(*)(int) | callback | |||
) | [static] |
Definition at line 1000 of file hmac_link.c.
References dst__entropy_getdata(), hmacsha256_fromdns(), isc_buffer_add, isc_buffer_init, ISC_R_SUCCESS, ISC_SHA256_BLOCK_LENGTH, ISC_TF, and UNUSED.
static isc_boolean_t hmacsha256_isprivate | ( | const dst_key_t * | key | ) | [static] |
static void hmacsha256_destroy | ( | dst_key_t * | key | ) | [static] |
static isc_result_t hmacsha256_todns | ( | const dst_key_t * | key, | |
isc_buffer_t * | data | |||
) | [static] |
Definition at line 1046 of file hmac_link.c.
References isc_buffer_availablelength, isc_buffer_putmem, ISC_R_NOSPACE, ISC_R_SUCCESS, dst_hmacsha256_key::key, and REQUIRE.
static isc_result_t hmacsha256_tofile | ( | const dst_key_t * | key, | |
const char * | directory | |||
) | [static] |
Definition at line 1096 of file hmac_link.c.
References dst_private_element::data, dst__privstruct_writefile(), DST_R_EXTERNALKEY, DST_R_NULLKEY, dst_private::elements, dst_hmacsha256_key::key, dst_private_element::length, dst_private::nelements, dst_private_element::tag, TAG_HMACSHA256_BITS, and TAG_HMACSHA256_KEY.
static isc_result_t hmacsha256_parse | ( | dst_key_t * | key, | |
isc_lex_t * | lexer, | |||
dst_key_t * | pub | |||
) | [static] |
Definition at line 1126 of file hmac_link.c.
References dst_private_element::data, dst__privstruct_free(), dst__privstruct_parse(), DST_ALG_HMACSHA256, DST_R_EXTERNALKEY, DST_R_INVALIDPRIVATEKEY, dst_private::elements, getkeybits(), hmacsha256_fromdns(), isc_buffer_add, isc_buffer_init, ISC_R_SUCCESS, dst_private_element::length, mctx, dst_private::nelements, dst_private_element::tag, TAG_HMACSHA256_BITS, TAG_HMACSHA256_KEY, and UNUSED.
isc_result_t dst__hmacsha256_init | ( | dst_func_t ** | funcp | ) |
Definition at line 1194 of file hmac_link.c.
References ISC_R_SUCCESS, and REQUIRE.
Referenced by dst_lib_init2().
static isc_result_t hmacsha384_fromdns | ( | dst_key_t * | key, | |
isc_buffer_t * | data | |||
) | [static] |
Definition at line 1348 of file hmac_link.c.
References isc_region::base, isc_buffer_remainingregion, isc_mem_get, ISC_R_NOMEMORY, ISC_R_SUCCESS, ISC_SHA384_BLOCK_LENGTH, ISC_SHA384_DIGESTLENGTH, isc_sha384_final(), isc_sha384_init(), isc_sha384_update(), dst_hmacsha384_key::key, isc_region::length, and r.
Referenced by hmacsha384_generate(), and hmacsha384_parse().
static isc_result_t hmacsha384_createctx | ( | dst_key_t * | key, | |
dst_context_t * | dctx | |||
) | [static] |
Definition at line 1208 of file hmac_link.c.
References dst_context::ctxdata, dst_context::hmacsha384ctx, isc_hmacsha384_init(), isc_mem_get, ISC_R_NOMEMORY, ISC_R_SUCCESS, ISC_SHA384_BLOCK_LENGTH, dst_hmacsha384_key::key, and dst_context::mctx.
static void hmacsha384_destroyctx | ( | dst_context_t * | dctx | ) | [static] |
Definition at line 1221 of file hmac_link.c.
References dst_context::ctxdata, dst_context::hmacsha384ctx, isc_hmacsha384_invalidate(), isc_mem_put, and dst_context::mctx.
static isc_result_t hmacsha384_adddata | ( | dst_context_t * | dctx, | |
const isc_region_t * | data | |||
) | [static] |
Definition at line 1232 of file hmac_link.c.
References isc_region::base, dst_context::ctxdata, dst_context::hmacsha384ctx, isc_hmacsha384_update(), ISC_R_SUCCESS, and isc_region::length.
static isc_result_t hmacsha384_sign | ( | dst_context_t * | dctx, | |
isc_buffer_t * | sig | |||
) | [static] |
Definition at line 1240 of file hmac_link.c.
References dst_context::ctxdata, digest, dst_context::hmacsha384ctx, isc_buffer_add, isc_buffer_availablelength, isc_buffer_used, isc_hmacsha384_sign(), ISC_R_NOSPACE, ISC_R_SUCCESS, and ISC_SHA384_DIGESTLENGTH.
static isc_result_t hmacsha384_verify | ( | dst_context_t * | dctx, | |
const isc_region_t * | sig | |||
) | [static] |
Definition at line 1254 of file hmac_link.c.
References isc_region::base, dst_context::ctxdata, DST_R_VERIFYFAILURE, dst_context::hmacsha384ctx, isc_hmacsha384_verify(), ISC_R_SUCCESS, ISC_SHA384_DIGESTLENGTH, and isc_region::length.
static isc_boolean_t hmacsha384_compare | ( | const dst_key_t * | key1, | |
const dst_key_t * | key2 | |||
) | [static] |
Definition at line 1267 of file hmac_link.c.
References ISC_FALSE, isc_safe_memcmp(), ISC_SHA384_BLOCK_LENGTH, ISC_TRUE, and dst_hmacsha384_key::key.
static isc_result_t hmacsha384_generate | ( | dst_key_t * | key, | |
int | pseudorandom_ok, | |||
void(*)(int) | callback | |||
) | [static] |
Definition at line 1285 of file hmac_link.c.
References dst__entropy_getdata(), hmacsha384_fromdns(), isc_buffer_add, isc_buffer_init, ISC_R_SUCCESS, ISC_SHA384_BLOCK_LENGTH, ISC_TF, and UNUSED.
static isc_boolean_t hmacsha384_isprivate | ( | const dst_key_t * | key | ) | [static] |
static void hmacsha384_destroy | ( | dst_key_t * | key | ) | [static] |
static isc_result_t hmacsha384_todns | ( | const dst_key_t * | key, | |
isc_buffer_t * | data | |||
) | [static] |
Definition at line 1331 of file hmac_link.c.
References isc_buffer_availablelength, isc_buffer_putmem, ISC_R_NOSPACE, ISC_R_SUCCESS, dst_hmacsha384_key::key, and REQUIRE.
static isc_result_t hmacsha384_tofile | ( | const dst_key_t * | key, | |
const char * | directory | |||
) | [static] |
Definition at line 1381 of file hmac_link.c.
References dst_private_element::data, dst__privstruct_writefile(), DST_R_EXTERNALKEY, DST_R_NULLKEY, dst_private::elements, dst_hmacsha384_key::key, dst_private_element::length, dst_private::nelements, dst_private_element::tag, TAG_HMACSHA384_BITS, and TAG_HMACSHA384_KEY.
static isc_result_t hmacsha384_parse | ( | dst_key_t * | key, | |
isc_lex_t * | lexer, | |||
dst_key_t * | pub | |||
) | [static] |
Definition at line 1411 of file hmac_link.c.
References dst_private_element::data, dst__privstruct_free(), dst__privstruct_parse(), DST_ALG_HMACSHA384, DST_R_EXTERNALKEY, DST_R_INVALIDPRIVATEKEY, dst_private::elements, getkeybits(), hmacsha384_fromdns(), isc_buffer_add, isc_buffer_init, ISC_R_SUCCESS, dst_private_element::length, mctx, dst_private::nelements, dst_private_element::tag, TAG_HMACSHA384_BITS, TAG_HMACSHA384_KEY, and UNUSED.
isc_result_t dst__hmacsha384_init | ( | dst_func_t ** | funcp | ) |
Definition at line 1479 of file hmac_link.c.
References ISC_R_SUCCESS, and REQUIRE.
Referenced by dst_lib_init2().
static isc_result_t hmacsha512_fromdns | ( | dst_key_t * | key, | |
isc_buffer_t * | data | |||
) | [static] |
Definition at line 1633 of file hmac_link.c.
References isc_region::base, isc_buffer_remainingregion, isc_mem_get, ISC_R_NOMEMORY, ISC_R_SUCCESS, ISC_SHA512_BLOCK_LENGTH, ISC_SHA512_DIGESTLENGTH, isc_sha512_final(), isc_sha512_init(), isc_sha512_update(), dst_hmacsha512_key::key, isc_region::length, and r.
Referenced by hmacsha512_generate(), and hmacsha512_parse().
static isc_result_t hmacsha512_createctx | ( | dst_key_t * | key, | |
dst_context_t * | dctx | |||
) | [static] |
Definition at line 1493 of file hmac_link.c.
References dst_context::ctxdata, dst_context::hmacsha512ctx, isc_hmacsha512_init(), isc_mem_get, ISC_R_NOMEMORY, ISC_R_SUCCESS, ISC_SHA512_BLOCK_LENGTH, dst_hmacsha512_key::key, and dst_context::mctx.
static void hmacsha512_destroyctx | ( | dst_context_t * | dctx | ) | [static] |
Definition at line 1506 of file hmac_link.c.
References dst_context::ctxdata, dst_context::hmacsha512ctx, isc_hmacsha512_invalidate(), isc_mem_put, and dst_context::mctx.
static isc_result_t hmacsha512_adddata | ( | dst_context_t * | dctx, | |
const isc_region_t * | data | |||
) | [static] |
Definition at line 1517 of file hmac_link.c.
References isc_region::base, dst_context::ctxdata, dst_context::hmacsha512ctx, isc_hmacsha512_update(), ISC_R_SUCCESS, and isc_region::length.
static isc_result_t hmacsha512_sign | ( | dst_context_t * | dctx, | |
isc_buffer_t * | sig | |||
) | [static] |
Definition at line 1525 of file hmac_link.c.
References dst_context::ctxdata, digest, dst_context::hmacsha512ctx, isc_buffer_add, isc_buffer_availablelength, isc_buffer_used, isc_hmacsha512_sign(), ISC_R_NOSPACE, ISC_R_SUCCESS, and ISC_SHA512_DIGESTLENGTH.
static isc_result_t hmacsha512_verify | ( | dst_context_t * | dctx, | |
const isc_region_t * | sig | |||
) | [static] |
Definition at line 1539 of file hmac_link.c.
References isc_region::base, dst_context::ctxdata, DST_R_VERIFYFAILURE, dst_context::hmacsha512ctx, isc_hmacsha512_verify(), ISC_R_SUCCESS, ISC_SHA512_DIGESTLENGTH, and isc_region::length.
static isc_boolean_t hmacsha512_compare | ( | const dst_key_t * | key1, | |
const dst_key_t * | key2 | |||
) | [static] |
Definition at line 1552 of file hmac_link.c.
References ISC_FALSE, isc_safe_memcmp(), ISC_SHA512_BLOCK_LENGTH, ISC_TRUE, and dst_hmacsha512_key::key.
static isc_result_t hmacsha512_generate | ( | dst_key_t * | key, | |
int | pseudorandom_ok, | |||
void(*)(int) | callback | |||
) | [static] |
Definition at line 1570 of file hmac_link.c.
References dst__entropy_getdata(), hmacsha512_fromdns(), isc_buffer_add, isc_buffer_init, ISC_R_SUCCESS, ISC_SHA512_BLOCK_LENGTH, ISC_TF, and UNUSED.
static isc_boolean_t hmacsha512_isprivate | ( | const dst_key_t * | key | ) | [static] |
static void hmacsha512_destroy | ( | dst_key_t * | key | ) | [static] |
static isc_result_t hmacsha512_todns | ( | const dst_key_t * | key, | |
isc_buffer_t * | data | |||
) | [static] |
Definition at line 1616 of file hmac_link.c.
References isc_buffer_availablelength, isc_buffer_putmem, ISC_R_NOSPACE, ISC_R_SUCCESS, dst_hmacsha512_key::key, and REQUIRE.
static isc_result_t hmacsha512_tofile | ( | const dst_key_t * | key, | |
const char * | directory | |||
) | [static] |
Definition at line 1666 of file hmac_link.c.
References dst_private_element::data, dst__privstruct_writefile(), DST_R_EXTERNALKEY, DST_R_NULLKEY, dst_private::elements, dst_hmacsha512_key::key, dst_private_element::length, dst_private::nelements, dst_private_element::tag, TAG_HMACSHA512_BITS, and TAG_HMACSHA512_KEY.
static isc_result_t hmacsha512_parse | ( | dst_key_t * | key, | |
isc_lex_t * | lexer, | |||
dst_key_t * | pub | |||
) | [static] |
Definition at line 1696 of file hmac_link.c.
References dst_private_element::data, dst__privstruct_free(), dst__privstruct_parse(), DST_ALG_HMACSHA512, DST_R_EXTERNALKEY, DST_R_INVALIDPRIVATEKEY, dst_private::elements, getkeybits(), hmacsha512_fromdns(), isc_buffer_add, isc_buffer_init, ISC_R_SUCCESS, dst_private_element::length, mctx, dst_private::nelements, dst_private_element::tag, TAG_HMACSHA512_BITS, TAG_HMACSHA512_KEY, and UNUSED.
isc_result_t dst__hmacsha512_init | ( | dst_func_t ** | funcp | ) |
Definition at line 1764 of file hmac_link.c.
References ISC_R_SUCCESS, and REQUIRE.
Referenced by dst_lib_init2().
dst_func_t hmacmd5_functions [static] |
Initial value:
{ hmacmd5_createctx, NULL, hmacmd5_destroyctx, hmacmd5_adddata, hmacmd5_sign, hmacmd5_verify, NULL, NULL, hmacmd5_compare, NULL, hmacmd5_generate, hmacmd5_isprivate, hmacmd5_destroy, hmacmd5_todns, hmacmd5_fromdns, hmacmd5_tofile, hmacmd5_parse, NULL, NULL, NULL, NULL, }
Definition at line 316 of file hmac_link.c.
dst_func_t hmacsha1_functions [static] |
Initial value:
{ hmacsha1_createctx, NULL, hmacsha1_destroyctx, hmacsha1_adddata, hmacsha1_sign, hmacsha1_verify, NULL, NULL, hmacsha1_compare, NULL, hmacsha1_generate, hmacsha1_isprivate, hmacsha1_destroy, hmacsha1_todns, hmacsha1_fromdns, hmacsha1_tofile, hmacsha1_parse, NULL, NULL, NULL, NULL, }
Definition at line 599 of file hmac_link.c.
dst_func_t hmacsha224_functions [static] |
Initial value:
{ hmacsha224_createctx, NULL, hmacsha224_destroyctx, hmacsha224_adddata, hmacsha224_sign, hmacsha224_verify, NULL, NULL, hmacsha224_compare, NULL, hmacsha224_generate, hmacsha224_isprivate, hmacsha224_destroy, hmacsha224_todns, hmacsha224_fromdns, hmacsha224_tofile, hmacsha224_parse, NULL, NULL, NULL, NULL, }
Definition at line 884 of file hmac_link.c.
dst_func_t hmacsha256_functions [static] |
Initial value:
{ hmacsha256_createctx, NULL, hmacsha256_destroyctx, hmacsha256_adddata, hmacsha256_sign, hmacsha256_verify, NULL, NULL, hmacsha256_compare, NULL, hmacsha256_generate, hmacsha256_isprivate, hmacsha256_destroy, hmacsha256_todns, hmacsha256_fromdns, hmacsha256_tofile, hmacsha256_parse, NULL, NULL, NULL, NULL, }
Definition at line 1169 of file hmac_link.c.
dst_func_t hmacsha384_functions [static] |
Initial value:
{ hmacsha384_createctx, NULL, hmacsha384_destroyctx, hmacsha384_adddata, hmacsha384_sign, hmacsha384_verify, NULL, NULL, hmacsha384_compare, NULL, hmacsha384_generate, hmacsha384_isprivate, hmacsha384_destroy, hmacsha384_todns, hmacsha384_fromdns, hmacsha384_tofile, hmacsha384_parse, NULL, NULL, NULL, NULL, }
Definition at line 1454 of file hmac_link.c.
dst_func_t hmacsha512_functions [static] |
Initial value:
{ hmacsha512_createctx, NULL, hmacsha512_destroyctx, hmacsha512_adddata, hmacsha512_sign, hmacsha512_verify, NULL, NULL, hmacsha512_compare, NULL, hmacsha512_generate, hmacsha512_isprivate, hmacsha512_destroy, hmacsha512_todns, hmacsha512_fromdns, hmacsha512_tofile, hmacsha512_parse, NULL, NULL, NULL, NULL, }
Definition at line 1739 of file hmac_link.c.