OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // This file contains common input and result values use to verify the NTLM | |
6 // implementation. They are defined in [MS-NLMP] Section 4.2 [1]. | |
7 // | |
8 // [1] https://msdn.microsoft.com/en-us/library/cc236621.aspx | |
9 | |
10 #ifndef NET_BASE_NTLM_TEST_DATA_H_ | |
11 #define NET_BASE_NTLM_TEST_DATA_H_ | |
12 | |
13 #include "net/ntlm/ntlm_constants.h" | |
14 | |
15 namespace net { | |
16 namespace ntlm { | |
17 | |
18 // Common input values defined in [MS-NLMP] Section 4.2.1. | |
19 const base::string16 NTLM_PASSWORD = base::UTF8ToUTF16("Password"); | |
20 const base::string16 NTLM_DOMAIN = base::UTF8ToUTF16("Domain"); | |
21 const base::string16 NTLM_USER = base::UTF8ToUTF16("User"); | |
22 const base::string16 NTLM_HOSTNAME = base::UTF8ToUTF16("COMPUTER"); | |
23 | |
24 // ASCII Versions of the above strings. | |
25 const std::string NTLM_DOMAIN_ASCII("Domain"); | |
26 const std::string NTLM_USER_ASCII("User"); | |
27 const std::string NTLM_HOSTNAME_ASCII("COMPUTER"); | |
Ryan Sleevi
2017/07/12 17:56:38
So, both of these violate the https://google.githu
asanka
2017/07/12 19:53:16
Also, let's make it obvious that these are specifi
zentaro
2017/07/13 17:10:20
Done. Put the test data in a test:: namespace.
| |
28 | |
29 // Challenge vectors defined in [MS-NLMP] Section 4.2.1. | |
30 constexpr uint8_t SERVER_CHALLENGE[CHALLENGE_LEN] = {0x01, 0x23, 0x45, 0x67, | |
31 0x89, 0xab, 0xcd, 0xef}; | |
32 constexpr uint8_t CLIENT_CHALLENGE[CHALLENGE_LEN] = {0xaa, 0xaa, 0xaa, 0xaa, | |
33 0xaa, 0xaa, 0xaa, 0xaa}; | |
34 | |
35 // Test result value for NTOWFv1() defined in [MS-NLMP] Section 4.2.2.1.2. | |
36 constexpr uint8_t EXPECTED_V1_HASH[NTLM_HASH_LEN] = { | |
37 0xa4, 0xf4, 0x9c, 0x40, 0x65, 0x10, 0xbd, 0xca, | |
38 0xb6, 0x82, 0x4e, 0xe7, 0xc3, 0x0f, 0xd8, 0x52}; | |
39 | |
40 // Test result value defined in [MS-NLMP] Section 4.2.2.1. | |
41 constexpr uint8_t EXPECTED_V1_NTLM_RESPONSE[RESPONSE_V1_LEN] = { | |
42 0x67, 0xc4, 0x30, 0x11, 0xf3, 0x02, 0x98, 0xa2, 0xad, 0x35, 0xec, 0xe6, | |
43 0x4f, 0x16, 0x33, 0x1c, 0x44, 0xbd, 0xbe, 0xd9, 0x27, 0x84, 0x1f, 0x94}; | |
44 | |
45 // Test result value defined in [MS-NLMP] Section 4.2.3.2.2. | |
46 constexpr uint8_t EXPECTED_V1_WITH_SS_NTLM_RESPONSE[RESPONSE_V1_LEN] = { | |
47 0x75, 0x37, 0xf8, 0x03, 0xae, 0x36, 0x71, 0x28, 0xca, 0x45, 0x82, 0x04, | |
48 0xbd, 0xe7, 0xca, 0xf8, 0x1e, 0x97, 0xed, 0x26, 0x83, 0x26, 0x72, 0x32}; | |
49 | |
50 // Test result value defined in [MS-NLMP] Section 4.2.3.2.1. | |
51 constexpr uint8_t EXPECTED_V1_WITH_SS_LM_RESPONSE[RESPONSE_V1_LEN] = { | |
Ryan Sleevi
2017/07/12 17:56:38
Same naming concerns throughout
zentaro
2017/07/13 17:10:20
Done.
| |
52 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, | |
53 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; | |
54 | |
55 } // namespace ntlm | |
56 } // namespace net | |
57 | |
58 #endif // NET_BASE_NTLM_TEST_DATA_H_ | |
OLD | NEW |