summaryrefslogtreecommitdiff
path: root/src/auth_algo.h
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-01-05 14:05:09 +0000
committerChristian Pointner <equinox@anytun.org>2009-01-05 14:05:09 +0000
commit4f47c1aef9ab67cd8c2626983847950f89ffaaeb (patch)
tree211f7990d9001b49dfbf2e8bf53ba0730c3db143 /src/auth_algo.h
parentremoved 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.h8
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;