From 5955cfaacdc1d6afbc5b5cd35a626a0c6e950c3b Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 29 Mar 2015 22:27:00 +0300 Subject: [PATCH] ms_funcs: Make challenge_hash() non-static This function can be of use outside ms_funcs.c. Signed-off-by: Jouni Malinen --- src/crypto/ms_funcs.c | 5 ++--- src/crypto/ms_funcs.h | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/crypto/ms_funcs.c b/src/crypto/ms_funcs.c index 49a5c1c24..5f5765603 100644 --- a/src/crypto/ms_funcs.c +++ b/src/crypto/ms_funcs.c @@ -78,9 +78,8 @@ static int utf8_to_ucs2(const u8 *utf8_string, size_t utf8_string_len, * @challenge: 8-octet Challenge (OUT) * Returns: 0 on success, -1 on failure */ -static int challenge_hash(const u8 *peer_challenge, const u8 *auth_challenge, - const u8 *username, size_t username_len, - u8 *challenge) +int challenge_hash(const u8 *peer_challenge, const u8 *auth_challenge, + const u8 *username, size_t username_len, u8 *challenge) { u8 hash[SHA1_MAC_LEN]; const unsigned char *addr[3]; diff --git a/src/crypto/ms_funcs.h b/src/crypto/ms_funcs.h index bd9bfee95..b5b5918e1 100644 --- a/src/crypto/ms_funcs.h +++ b/src/crypto/ms_funcs.h @@ -33,6 +33,8 @@ int nt_challenge_response(const u8 *challenge, const u8 *password, void challenge_response(const u8 *challenge, const u8 *password_hash, u8 *response); +int challenge_hash(const u8 *peer_challenge, const u8 *auth_challenge, + const u8 *username, size_t username_len, u8 *challenge); int nt_password_hash(const u8 *password, size_t password_len, u8 *password_hash); int hash_nt_password_hash(const u8 *password_hash, u8 *password_hash_hash);