From 58b13392f4f59e41ca130b5ad1013787915a0d46 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 5 Jan 2009 11:35:09 +0000 Subject: added alternative implementation of key derivation using ssl crypto library --- src/key_derivation.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/key_derivation.h') diff --git a/src/key_derivation.h b/src/key_derivation.h index e95c276..2f1bfb5 100644 --- a/src/key_derivation.h +++ b/src/key_derivation.h @@ -35,7 +35,11 @@ #ifndef _KEY_DERIVATION_H_ #define _KEY_DERIVATION_H_ +#ifndef USE_SSL_CRYPTO #include +#else +#include +#endif #define KD_LABEL_COUNT 3 enum satp_prf_label_enum { @@ -101,7 +105,12 @@ union __attribute__((__packed__)) key_derivation_aesctr_ctr_union { typedef union key_derivation_aesctr_ctr_union key_derivation_aesctr_ctr_t; struct key_derivation_aesctr_param_struct { +#ifndef USE_SSL_CRYPTO gcry_cipher_hd_t handle_; +#else + AES_KEY aes_key_; + u_int8_t ecount_buf[AES_BLOCK_SIZE]; +#endif key_derivation_aesctr_ctr_t ctr_; }; typedef struct key_derivation_aesctr_param_struct key_derivation_aesctr_param_t; -- cgit v1.2.3