aboutsummaryrefslogtreecommitdiff
path: root/crypto.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-12-29 07:47:47 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-12-29 07:47:47 +0000
commite5d281cf2fb283478a60948b2fda69488c0ad75b (patch)
tree118270c8c3a237472610f2ecde7d92fd7f14a215 /crypto.c
parentsvn merge -r 854:863 $SO/trunk/openvpn (diff)
downloadopenvpn-e5d281cf2fb283478a60948b2fda69488c0ad75b.tar.xz
Fixed bug with tls-auth and key-direction parameter
which was introduced in r844. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@865 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'crypto.c')
-rw-r--r--crypto.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto.c b/crypto.c
index 5ddc269..21ff5d9 100644
--- a/crypto.c
+++ b/crypto.c
@@ -910,6 +910,7 @@ void
get_tls_handshake_key (const struct key_type *key_type,
struct key_ctx_bi *ctx,
const char *passphrase_file,
+ const int key_direction,
const unsigned int flags)
{
if (passphrase_file && key_type->hmac_length)
@@ -970,7 +971,7 @@ get_tls_handshake_key (const struct key_type *key_type,
}
/* handle key direction */
- key_direction_state_init (&kds, BOOL_CAST (flags & GHK_KEY_DIR));
+ key_direction_state_init (&kds, key_direction);
must_have_n_keys (passphrase_file, "tls-auth", &key2, kds.need_keys);
/* initialize hmac key in both directions */