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

Side by Side Diff: components/os_crypt/ie7_password_win.cc

Issue 686883002: Add crypto/wincrypt_shim.h wrapper header to resolve BoringSSL conflicts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sleevi comments Created 6 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/os_crypt/ie7_password_win.h" 5 #include "components/os_crypt/ie7_password_win.h"
6 6
7 #include <wincrypt.h>
8 #include <string> 7 #include <string>
9 #include <vector> 8 #include <vector>
10 9
11 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
12 #include "base/sha1.h" 11 #include "base/sha1.h"
13 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
14 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
14 #include "crypto/wincrypt_shim.h"
15 15
16 namespace { 16 namespace {
17 17
18 // Structures that IE7/IE8 use to store a username/password. 18 // Structures that IE7/IE8 use to store a username/password.
19 // Some of the fields might have been incorrectly reverse engineered. 19 // Some of the fields might have been incorrectly reverse engineered.
20 struct PreHeader { 20 struct PreHeader {
21 DWORD pre_header_size; // Size of this header structure. Always 12. 21 DWORD pre_header_size; // Size of this header structure. Always 12.
22 DWORD header_size; // Size of the real Header: sizeof(Header) + 22 DWORD header_size; // Size of the real Header: sizeof(Header) +
23 // item_count * sizeof(Entry); 23 // item_count * sizeof(Entry);
24 DWORD data_size; // Size of the data referenced by the entries. 24 DWORD data_size; // Size of the data referenced by the entries.
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 GetUserPassFromData(decrypted_data, credentials); 139 GetUserPassFromData(decrypted_data, credentials);
140 140
141 LocalFree(output.pbData); 141 LocalFree(output.pbData);
142 return true; 142 return true;
143 } 143 }
144 144
145 return false; 145 return false;
146 } 146 }
147 147
148 } // namespace ie7_password 148 } // namespace ie7_password
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/password_store_win_unittest.cc ('k') | components/os_crypt/os_crypt_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698