diff options
author | Christian Pointner <equinox@anytun.org> | 2009-01-05 14:05:09 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2009-01-05 14:05:09 +0000 |
commit | 4f47c1aef9ab67cd8c2626983847950f89ffaaeb (patch) | |
tree | 211f7990d9001b49dfbf2e8bf53ba0730c3db143 /src/auth_algo.h | |
parent | removed silly anytun 02 compat handling (diff) |
added libssl crypto based auth algo HMAC-Sha1
Diffstat (limited to 'src/auth_algo.h')
-rw-r--r-- | src/auth_algo.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/auth_algo.h b/src/auth_algo.h index f77ae75..3c00dd6 100644 --- a/src/auth_algo.h +++ b/src/auth_algo.h @@ -35,7 +35,11 @@ #ifndef _AUTH_ALGO_H_ #define _AUTH_ALGO_H_ +#ifndef USE_SSL_CRYPTO #include <gcrypt.h> +#else +#include <openssl/hmac.h> +#endif #include "key_derivation.h" enum auth_algo_type_enum { aa_unknown, aa_null, aa_sha1 }; @@ -58,7 +62,11 @@ int auth_algo_check_tag(auth_algo_t* aa, key_derivation_t* kd, encrypted_packet_ #define SHA1_LENGTH 20 struct auth_algo_sha1_param_struct { +#ifndef USE_SSL_CRYPTO gcry_md_hd_t handle_; +#else + HMAC_CTX ctx_; +#endif }; typedef struct auth_algo_sha1_param_struct auth_algo_sha1_param_t; |