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

Side by Side Diff: net/cert/test_root_certs_win.cc

Issue 1422773008: Fixing remaining VC++ 2015 64-bit build breaks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to latest Created 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/cert/test_root_certs.h" 5 #include "net/cert/test_root_certs.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 BOOL WINAPI InterceptedOpenStoreW(LPCSTR store_provider, 93 BOOL WINAPI InterceptedOpenStoreW(LPCSTR store_provider,
94 DWORD encoding, 94 DWORD encoding,
95 HCRYPTPROV crypt_provider, 95 HCRYPTPROV crypt_provider,
96 DWORD flags, 96 DWORD flags,
97 const void* store_name, 97 const void* store_name,
98 HCERTSTORE memory_store, 98 HCERTSTORE memory_store,
99 PCERT_STORE_PROV_INFO store_info) { 99 PCERT_STORE_PROV_INFO store_info) {
100 // If the high word is all zeroes, then |store_provider| is a numeric ID. 100 // If the high word is all zeroes, then |store_provider| is a numeric ID.
101 // Otherwise, it's a pointer to a null-terminated ASCII string. See the 101 // Otherwise, it's a pointer to a null-terminated ASCII string. See the
102 // documentation for CryptGetOIDFunctionAddress for more information. 102 // documentation for CryptGetOIDFunctionAddress for more information.
103 uint32_t store_as_uint = reinterpret_cast<uint32_t>(store_provider); 103 uintptr_t store_as_uint = reinterpret_cast<uintptr_t>(store_provider);
Will Harris 2015/11/10 18:05:14 store_as_uintptr now :)
brucedawson 2015/11/10 18:43:26 D'oh!
104 if (store_as_uint > 0xFFFF || store_provider != CERT_STORE_PROV_SYSTEM_W || 104 if (store_as_uint > 0xFFFF || store_provider != CERT_STORE_PROV_SYSTEM_W ||
105 !g_capi_injector.Get().original_function) 105 !g_capi_injector.Get().original_function)
106 return FALSE; 106 return FALSE;
107 107
108 BOOL ok = g_capi_injector.Get().original_function(store_provider, encoding, 108 BOOL ok = g_capi_injector.Get().original_function(store_provider, encoding,
109 crypt_provider, flags, 109 crypt_provider, flags,
110 store_name, memory_store, 110 store_name, memory_store,
111 store_info); 111 store_info);
112 // Only the Root store should have certificates injected. If 112 // Only the Root store should have certificates injected. If
113 // CERT_SYSTEM_STORE_RELOCATE_FLAG is set, then |store_name| points to a 113 // CERT_SYSTEM_STORE_RELOCATE_FLAG is set, then |store_name| points to a
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 void TestRootCerts::Init() { 205 void TestRootCerts::Init() {
206 empty_ = true; 206 empty_ = true;
207 temporary_roots_ = CertOpenStore( 207 temporary_roots_ = CertOpenStore(
208 CERT_STORE_PROV_MEMORY, 0, NULL, 208 CERT_STORE_PROV_MEMORY, 0, NULL,
209 CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG, NULL); 209 CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG, NULL);
210 DCHECK(temporary_roots_); 210 DCHECK(temporary_roots_);
211 } 211 }
212 212
213 } // namespace net 213 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698