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

Side by Side Diff: net/test/test_server_win.cc

Issue 4646001: Implement LoadTemporaryRoot for Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/net/base
Patch Set: Widen suppresions Created 10 years 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 | Annotate | Revision Log
« no previous file with comments | « net/test/test_server_posix.cc ('k') | tools/valgrind/memcheck/suppressions.txt » ('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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/test/test_server.h" 5 #include "net/test/test_server.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <wincrypt.h> 8 #include <wincrypt.h>
9 9
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 } 209 }
210 210
211 if (!ParseServerData(server_data)) { 211 if (!ParseServerData(server_data)) {
212 LOG(ERROR) << "Could not parse server_data: " << server_data; 212 LOG(ERROR) << "Could not parse server_data: " << server_data;
213 return false; 213 return false;
214 } 214 }
215 215
216 return true; 216 return true;
217 } 217 }
218 218
219 bool TestServer::CheckCATrusted() {
220 HCERTSTORE cert_store = CertOpenSystemStore(NULL, L"ROOT");
221 if (!cert_store) {
222 LOG(ERROR) << " could not open trusted root CA store";
223 return false;
224 }
225 PCCERT_CONTEXT cert =
226 CertFindCertificateInStore(cert_store,
227 X509_ASN_ENCODING | PKCS_7_ASN_ENCODING,
228 0,
229 CERT_FIND_ISSUER_STR,
230 L"Test CA",
231 NULL);
232 if (cert)
233 CertFreeCertificateContext(cert);
234 CertCloseStore(cert_store, 0);
235
236 if (!cert) {
237 LOG(ERROR) << " TEST CONFIGURATION ERROR: you need to import the test ca "
238 "certificate to your trusted roots for this test to work. "
239 "For more info visit:\n"
240 "http://dev.chromium.org/developers/testing\n";
241 return false;
242 }
243
244 return true;
245 }
246
247 } // namespace net 219 } // namespace net
OLDNEW
« no previous file with comments | « net/test/test_server_posix.cc ('k') | tools/valgrind/memcheck/suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698