From e8c117aa01ac48fa2cf022810543bd97a0e44e57 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 21 Jun 2014 16:48:26 +0000 Subject: refactored crypto lib selection --- src/auth_algo.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/auth_algo.h') diff --git a/src/auth_algo.h b/src/auth_algo.h index c3caaa6..2c20410 100644 --- a/src/auth_algo.h +++ b/src/auth_algo.h @@ -36,10 +36,10 @@ #ifndef UANYTUN_auth_algo_h_INCLUDED #define UANYTUN_auth_algo_h_INCLUDED -#ifndef USE_SSL_CRYPTO -#include -#else +#ifdef USE_SSL_CRYPTO #include +#else // USE_GCRYPT is the default +#include #endif #include "key_derivation.h" #include "encrypted_packet.h" @@ -66,10 +66,10 @@ int auth_algo_check_tag(auth_algo_t* aa, key_derivation_t* kd, key_derivation_di #define SHA1_LENGTH 20 struct auth_algo_sha1_param_struct { -#ifndef USE_SSL_CRYPTO - gcry_md_hd_t handle_; -#else +#ifdef USE_SSL_CRYPTO HMAC_CTX ctx_; +#else // USE_GCRYPT is the default + gcry_md_hd_t handle_; #endif }; typedef struct auth_algo_sha1_param_struct auth_algo_sha1_param_t; -- cgit v1.2.3