From 3d4da25b6c8773005119b9c12f5795861c270a4e Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 14 Dec 2016 23:09:55 -0600 Subject: [PATCH] unit: Tweak style --- unit/test-eap-mschapv2.c | 81 ++++++++++++++++++++++------------------ 1 file changed, 44 insertions(+), 37 deletions(-) diff --git a/unit/test-eap-mschapv2.c b/unit/test-eap-mschapv2.c index e74c6d92..08901b21 100644 --- a/unit/test-eap-mschapv2.c +++ b/unit/test-eap-mschapv2.c @@ -36,46 +36,53 @@ /* https://tools.ietf.org/html/rfc2759 */ const char *user = "User"; const char *nt_password = "clientPass"; -const uint8_t password_hash[] = - { 0x44, 0xEB, 0xBA, 0x8D, - 0x53, 0x12, 0xB8, 0xD6, - 0x11, 0x47, 0x44, 0x11, - 0xF5, 0x69, 0x89, 0xAE}; -const uint8_t server_challenge[] = - { 0x5B, 0x5D, 0x7C, 0x7D, - 0x7B, 0x3F, 0x2F, 0x3E, - 0x3C, 0x2C, 0x60, 0x21, - 0x32, 0x26, 0x26, 0x28}; -const uint8_t peer_challenge[] = - { 0x21, 0x40, 0x23, 0x24, - 0x25, 0x5E, 0x26, 0x2A, - 0x28, 0x29, 0x5F, 0x2B, - 0x3A, 0x33, 0x7C, 0x7E}; -const uint8_t nt_response[] = - { 0x82, 0x30, 0x9E, 0xCD, - 0x8D, 0x70, 0x8B, 0x5E, - 0xA0, 0x8F, 0xAA, 0x39, - 0x81, 0xCD, 0x83, 0x54, - 0x42, 0x33, 0x11, 0x4A, - 0x3D, 0x85, 0xD6, 0xDF}; -const uint8_t password_hash_hash[] = - { 0x41, 0xC0, 0x0C, 0x58, - 0x4B, 0xD2, 0xD9, 0x1C, - 0x40, 0x17, 0xA2, 0xA1, - 0x2F, 0xA5, 0x9F, 0x3F}; +const uint8_t password_hash[] = { + 0x44, 0xEB, 0xBA, 0x8D, + 0x53, 0x12, 0xB8, 0xD6, + 0x11, 0x47, 0x44, 0x11, + 0xF5, 0x69, 0x89, 0xAE +}; +const uint8_t server_challenge[] = { + 0x5B, 0x5D, 0x7C, 0x7D, + 0x7B, 0x3F, 0x2F, 0x3E, + 0x3C, 0x2C, 0x60, 0x21, + 0x32, 0x26, 0x26, 0x28 +}; +const uint8_t peer_challenge[] = { + 0x21, 0x40, 0x23, 0x24, + 0x25, 0x5E, 0x26, 0x2A, + 0x28, 0x29, 0x5F, 0x2B, + 0x3A, 0x33, 0x7C, 0x7E +}; +const uint8_t nt_response[] = { + 0x82, 0x30, 0x9E, 0xCD, + 0x8D, 0x70, 0x8B, 0x5E, + 0xA0, 0x8F, 0xAA, 0x39, + 0x81, 0xCD, 0x83, 0x54, + 0x42, 0x33, 0x11, 0x4A, + 0x3D, 0x85, 0xD6, 0xDF +}; +const uint8_t password_hash_hash[] = { + 0x41, 0xC0, 0x0C, 0x58, + 0x4B, 0xD2, 0xD9, 0x1C, + 0x40, 0x17, 0xA2, 0xA1, + 0x2F, 0xA5, 0x9F, 0x3F +}; const char *authenticator_response = "S=407A5589115FD0D6209F510FE9C04566932CDA56"; /* https://tools.ietf.org/html/draft-ietf-pppext-mschapv2-keys-02 */ -const uint8_t master_key[] = - { 0xFD, 0xEC, 0xE3, 0x71, - 0x7A, 0x8C, 0x83, 0x8C, - 0xB3, 0x88, 0xE5, 0x27, - 0xAE, 0x3C, 0xDD, 0x31}; -const uint8_t m_session_key[] = - { 0x8B, 0x7C, 0xDC, 0x14, - 0x9B, 0x99, 0x3A, 0x1B, - 0xA1, 0x18, 0xCB, 0x15, - 0x3F, 0x56, 0xDC, 0xCB}; +const uint8_t master_key[] = { + 0xFD, 0xEC, 0xE3, 0x71, + 0x7A, 0x8C, 0x83, 0x8C, + 0xB3, 0x88, 0xE5, 0x27, + 0xAE, 0x3C, 0xDD, 0x31 +}; +const uint8_t m_session_key[] = { + 0x8B, 0x7C, 0xDC, 0x14, + 0x9B, 0x99, 0x3A, 0x1B, + 0xA1, 0x18, 0xCB, 0x15, + 0x3F, 0x56, 0xDC, 0xCB +}; static void test_nt_password_hash(const void *data) {