dst_internal.h File Reference

#include <isc/lang.h>
#include <isc/buffer.h>
#include <isc/int.h>
#include <isc/magic.h>
#include <isc/region.h>
#include <isc/types.h>
#include <isc/md5.h>
#include <isc/refcount.h>
#include <isc/sha1.h>
#include <isc/sha2.h>
#include <isc/stdtime.h>
#include <isc/hmacmd5.h>
#include <isc/hmacsha.h>
#include <dns/time.h>
#include <dst/dst.h>

Go to the source code of this file.

Data Structures

struct  dst_key
 DST Key Structure. More...
struct  dst_context
struct  dst_func

Defines

#define DST_DST_INTERNAL_H   1
#define KEY_MAGIC   ISC_MAGIC('D','S','T','K')
#define CTX_MAGIC   ISC_MAGIC('D','S','T','C')
#define VALID_KEY(x)   ISC_MAGIC_VALID(x, KEY_MAGIC)
#define VALID_CTX(x)   ISC_MAGIC_VALID(x, CTX_MAGIC)
#define dst__pkcs11_init   pk11_initialize
#define dst__pkcs11_destroy   pk11_finalize

Typedefs

typedef struct dst_func dst_func_t
typedef struct dst_hmacmd5_key dst_hmacmd5_key_t
typedef struct dst_hmacsha1_key dst_hmacsha1_key_t
typedef struct dst_hmacsha224_key dst_hmacsha224_key_t
typedef struct dst_hmacsha256_key dst_hmacsha256_key_t
typedef struct dst_hmacsha384_key dst_hmacsha384_key_t
typedef struct dst_hmacsha512_key dst_hmacsha512_key_t

Enumerations

enum  dst_use_t { DO_SIGN, DO_VERIFY }
 Indicate whether a DST context will be used for signing or for verification. More...

Functions

isc_result_t dst__openssl_init (const char *engine)
 Initializers.
isc_result_t dst__hmacmd5_init (struct dst_func **funcp)
isc_result_t dst__hmacsha1_init (struct dst_func **funcp)
isc_result_t dst__hmacsha224_init (struct dst_func **funcp)
isc_result_t dst__hmacsha256_init (struct dst_func **funcp)
isc_result_t dst__hmacsha384_init (struct dst_func **funcp)
isc_result_t dst__hmacsha512_init (struct dst_func **funcp)
isc_result_t dst__opensslrsa_init (struct dst_func **funcp, unsigned char algorithm)
isc_result_t dst__pkcs11rsa_init (struct dst_func **funcp)
isc_result_t dst__openssldsa_init (struct dst_func **funcp)
isc_result_t dst__pkcs11dsa_init (struct dst_func **funcp)
isc_result_t dst__openssldh_init (struct dst_func **funcp)
isc_result_t dst__pkcs11dh_init (struct dst_func **funcp)
isc_result_t dst__gssapi_init (struct dst_func **funcp)
void dst__openssl_destroy (void)
 Destructors.
void * dst__mem_alloc (size_t size)
 Memory allocators using the DST memory pool.
void dst__mem_free (void *ptr)
void * dst__mem_realloc (void *ptr, size_t size)
isc_result_t dst__entropy_getdata (void *buf, unsigned int len, isc_boolean_t pseudo)
 Entropy retriever using the DST entropy pool.
unsigned int dst__entropy_status (void)

Variables

isc_mem_tdst__memory_pool


Detailed Description

Definition in file dst_internal.h.


Define Documentation

#define DST_DST_INTERNAL_H   1

Definition at line 35 of file dst_internal.h.

#define KEY_MAGIC   ISC_MAGIC('D','S','T','K')

Definition at line 66 of file dst_internal.h.

Referenced by get_key_struct().

#define CTX_MAGIC   ISC_MAGIC('D','S','T','C')

Definition at line 67 of file dst_internal.h.

Referenced by dst_context_create4().

#define VALID_KEY (  )     ISC_MAGIC_VALID(x, KEY_MAGIC)

Definition at line 69 of file dst_internal.h.

Referenced by comparekeys(), dst_context_create4(), dst_key_alg(), dst_key_attach(), dst_key_buildfilename(), dst_key_class(), dst_key_computesecret(), dst_key_dump(), dst_key_flags(), dst_key_free(), dst_key_getbits(), dst_key_getnum(), dst_key_getprivateformat(), dst_key_gettime(), dst_key_getttl(), dst_key_id(), dst_key_inactive(), dst_key_isnullkey(), dst_key_isprivate(), dst_key_iszonekey(), dst_key_name(), dst_key_paramcompare(), dst_key_privatefrombuffer(), dst_key_proto(), dst_key_rid(), dst_key_secretsize(), dst_key_setbits(), dst_key_setflags(), dst_key_setinactive(), dst_key_setnum(), dst_key_setprivateformat(), dst_key_settime(), dst_key_setttl(), dst_key_sigsize(), dst_key_size(), dst_key_tkeytoken(), dst_key_tobuffer(), dst_key_todns(), dst_key_tofile(), dst_key_unsetnum(), dst_key_unsettime(), issymmetric(), and write_public_key().

#define VALID_CTX (  )     ISC_MAGIC_VALID(x, CTX_MAGIC)

Definition at line 70 of file dst_internal.h.

Referenced by dst_context_adddata(), dst_context_destroy(), dst_context_sign(), dst_context_verify(), and dst_context_verify2().

