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

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

Issue 1907443005: Disable CertVerifyProcTest.PaypalNullCertParsing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Unconditionally disable test Created 4 years, 8 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 | « no previous file | 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 "net/cert/cert_verify_proc.h" 5 #include "net/cert/cert_verify_proc.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/files/file_util.h" 11 #include "base/files/file_util.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/sha1.h" 14 #include "base/sha1.h"
15 #include "base/strings/string_number_conversions.h" 15 #include "base/strings/string_number_conversions.h"
16 #include "build/build_config.h"
16 #include "crypto/sha2.h" 17 #include "crypto/sha2.h"
17 #include "net/base/net_errors.h" 18 #include "net/base/net_errors.h"
18 #include "net/base/test_data_directory.h" 19 #include "net/base/test_data_directory.h"
19 #include "net/cert/asn1_util.h" 20 #include "net/cert/asn1_util.h"
20 #include "net/cert/cert_status_flags.h" 21 #include "net/cert/cert_status_flags.h"
21 #include "net/cert/cert_verifier.h" 22 #include "net/cert/cert_verifier.h"
22 #include "net/cert/cert_verify_result.h" 23 #include "net/cert/cert_verify_result.h"
23 #include "net/cert/crl_set.h" 24 #include "net/cert/crl_set.h"
24 #include "net/cert/crl_set_storage.h" 25 #include "net/cert/crl_set_storage.h"
25 #include "net/cert/test_root_certs.h" 26 #include "net/cert/test_root_certs.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 int error = Verify(comodo_chain.get(), 197 int error = Verify(comodo_chain.get(),
197 "comodo.com", 198 "comodo.com",
198 flags, 199 flags,
199 crl_set.get(), 200 crl_set.get(),
200 empty_cert_list_, 201 empty_cert_list_,
201 &verify_result); 202 &verify_result);
202 EXPECT_EQ(OK, error); 203 EXPECT_EQ(OK, error);
203 EXPECT_TRUE(verify_result.cert_status & CERT_STATUS_IS_EV); 204 EXPECT_TRUE(verify_result.cert_status & CERT_STATUS_IS_EV);
204 } 205 }
205 206
206 TEST_F(CertVerifyProcTest, PaypalNullCertParsing) { 207 // TODO(crbug.com/605457): the test expectation was incorrect on some
208 // configurations, so disable the test until it is fixed (better to have
209 // a bug to track a failing test than a false sense of security due to
210 // false positive).
211 TEST_F(CertVerifyProcTest, DISABLED_PaypalNullCertParsing) {
207 scoped_refptr<X509Certificate> paypal_null_cert( 212 scoped_refptr<X509Certificate> paypal_null_cert(
208 X509Certificate::CreateFromBytes( 213 X509Certificate::CreateFromBytes(
209 reinterpret_cast<const char*>(paypal_null_der), 214 reinterpret_cast<const char*>(paypal_null_der),
210 sizeof(paypal_null_der))); 215 sizeof(paypal_null_der)));
211 216
212 ASSERT_NE(static_cast<X509Certificate*>(NULL), paypal_null_cert.get()); 217 ASSERT_NE(static_cast<X509Certificate*>(NULL), paypal_null_cert.get());
213 218
214 const SHA1HashValue& fingerprint = 219 const SHA1HashValue& fingerprint =
215 paypal_null_cert->fingerprint(); 220 paypal_null_cert->fingerprint();
216 for (size_t i = 0; i < 20; ++i) 221 for (size_t i = 0; i < 20; ++i)
(...skipping 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1702 int flags = 0; 1707 int flags = 0;
1703 CertVerifyResult verify_result; 1708 CertVerifyResult verify_result;
1704 int error = Verify(cert.get(), "127.0.0.1", flags, NULL, empty_cert_list_, 1709 int error = Verify(cert.get(), "127.0.0.1", flags, NULL, empty_cert_list_,
1705 &verify_result); 1710 &verify_result);
1706 EXPECT_EQ(ERR_CERT_INVALID, error); 1711 EXPECT_EQ(ERR_CERT_INVALID, error);
1707 EXPECT_EQ(CERT_STATUS_INVALID, verify_result.cert_status); 1712 EXPECT_EQ(CERT_STATUS_INVALID, verify_result.cert_status);
1708 } 1713 }
1709 #endif // defined(OS_MACOSX) && !defined(OS_IOS) 1714 #endif // defined(OS_MACOSX) && !defined(OS_IOS)
1710 1715
1711 } // namespace net 1716 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698