3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-30 06:02:39 +01:00

eap-mschapv2: Fixup some style issues

This commit is contained in:
Denis Kenzior 2016-12-14 23:07:02 -06:00
parent 214603e68f
commit aca4641fad

View File

@ -310,9 +310,13 @@ bool mschapv2_generate_nt_response(const uint8_t password_hash[static 16],
challenge))
return false;
if (!mschapv2_des_encrypt(challenge, buffer + 0, response + 0)
|| !mschapv2_des_encrypt(challenge, buffer + 7, response + 8)
|| !mschapv2_des_encrypt(challenge, buffer + 14, response + 16))
if (!mschapv2_des_encrypt(challenge, buffer + 0, response + 0))
return false;
if (!mschapv2_des_encrypt(challenge, buffer + 7, response + 8))
return false;
if (!mschapv2_des_encrypt(challenge, buffer + 14, response + 16))
return false;
return true;
@ -339,18 +343,20 @@ bool mschapv2_generate_authenticator_response(
const uint8_t server_challenge[static 16],
const char *user, char response[static 42])
{
static const uint8_t magic1[] =
{ 0x4D, 0x61, 0x67, 0x69, 0x63, 0x20, 0x73, 0x65, 0x72, 0x76,
0x65, 0x72, 0x20, 0x74, 0x6F, 0x20, 0x63, 0x6C, 0x69, 0x65,
0x6E, 0x74, 0x20, 0x73, 0x69, 0x67, 0x6E, 0x69, 0x6E, 0x67,
0x20, 0x63, 0x6F, 0x6E, 0x73, 0x74, 0x61, 0x6E, 0x74};
static const uint8_t magic1[] = {
0x4D, 0x61, 0x67, 0x69, 0x63, 0x20, 0x73, 0x65, 0x72, 0x76,
0x65, 0x72, 0x20, 0x74, 0x6F, 0x20, 0x63, 0x6C, 0x69, 0x65,
0x6E, 0x74, 0x20, 0x73, 0x69, 0x67, 0x6E, 0x69, 0x6E, 0x67,
0x20, 0x63, 0x6F, 0x6E, 0x73, 0x74, 0x61, 0x6E, 0x74
};
static const uint8_t magic2[] =
{ 0x50, 0x61, 0x64, 0x20, 0x74, 0x6F, 0x20, 0x6D, 0x61, 0x6B,
0x65, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6F, 0x20, 0x6D, 0x6F,
0x72, 0x65, 0x20, 0x74, 0x68, 0x61, 0x6E, 0x20, 0x6F, 0x6E,
0x65, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6F,
0x6E};
static const uint8_t magic2[] = {
0x50, 0x61, 0x64, 0x20, 0x74, 0x6F, 0x20, 0x6D, 0x61, 0x6B,
0x65, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6F, 0x20, 0x6D, 0x6F,
0x72, 0x65, 0x20, 0x74, 0x68, 0x61, 0x6E, 0x20, 0x6F, 0x6E,
0x65, 0x20, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6F,
0x6E
};
uint8_t digest[20];
uint8_t challenge[8];