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

Side by Side Diff: net/cert_net/nss_ocsp_unittest.cc

Issue 1081913003: Route OCSP stapling through CertVerifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@boringnss
Patch Set: yet another CrOS-only Verify call Created 5 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/test_root_certs_unittest.cc ('k') | net/quic/crypto/proof_verifier_chromium.cc » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_net/nss_ocsp.h" 5 #include "net/cert_net/nss_ocsp.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 ImportCertFromFile(GetTestCertsDirectory(), "aia-root.pem")); 134 ImportCertFromFile(GetTestCertsDirectory(), "aia-root.pem"));
135 ASSERT_TRUE(test_root.get()); 135 ASSERT_TRUE(test_root.get());
136 136
137 ScopedTestRoot scoped_root(test_root.get()); 137 ScopedTestRoot scoped_root(test_root.get());
138 138
139 CertVerifyResult verify_result; 139 CertVerifyResult verify_result;
140 TestCompletionCallback test_callback; 140 TestCompletionCallback test_callback;
141 CertVerifier::RequestHandle request_handle; 141 CertVerifier::RequestHandle request_handle;
142 142
143 int flags = CertVerifier::VERIFY_CERT_IO_ENABLED; 143 int flags = CertVerifier::VERIFY_CERT_IO_ENABLED;
144 int error = verifier()->Verify(test_cert.get(), 144 int error = verifier()->Verify(
145 "aia-host.invalid", 145 test_cert.get(), "aia-host.invalid", std::string(), flags, NULL,
146 flags, 146 &verify_result, test_callback.callback(), &request_handle, BoundNetLog());
147 NULL,
148 &verify_result,
149 test_callback.callback(),
150 &request_handle,
151 BoundNetLog());
152 ASSERT_EQ(ERR_IO_PENDING, error); 147 ASSERT_EQ(ERR_IO_PENDING, error);
153 148
154 error = test_callback.WaitForResult(); 149 error = test_callback.WaitForResult();
155 150
156 EXPECT_EQ(OK, error); 151 EXPECT_EQ(OK, error);
157 152
158 // Ensure that NSS made an AIA request for the missing intermediate. 153 // Ensure that NSS made an AIA request for the missing intermediate.
159 EXPECT_LT(0, request_count()); 154 EXPECT_LT(0, request_count());
160 } 155 }
161 156
162 } // namespace net 157 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/test_root_certs_unittest.cc ('k') | net/quic/crypto/proof_verifier_chromium.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698