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

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

Issue 2800993002: Add a key purpose parameter to Certificate PathBuilder. (Closed)
Patch Set: rebase Created 3 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 | « net/cert/cert_verify_proc_builtin.cc ('k') | net/cert/internal/path_builder.h » ('j') | 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"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « net/cert/cert_verify_proc_builtin.cc ('k') | net/cert/internal/path_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698