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

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: Changed meaning of USE_OPENSSL_CERTS 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
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 6925 matching lines...) Expand 10 before | Expand all | Expand 10 after
6936 #else 6936 #else
6937 return false; 6937 return false;
6938 #endif 6938 #endif
6939 } 6939 }
6940 6940
6941 // SystemUsesChromiumEVMetadata returns true iff the current operating system 6941 // SystemUsesChromiumEVMetadata returns true iff the current operating system
6942 // uses Chromium's EV metadata (i.e. EVRootCAMetadata). If it does not, then 6942 // uses Chromium's EV metadata (i.e. EVRootCAMetadata). If it does not, then
6943 // several tests are effected because our testing EV certificate won't be 6943 // several tests are effected because our testing EV certificate won't be
6944 // recognised as EV. 6944 // recognised as EV.
6945 static bool SystemUsesChromiumEVMetadata() { 6945 static bool SystemUsesChromiumEVMetadata() {
6946 #if defined(USE_OPENSSL) 6946 #if defined(USE_OPENSSL_CERTS) && !defined(OS_ANDROID)
6947 // http://crbug.com/117478 - OpenSSL does not support EV validation. 6947 // http://crbug.com/117478 - OpenSSL does not support EV validation.
6948 return false; 6948 return false;
6949 #elif defined(OS_MACOSX) && !defined(OS_IOS) 6949 #elif (defined(OS_MACOSX) && !defined(OS_IOS)) || defined(OS_ANDROID)
6950 // On OS X, we use the system to tell us whether a certificate is EV or not 6950 // On OS X and Android, we use the system to tell us whether
6951 // and the system won't recognise our testing root. 6951 // a certificate is EV or not and the system won't recognise our testing root.
wtc 2014/03/25 17:18:28 Nit: the first couple of words can be moved to the
haavardm 2014/03/26 12:25:18 Done.
6952 return false; 6952 return false;
6953 #else 6953 #else
6954 return true; 6954 return true;
6955 #endif 6955 #endif
6956 } 6956 }
6957 6957
6958 static bool SystemSupportsOCSP() { 6958 static bool SystemSupportsOCSP() {
6959 #if defined(USE_OPENSSL) 6959 #if defined(USE_OPENSSL)
6960 // http://crbug.com/117478 - OpenSSL does not support OCSP. 6960 // http://crbug.com/117478 - OpenSSL does not support OCSP.
6961 return false; 6961 return false;
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
7667 7667
7668 EXPECT_FALSE(r.is_pending()); 7668 EXPECT_FALSE(r.is_pending());
7669 EXPECT_EQ(1, d->response_started_count()); 7669 EXPECT_EQ(1, d->response_started_count());
7670 EXPECT_FALSE(d->received_data_before_response()); 7670 EXPECT_FALSE(d->received_data_before_response());
7671 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); 7671 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size));
7672 } 7672 }
7673 } 7673 }
7674 #endif // !defined(DISABLE_FTP_SUPPORT) 7674 #endif // !defined(DISABLE_FTP_SUPPORT)
7675 7675
7676 } // namespace net 7676 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698