| OLD | NEW |
| 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" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #endif | 42 #endif |
| 43 | 43 |
| 44 #if defined(OS_MACOSX) && !defined(OS_IOS) | 44 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 45 #include "base/mac/mac_util.h" | 45 #include "base/mac/mac_util.h" |
| 46 #endif | 46 #endif |
| 47 | 47 |
| 48 #if defined(OS_WIN) | 48 #if defined(OS_WIN) |
| 49 #include "base/win/windows_version.h" | 49 #include "base/win/windows_version.h" |
| 50 #endif | 50 #endif |
| 51 | 51 |
| 52 // TODO(crbug.com/649017): Add tests that only certificates with |
| 53 // serverAuth are accepted. |
| 54 |
| 52 using net::test::IsError; | 55 using net::test::IsError; |
| 53 using net::test::IsOk; | 56 using net::test::IsOk; |
| 54 | 57 |
| 55 using base::HexEncode; | 58 using base::HexEncode; |
| 56 | 59 |
| 57 namespace net { | 60 namespace net { |
| 58 | 61 |
| 59 namespace { | 62 namespace { |
| 60 | 63 |
| 61 const char kTLSFeatureExtensionHistogram[] = | 64 const char kTLSFeatureExtensionHistogram[] = |
| (...skipping 2323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2385 int flags = 0; | 2388 int flags = 0; |
| 2386 CertVerifyResult verify_result; | 2389 CertVerifyResult verify_result; |
| 2387 int error = verify_proc->Verify(cert.get(), "127.0.0.1", std::string(), flags, | 2390 int error = verify_proc->Verify(cert.get(), "127.0.0.1", std::string(), flags, |
| 2388 NULL, CertificateList(), &verify_result); | 2391 NULL, CertificateList(), &verify_result); |
| 2389 EXPECT_EQ(OK, error); | 2392 EXPECT_EQ(OK, error); |
| 2390 histograms.ExpectTotalCount(kTLSFeatureExtensionHistogram, 0); | 2393 histograms.ExpectTotalCount(kTLSFeatureExtensionHistogram, 0); |
| 2391 histograms.ExpectTotalCount(kTLSFeatureExtensionOCSPHistogram, 0); | 2394 histograms.ExpectTotalCount(kTLSFeatureExtensionOCSPHistogram, 0); |
| 2392 } | 2395 } |
| 2393 | 2396 |
| 2394 } // namespace net | 2397 } // namespace net |
| OLD | NEW |