EAP-MSCHAPv2 support finished
This commit is contained in:
@@ -99,16 +99,16 @@ eap::challenge_hash::challenge_hash()
|
||||
|
||||
eap::challenge_hash::challenge_hash(
|
||||
_In_ HCRYPTPROV cp,
|
||||
_In_ const challenge_mschapv2 &challenge_server,
|
||||
_In_ const sanitizing_blob &challenge_server,
|
||||
_In_ const challenge_mschapv2 &challenge_client,
|
||||
_In_z_ const char *username)
|
||||
{
|
||||
crypt_hash hash;
|
||||
if (!hash.create(cp, CALG_SHA))
|
||||
throw win_runtime_error(__FUNCTION__ " Creating SHA hash failed.");
|
||||
if (!CryptHashData(hash, (const BYTE*)&challenge_client, (DWORD)sizeof(challenge_client), 0) ||
|
||||
!CryptHashData(hash, (const BYTE*)&challenge_server, (DWORD)sizeof(challenge_server), 0) ||
|
||||
!CryptHashData(hash, (const BYTE*)username , (DWORD)strlen(username) , 0))
|
||||
if (!CryptHashData(hash, (const BYTE*)&challenge_client , (DWORD)sizeof(challenge_client), 0) ||
|
||||
!CryptHashData(hash, challenge_server.data(), (DWORD)challenge_server.size() , 0) ||
|
||||
!CryptHashData(hash, (const BYTE*)username , (DWORD)strlen(username) , 0))
|
||||
throw win_runtime_error(__FUNCTION__ " Error hashing data.");
|
||||
unsigned char hash_val[20];
|
||||
DWORD size_hash_val = sizeof(hash_val);
|
||||
@@ -201,7 +201,7 @@ eap::nt_response::nt_response()
|
||||
|
||||
eap::nt_response::nt_response(
|
||||
_In_ HCRYPTPROV cp,
|
||||
_In_ const challenge_mschapv2 &challenge_server,
|
||||
_In_ const sanitizing_blob &challenge_server,
|
||||
_In_ const challenge_mschapv2 &challenge_client,
|
||||
_In_z_ const char *username,
|
||||
_In_z_ const wchar_t *password)
|
||||
@@ -270,7 +270,7 @@ eap::authenticator_response::authenticator_response()
|
||||
|
||||
eap::authenticator_response::authenticator_response(
|
||||
_In_ HCRYPTPROV cp,
|
||||
_In_ const challenge_mschapv2 &challenge_server,
|
||||
_In_ const sanitizing_blob &challenge_server,
|
||||
_In_ const challenge_mschapv2 &challenge_client,
|
||||
_In_z_ const char *username,
|
||||
_In_z_ const wchar_t *password,
|
||||
|
Reference in New Issue
Block a user