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

Side by Side Diff: net/url_request/url_request_unittest.cc

Issue 206453002: Introduce USE_OPENSSL_CERTS for certificate handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final fixes and nits Created 6 years, 9 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/ssl/server_bound_cert_service_unittest.cc ('k') | no next file » | 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) 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shlobj.h> 9 #include <shlobj.h>
10 #endif 10 #endif
(...skipping 6997 matching lines...) Expand 10 before | Expand all | Expand 10 after
7008 #else 7008 #else
7009 return false; 7009 return false;
7010 #endif 7010 #endif
7011 } 7011 }
7012 7012
7013 // SystemUsesChromiumEVMetadata returns true iff the current operating system 7013 // SystemUsesChromiumEVMetadata returns true iff the current operating system
7014 // uses Chromium's EV metadata (i.e. EVRootCAMetadata). If it does not, then 7014 // uses Chromium's EV metadata (i.e. EVRootCAMetadata). If it does not, then
7015 // several tests are effected because our testing EV certificate won't be 7015 // several tests are effected because our testing EV certificate won't be
7016 // recognised as EV. 7016 // recognised as EV.
7017 static bool SystemUsesChromiumEVMetadata() { 7017 static bool SystemUsesChromiumEVMetadata() {
7018 #if defined(USE_OPENSSL) 7018 #if defined(USE_OPENSSL_CERTS) && !defined(OS_ANDROID)
7019 // http://crbug.com/117478 - OpenSSL does not support EV validation. 7019 // http://crbug.com/117478 - OpenSSL does not support EV validation.
7020 return false; 7020 return false;
7021 #elif defined(OS_MACOSX) && !defined(OS_IOS) 7021 #elif (defined(OS_MACOSX) && !defined(OS_IOS)) || defined(OS_ANDROID)
7022 // On OS X, we use the system to tell us whether a certificate is EV or not 7022 // On OS X and Android, we use the system to tell us whether a certificate is
7023 // and the system won't recognise our testing root. 7023 // EV or not and the system won't recognise our testing root.
7024 return false; 7024 return false;
7025 #else 7025 #else
7026 return true; 7026 return true;
7027 #endif 7027 #endif
7028 } 7028 }
7029 7029
7030 static bool SystemSupportsOCSP() { 7030 static bool SystemSupportsOCSP() {
7031 #if defined(USE_OPENSSL) 7031 #if defined(USE_OPENSSL)
7032 // http://crbug.com/117478 - OpenSSL does not support OCSP. 7032 // http://crbug.com/117478 - OpenSSL does not support OCSP.
7033 return false; 7033 return false;
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
7739 7739
7740 EXPECT_FALSE(r.is_pending()); 7740 EXPECT_FALSE(r.is_pending());
7741 EXPECT_EQ(1, d->response_started_count()); 7741 EXPECT_EQ(1, d->response_started_count());
7742 EXPECT_FALSE(d->received_data_before_response()); 7742 EXPECT_FALSE(d->received_data_before_response());
7743 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); 7743 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size));
7744 } 7744 }
7745 } 7745 }
7746 #endif // !defined(DISABLE_FTP_SUPPORT) 7746 #endif // !defined(DISABLE_FTP_SUPPORT)
7747 7747
7748 } // namespace net 7748 } // namespace net
OLDNEW
« no previous file with comments | « net/ssl/server_bound_cert_service_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698