#define dst__pkcs11_init   pk11_initialize

Definition at line 225 of file dst_internal.h.

Referenced by dst_lib_init2().

#define dst__pkcs11_destroy   pk11_finalize

Definition at line 258 of file dst_internal.h.

Referenced by dst_lib_destroy().


Typedef Documentation

typedef struct dst_func dst_func_t

Definition at line 78 of file dst_internal.h.

typedef struct dst_hmacmd5_key dst_hmacmd5_key_t

Definition at line 80 of file dst_internal.h.

typedef struct dst_hmacsha1_key dst_hmacsha1_key_t

Definition at line 81 of file dst_internal.h.

typedef struct dst_hmacsha224_key dst_hmacsha224_key_t

Definition at line 82 of file dst_internal.h.

typedef struct dst_hmacsha256_key dst_hmacsha256_key_t

Definition at line 83 of file dst_internal.h.

typedef struct dst_hmacsha384_key dst_hmacsha384_key_t

Definition at line 84 of file dst_internal.h.

typedef struct dst_hmacsha512_key dst_hmacsha512_key_t

Definition at line 85 of file dst_internal.h.


Enumeration Type Documentation

enum dst_use_t

Indicate whether a DST context will be used for signing or for verification.

Enumerator:
DO_SIGN 
DO_VERIFY 

Definition at line 91 of file dst_internal.h.


Function Documentation

isc_result_t dst__openssl_init ( const char *  engine  ) 

Initializers.

Referenced by dst_lib_init2().

isc_result_t dst__hmacmd5_init ( struct dst_func **  funcp  ) 

Definition at line 341 of file hmac_link.c.

References ISC_R_SUCCESS, and REQUIRE.

Referenced by dst_lib_init2().

isc_result_t dst__hmacsha1_init ( struct dst_func **  funcp  ) 

Definition at line 624 of file hmac_link.c.

References ISC_R_SUCCESS, and REQUIRE.

Referenced by dst_lib_init2().

isc_result_t dst__hmacsha224_init ( struct dst_func **  funcp  ) 

Definition at line 909 of file hmac_link.c.

References ISC_R_SUCCESS, and REQUIRE.

Referenced by dst_lib_init2().

isc_result_t dst__hmacsha256_init ( struct dst_func **  funcp  ) 

Definition at line 1194 of file hmac_link.c.

References ISC_R_SUCCESS, and REQUIRE.

Referenced by dst_lib_init2().

isc_result_t dst__hmacsha384_init ( struct dst_func **  funcp  ) 

Definition at line 1479 of file hmac_link.c.

References ISC_R_SUCCESS, and REQUIRE.

Referenced by dst_lib_init2().

isc_result_t dst__hmacsha512_init ( struct dst_func **  funcp  ) 

Definition at line 1764 of file hmac_link.c.

References ISC_R_SUCCESS, and REQUIRE.

Referenced by dst_lib_init2().

isc_result_t dst__opensslrsa_init ( struct dst_func **  funcp,
unsigned char  algorithm 
)

Referenced by dst_lib_init2().

isc_result_t dst__pkcs11rsa_init ( struct dst_func **  funcp  ) 

Referenced by dst_lib_init2().

isc_result_t dst__openssldsa_init ( struct dst_func **  funcp  ) 

Referenced by dst_lib_init2().

isc_result_t dst__pkcs11dsa_init ( struct dst_func **  funcp  ) 

Referenced by dst_lib_init2().

isc_result_t dst__openssldh_init ( struct dst_func **  funcp  ) 

Referenced by dst_lib_init2().

isc_result_t dst__pkcs11dh_init ( struct dst_func **  funcp  ) 

Referenced by dst_lib_init2().

isc_result_t dst__gssapi_init ( struct dst_func **  funcp  ) 

Referenced by dst_lib_init2().

void dst__openssl_destroy ( void   ) 

Destructors.

Referenced by dst_lib_destroy().

void* dst__mem_alloc ( size_t  size  ) 

Memory allocators using the DST memory pool.

void dst__mem_free ( void *  ptr  ) 

void* dst__mem_realloc ( void *  ptr,
size_t  size 
)

isc_result_t dst__entropy_getdata ( void *  buf,
unsigned int  len,
isc_boolean_t  pseudo 
)

Entropy retriever using the DST entropy pool.

Definition at line 1920 of file dst_api.c.

References dst_entropy_flags, ISC_ENTROPY_BLOCKING, isc_entropy_getdata(), ISC_ENTROPY_GOODONLY, ISC_R_FAILURE, ISC_R_SUCCESS, pk11_rand_bytes(), and UNUSED.

Referenced by hmacmd5_generate(), hmacsha1_generate(), hmacsha224_generate(), hmacsha256_generate(), hmacsha384_generate(), hmacsha512_generate(), and process_dhtkey().

unsigned int dst__entropy_status ( void   ) 

Definition at line 1943 of file dst_api.c.

References dst_entropy_flags, INSIST, isc_entropy_getdata(), ISC_ENTROPY_GOODONLY, isc_entropy_putdata(), isc_entropy_status(), ISC_FALSE, ISC_R_SUCCESS, and ISC_TRUE.


Variable Documentation

isc_mem_t* dst__memory_pool

Definition at line 85 of file dst_api.c.

Referenced by dst_lib_destroy(), and dst_lib_init2().


Generated on Tue Apr 28 17:41:08 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha