diff options
Diffstat (limited to 'programs/pluto/ike_alg.h')
-rw-r--r-- | programs/pluto/ike_alg.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/programs/pluto/ike_alg.h b/programs/pluto/ike_alg.h index a41718c04..32f6e8be0 100644 --- a/programs/pluto/ike_alg.h +++ b/programs/pluto/ike_alg.h @@ -11,7 +11,7 @@ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * - * RCSID $Id: ike_alg.h,v 1.3 2004/09/16 23:22:22 as Exp $ + * RCSID $Id: ike_alg.h,v 1.4 2007/02/21 14:21:48 as Exp $ */ #ifndef _IKE_ALG_H @@ -38,13 +38,33 @@ struct encrypt_desc { void (*do_crypt)(u_int8_t *dat, size_t datasize, u_int8_t *key, size_t key_size, u_int8_t *iv, bool enc); }; +typedef struct hash_testvector hash_testvector_t; + +struct hash_testvector { + const size_t msg_size; + const u_char *msg; + const u_char *msg_digest; +}; + +typedef struct hmac_testvector hmac_testvector_t; + +struct hmac_testvector { + const size_t key_size; + const u_char *key; + const size_t msg_size; + const u_char *msg; + const u_char *hmac; +}; struct hash_desc { u_int16_t algo_type; u_int16_t algo_id; struct ike_alg *algo_next; size_t hash_ctx_size; + size_t hash_block_size; size_t hash_digest_size; + const hash_testvector_t *hash_testvectors; + const hmac_testvector_t *hmac_testvectors; void (*hash_init)(void *ctx); void (*hash_update)(void *ctx, const u_int8_t *in, size_t datasize); void (*hash_final)(u_int8_t *out, void *ctx); @@ -66,6 +86,7 @@ extern const struct oakley_group_desc* ike_alg_pfsgroup(struct connection *c extern struct db_context * ike_alg_db_new(struct alg_info_ike *ai, lset_t policy); extern void ike_alg_list(void); extern void ike_alg_show_connection(struct connection *c, const char *instance); +extern bool ike_alg_test(void); extern bool ike_alg_ok_final(u_int ealg, u_int key_len, u_int aalg, u_int group , struct alg_info_ike *alg_info_ike); extern int ike_alg_init(void); |