OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 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 #ifndef NET_BASE_NTLM_MESSAGE_H_ | |
6 #define NET_BASE_NTLM_MESSAGE_H_ | |
7 | |
8 #include <stddef.h> | |
9 #include <stdint.h> | |
10 | |
11 #include "net/base/net_export.h" | |
12 | |
13 namespace net { | |
14 | |
15 // Contains consts and enums for various fields | |
16 // in the NTLM protocol. | |
17 class NET_EXPORT NtlmMessage { | |
Ryan Sleevi
2017/05/30 19:02:23
see https://google.github.io/styleguide/cppguide.h
zentaro
2017/06/05 17:28:45
Done.
| |
18 private: | |
19 NtlmMessage(); | |
20 ~NtlmMessage(); | |
21 | |
22 public: | |
23 static const uint8_t SIGNATURE[]; | |
24 static const size_t SIGNATURE_LEN; | |
25 static const size_t SECURITY_BUFFER_LEN; | |
26 static const size_t NEGOTIATE_MESSAGE_LEN; | |
27 static const size_t RESPONSE_V1_LEN; | |
28 static const size_t CHALLENGE_LEN; | |
29 static const size_t NTLM_HASH_LEN; | |
30 | |
31 enum NtlmVersion { | |
32 VERSION_NTLM_V1 = 0x01, | |
33 VERSION_NTLM_V2 = 0x02, | |
34 }; | |
35 | |
36 enum MessageType { | |
37 MESSAGE_NEGOTIATE = 0x01, | |
38 MESSAGE_CHALLENGE = 0x02, | |
39 MESSAGE_AUTHENTICATE = 0x03, | |
40 }; | |
41 | |
42 // Defined in NTLMSSP Spec 2.2.2.5 | |
43 // Only the used subset is defined. | |
44 enum NegotiateFlags { | |
45 NTLMSSP_NEGOTIATE_UNICODE = 0x01, | |
46 NTLMSSP_NEGOTIATE_OEM = 0x02, | |
47 NTLMSSP_REQUEST_TARGET = 0x04, | |
48 NTLMSSP_NEGOTIATE_NTLM = 0x200, | |
49 NTLMSSP_NEGOTIATE_ALWAYS_SIGN = 0x8000, | |
50 NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY = 0x80000, | |
51 }; | |
52 | |
53 static const uint32_t NEGOTIATE_MESSAGE_FLAGS; | |
54 }; | |
55 | |
56 } // namespace net | |
57 | |
58 #endif // NET_BASE_NTLM_MESSAGE_H_ | |
OLD | NEW |