mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-02 01:02:34 +01:00
eap-mschapv2: Fixup some style issues
This commit is contained in:
parent
214603e68f
commit
aca4641fad
@ -310,9 +310,13 @@ bool mschapv2_generate_nt_response(const uint8_t password_hash[static 16],
|
|||||||
challenge))
|
challenge))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!mschapv2_des_encrypt(challenge, buffer + 0, response + 0)
|
if (!mschapv2_des_encrypt(challenge, buffer + 0, response + 0))
|
||||||
|| !mschapv2_des_encrypt(challenge, buffer + 7, response + 8)
|
return false;
|
||||||
|| !mschapv2_des_encrypt(challenge, buffer + 14, response + 16))
|
|
||||||
|
if (!mschapv2_des_encrypt(challenge, buffer + 7, response + 8))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (!mschapv2_des_encrypt(challenge, buffer + 14, response + 16))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -339,18 +343,20 @@ bool mschapv2_generate_authenticator_response(
|
|||||||
const uint8_t server_challenge[static 16],
|
const uint8_t server_challenge[static 16],
|
||||||
const char *user, char response[static 42])
|
const char *user, char response[static 42])
|
||||||
{
|
{
|
||||||
static const uint8_t magic1[] =
|
static const uint8_t magic1[] = {
|
||||||
{ 0x4D, 0x61, 0x67, 0x69, 0x63, 0x20, 0x73, 0x65, 0x72, 0x76,
|
0x4D, 0x61, 0x67, 0x69, 0x63, 0x20, 0x73, 0x65, 0x72, 0x76,
|
||||||
0x65, 0x72, 0x20, 0x74, 0x6F, 0x20, 0x63, 0x6C, 0x69, 0x65,
|
0x65, 0x72, 0x20, 0x74, 0x6F, 0x20, 0x63, 0x6C, 0x69, 0x65,
|
||||||
0x6E, 0x74, 0x20, 0x73, 0x69, 0x67, 0x6E, 0x69, 0x6E, 0x67,
|
0x6E, 0x74, 0x20, 0x73, 0x69, 0x67, 0x6E, 0x69, 0x6E, 0x67,
|
||||||
0x20, 0x63, 0x6F, 0x6E, 0x73, 0x74, 0x61, 0x6E, 0x74};
|
0x20, 0x63, 0x6F, 0x6E, 0x73, 0x74, 0x61, 0x6E, 0x74
|
||||||
|
};
|
||||||
|
|
||||||
static const uint8_t magic2[] =
|
static const uint8_t magic2[] = {
|
||||||
{ 0x50, 0x61, 0x64, 0x20, 0x74, 0x6F, 0x20, 0x6D, 0x61, 0x6B,
|
0x50, 0x61, 0x64, 0x20, 0x74, 0x6F, 0x20, 0x6D, 0x61, 0x6B,
|
||||||
0x65, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6F, 0x20, 0x6D, 0x6F,
|
0x65, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6F, 0x20, 0x6D, 0x6F,
|
||||||
0x72, 0x65, 0x20, 0x74, 0x68, 0x61, 0x6E, 0x20, 0x6F, 0x6E,
|
0x72, 0x65, 0x20, 0x74, 0x68, 0x61, 0x6E, 0x20, 0x6F, 0x6E,
|
||||||
0x65, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6F,
|
0x65, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6F,
|
||||||
0x6E};
|
0x6E
|
||||||
|
};
|
||||||
|
|
||||||
uint8_t digest[20];
|
uint8_t digest[20];
|
||||||
uint8_t challenge[8];
|
uint8_t challenge[8];
|
||||||
|
Loading…
Reference in New Issue
Block a user