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

Side by Side Diff: net/ntlm/ntlm.cc

Issue 2904633002: Replace NTLMv1 implementation with a functionally equivalent one.
Patch Set: Only return malloc memory from NtlmClient 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
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 #include "net/ntlm/ntlm.h" 5 #include "net/ntlm/ntlm.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/md5.h" 10 #include "base/md5.h"
11 #include "base/strings/utf_string_conversions.h"
asanka 2017/07/14 16:52:39 not used?
zentaro 2017/07/19 15:20:12 Done.
11 #include "net/ntlm/des.h" 12 #include "net/ntlm/des.h"
12 #include "net/ntlm/md4.h" 13 #include "net/ntlm/md4.h"
14 #include "net/ntlm/ntlm_buffer_reader.h"
asanka 2017/07/14 16:52:39 not used?
zentaro 2017/07/19 15:20:12 Done.
13 #include "net/ntlm/ntlm_buffer_writer.h" 15 #include "net/ntlm/ntlm_buffer_writer.h"
14 16
15 namespace net { 17 namespace net {
16 namespace ntlm { 18 namespace ntlm {
17 19
18 void GenerateNtlmHashV1(const base::string16& password, uint8_t* hash) { 20 void GenerateNtlmHashV1(const base::string16& password, uint8_t* hash) {
19 size_t length = password.length() * 2; 21 size_t length = password.length() * 2;
20 NtlmBufferWriter writer(length); 22 NtlmBufferWriter writer(length);
21 23
22 // The writer will handle the big endian case if necessary. 24 // The writer will handle the big endian case if necessary.
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 const uint8_t* client_challenge, 118 const uint8_t* client_challenge,
117 uint8_t* lm_response, 119 uint8_t* lm_response,
118 uint8_t* ntlm_response) { 120 uint8_t* ntlm_response) {
119 GenerateLMResponseV1WithSessionSecurity(client_challenge, lm_response); 121 GenerateLMResponseV1WithSessionSecurity(client_challenge, lm_response);
120 GenerateNtlmResponseV1WithSessionSecurity(password, server_challenge, 122 GenerateNtlmResponseV1WithSessionSecurity(password, server_challenge,
121 client_challenge, ntlm_response); 123 client_challenge, ntlm_response);
122 } 124 }
123 125
124 } // namespace ntlm 126 } // namespace ntlm
125 } // namespace net 127 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698