Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Side by Side Diff: net/ntlm/ntlm_constants.h

Issue 2873673002: Add unit tests for NTLMv1 portable implementation (Closed)
Patch Set: Rebase Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/ntlm/ntlm.cc ('k') | net/ntlm/ntlm_test_data.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_CONSTANTS_H_ 5 #ifndef NET_BASE_NTLM_CONSTANTS_H_
6 #define NET_BASE_NTLM_CONSTANTS_H_ 6 #define NET_BASE_NTLM_CONSTANTS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <type_traits> 10 #include <type_traits>
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 return static_cast<NegotiateFlags>(static_cast<TFlagsInt>(lhs) & 69 return static_cast<NegotiateFlags>(static_cast<TFlagsInt>(lhs) &
70 static_cast<TFlagsInt>(rhs)); 70 static_cast<TFlagsInt>(rhs));
71 } 71 }
72 72
73 static constexpr uint8_t kSignature[] = "NTLMSSP"; 73 static constexpr uint8_t kSignature[] = "NTLMSSP";
74 static constexpr size_t kSignatureLen = arraysize(kSignature); 74 static constexpr size_t kSignatureLen = arraysize(kSignature);
75 static constexpr size_t kSecurityBufferLen = 75 static constexpr size_t kSecurityBufferLen =
76 (2 * sizeof(uint16_t)) + sizeof(uint32_t); 76 (2 * sizeof(uint16_t)) + sizeof(uint32_t);
77 static constexpr size_t kNegotiateMessageLen = 32; 77 static constexpr size_t kNegotiateMessageLen = 32;
78 static constexpr size_t kChallengeHeaderLen = 32;
78 static constexpr size_t kResponseLenV1 = 24; 79 static constexpr size_t kResponseLenV1 = 24;
79 static constexpr size_t kChallengeLen = 8; 80 static constexpr size_t kChallengeLen = 8;
80 static constexpr size_t kNtlmHashLen = 16; 81 static constexpr size_t kNtlmHashLen = 16;
81 82
82 static constexpr NegotiateFlags kNegotiateMessageFlags = 83 static constexpr NegotiateFlags kNegotiateMessageFlags =
83 NegotiateFlags::kUnicode | NegotiateFlags::kOem | 84 NegotiateFlags::kUnicode | NegotiateFlags::kOem |
84 NegotiateFlags::kRequestTarget | NegotiateFlags::kNtlm | 85 NegotiateFlags::kRequestTarget | NegotiateFlags::kNtlm |
85 NegotiateFlags::kAlwaysSign | NegotiateFlags::kExtendedSessionSecurity; 86 NegotiateFlags::kAlwaysSign | NegotiateFlags::kExtendedSessionSecurity;
86 87
87 } // namespace ntlm 88 } // namespace ntlm
88 } // namespace net 89 } // namespace net
89 90
90 #endif // NET_BASE_NTLM_CONSTANTS_H_ 91 #endif // NET_BASE_NTLM_CONSTANTS_H_
OLDNEW
« no previous file with comments | « net/ntlm/ntlm.cc ('k') | net/ntlm/ntlm_test_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698