dst_internal.h revision e09cdbac087b88524ac40e943d040e2a032c48f2
/*
* Portions Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
* Portions Copyright (C) 2000-2002 Internet Software Consortium.
*
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NETWORK ASSOCIATES DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE
* FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Portions Copyright (C) 1995-2000 by Network Associates, Inc.
*
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC AND NETWORK ASSOCIATES DISCLAIMS
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE
* FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dst_internal.h,v 1.23 2009/10/27 22:25:37 marka Exp $ */
#ifndef DST_DST_INTERNAL_H
#define DST_DST_INTERNAL_H 1
#ifdef OPENSSL
#endif
extern isc_mem_t *dst__memory_pool;
/***
*** Types
***/
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;
/*% DST Key Structure */
struct dst_key {
unsigned int magic;
unsigned int key_size; /*%< size of the key in bits */
unsigned int key_proto; /*%< protocols this key is used for */
unsigned int key_alg; /*%< algorithm of the key */
char *engine; /*%< engine name (HSM) */
char *label; /*%< engine label (HSM) */
union {
void *generic;
#ifdef OPENSSL
#endif
#endif
} keydata; /*%< pointer to key in crypto pkg fmt */
int fmt_major; /*%< private key format, major version */
int fmt_minor; /*%< private key format, minor version */
};
struct dst_context {
unsigned int magic;
union {
void *generic;
#ifdef OPENSSL
#endif
} ctxdata;
};
struct dst_func {
/*
* Context functions
*/
/*
* Key operations
*/
void (*callback)(int));
/* conversion functions */
/* cleanup */
void (*cleanup)(void);
};
/*%
* Initializers
*/
unsigned char algorithm);
/*%
* Destructors
*/
void dst__openssl_destroy(void);
/*%
* Memory allocators using the DST memory pool.
*/
void dst__mem_free(void *ptr);
/*%
* Entropy retriever using the DST entropy pool.
*/
/*
* Entropy status hook.
*/
unsigned int dst__entropy_status(void);
#endif /* DST_DST_INTERNAL_H */
/*! \file */