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

Unified Diff: net/url_request/url_request_unittest.cc

Issue 2347893002: Revert of CertVerifyProcMac: Add Keychain re-ordering hack, check CRLsets in path pruning loop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl patch is broken so try a manual revert instead Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/net.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_unittest.cc
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 35995a6e611e5fdf7008ac2187e5c98f637fa12a..f2203e0f99ca297d62d6a46cce21f47ac54b7916 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -9002,7 +9002,7 @@ class HTTPSOCSPTest : public HTTPSRequestTest {
};
static CertStatus ExpectedCertStatusForFailedOnlineRevocationCheck() {
-#if defined(OS_WIN) || defined(OS_MACOSX)
+#if defined(OS_WIN)
// Windows can return CERT_STATUS_UNABLE_TO_CHECK_REVOCATION but we don't
// have that ability on other platforms.
return CERT_STATUS_UNABLE_TO_CHECK_REVOCATION;
@@ -9043,19 +9043,6 @@ static bool SystemUsesChromiumEVMetadata() {
#endif
}
-// Returns the expected CertStatus for tests that expect an online revocation
-// check failure as a result of checking a test EV cert, which will not
-// actually trigger an online revocation check on some platforms.
-static CertStatus ExpectedCertStatusForFailedOnlineEVRevocationCheck() {
- if (SystemUsesChromiumEVMetadata()) {
- return ExpectedCertStatusForFailedOnlineRevocationCheck();
- } else {
- // If SystemUsesChromiumEVMetadata is false, revocation checking will not
- // be enabled, and thus there will not be a revocation check to fail.
- return 0u;
- }
-}
-
static bool SystemSupportsOCSP() {
#if defined(OS_ANDROID)
// TODO(jnd): http://crbug.com/117478 - EV verification is not yet supported.
@@ -9107,7 +9094,10 @@ TEST_F(HTTPSOCSPTest, Revoked) {
CertStatus cert_status;
DoConnection(ssl_options, &cert_status);
+#if !(defined(OS_MACOSX) && !defined(OS_IOS))
+ // Doesn't pass on OS X yet for reasons that need to be investigated.
EXPECT_EQ(CERT_STATUS_REVOKED, cert_status & CERT_STATUS_ALL_ERRORS);
+#endif
EXPECT_FALSE(cert_status & CERT_STATUS_IS_EV);
EXPECT_TRUE(cert_status & CERT_STATUS_REV_CHECKING_ENABLED);
}
@@ -9614,7 +9604,7 @@ TEST_F(HTTPSEVCRLSetTest, MissingCRLSetAndInvalidOCSP) {
CertStatus cert_status;
DoConnection(ssl_options, &cert_status);
- EXPECT_EQ(ExpectedCertStatusForFailedOnlineEVRevocationCheck(),
+ EXPECT_EQ(ExpectedCertStatusForFailedOnlineRevocationCheck(),
cert_status & CERT_STATUS_ALL_ERRORS);
EXPECT_FALSE(cert_status & CERT_STATUS_IS_EV);
@@ -9688,7 +9678,7 @@ TEST_F(HTTPSEVCRLSetTest, ExpiredCRLSet) {
CertStatus cert_status;
DoConnection(ssl_options, &cert_status);
- EXPECT_EQ(ExpectedCertStatusForFailedOnlineEVRevocationCheck(),
+ EXPECT_EQ(ExpectedCertStatusForFailedOnlineRevocationCheck(),
cert_status & CERT_STATUS_ALL_ERRORS);
EXPECT_FALSE(cert_status & CERT_STATUS_IS_EV);
@@ -9741,7 +9731,7 @@ TEST_F(HTTPSEVCRLSetTest, FreshCRLSetNotCovered) {
// Even with a fresh CRLSet, we should still do online revocation checks when
// the certificate chain isn't covered by the CRLSet, which it isn't in this
// test.
- EXPECT_EQ(ExpectedCertStatusForFailedOnlineEVRevocationCheck(),
+ EXPECT_EQ(ExpectedCertStatusForFailedOnlineRevocationCheck(),
cert_status & CERT_STATUS_ALL_ERRORS);
EXPECT_FALSE(cert_status & CERT_STATUS_IS_EV);
« no previous file with comments | « net/net.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698