OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_BASE_NTLM_H_ | 5 #ifndef NET_BASE_NTLM_H_ |
6 #define NET_BASE_NTLM_H_ | 6 #define NET_BASE_NTLM_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 NegotiateFlags rhs) { | 65 NegotiateFlags rhs) { |
66 return static_cast<NegotiateFlags>(static_cast<TFlagsInt>(lhs) & | 66 return static_cast<NegotiateFlags>(static_cast<TFlagsInt>(lhs) & |
67 static_cast<TFlagsInt>(rhs)); | 67 static_cast<TFlagsInt>(rhs)); |
68 } | 68 } |
69 | 69 |
70 static constexpr uint8_t SIGNATURE[] = "NTLMSSP"; | 70 static constexpr uint8_t SIGNATURE[] = "NTLMSSP"; |
71 static constexpr size_t SIGNATURE_LEN = arraysize(SIGNATURE); | 71 static constexpr size_t SIGNATURE_LEN = arraysize(SIGNATURE); |
72 static constexpr size_t SECURITY_BUFFER_LEN = | 72 static constexpr size_t SECURITY_BUFFER_LEN = |
73 (2 * sizeof(uint16_t)) + sizeof(uint32_t); | 73 (2 * sizeof(uint16_t)) + sizeof(uint32_t); |
74 static constexpr size_t NEGOTIATE_MESSAGE_LEN = 32; | 74 static constexpr size_t NEGOTIATE_MESSAGE_LEN = 32; |
| 75 static constexpr size_t CHALLENGE_HEADER_LEN = 32; |
75 static constexpr size_t RESPONSE_V1_LEN = 24; | 76 static constexpr size_t RESPONSE_V1_LEN = 24; |
76 static constexpr size_t CHALLENGE_LEN = 8; | 77 static constexpr size_t CHALLENGE_LEN = 8; |
77 static constexpr size_t NTLM_HASH_LEN = 16; | 78 static constexpr size_t NTLM_HASH_LEN = 16; |
78 | 79 |
79 static constexpr NegotiateFlags NEGOTIATE_MESSAGE_FLAGS = | 80 static constexpr NegotiateFlags NEGOTIATE_MESSAGE_FLAGS = |
80 NegotiateFlags::UNICODE | NegotiateFlags::OEM | | 81 NegotiateFlags::UNICODE | NegotiateFlags::OEM | |
81 NegotiateFlags::REQUEST_TARGET | NegotiateFlags::NTLM | | 82 NegotiateFlags::REQUEST_TARGET | NegotiateFlags::NTLM | |
82 NegotiateFlags::ALWAYS_SIGN | NegotiateFlags::EXTENDED_SESSIONSECURITY; | 83 NegotiateFlags::ALWAYS_SIGN | NegotiateFlags::EXTENDED_SESSIONSECURITY; |
83 | 84 |
84 } // namespce ntlm | 85 } // namespce ntlm |
85 } // namespace net | 86 } // namespace net |
86 | 87 |
87 #endif // NET_BASE_NTLM_H_ | 88 #endif // NET_BASE_NTLM_H_ |
OLD | NEW |