OLD | NEW |
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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 ASSERT_TRUE(test_cert.get()); | 131 ASSERT_TRUE(test_cert.get()); |
132 | 132 |
133 scoped_refptr<X509Certificate> test_root( | 133 scoped_refptr<X509Certificate> test_root( |
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 scoped_ptr<CertVerifier::Request> request; |
142 | 142 |
143 int flags = CertVerifier::VERIFY_CERT_IO_ENABLED; | 143 int flags = CertVerifier::VERIFY_CERT_IO_ENABLED; |
144 int error = verifier()->Verify( | 144 int error = verifier()->Verify( |
145 test_cert.get(), "aia-host.invalid", std::string(), flags, NULL, | 145 test_cert.get(), "aia-host.invalid", std::string(), flags, NULL, |
146 &verify_result, test_callback.callback(), &request_handle, BoundNetLog()); | 146 &verify_result, test_callback.callback(), &request, BoundNetLog()); |
147 ASSERT_EQ(ERR_IO_PENDING, error); | 147 ASSERT_EQ(ERR_IO_PENDING, error); |
148 | 148 |
149 error = test_callback.WaitForResult(); | 149 error = test_callback.WaitForResult(); |
150 | 150 |
151 EXPECT_EQ(OK, error); | 151 EXPECT_EQ(OK, error); |
152 | 152 |
153 // Ensure that NSS made an AIA request for the missing intermediate. | 153 // Ensure that NSS made an AIA request for the missing intermediate. |
154 EXPECT_LT(0, request_count()); | 154 EXPECT_LT(0, request_count()); |
155 } | 155 } |
156 | 156 |
157 } // namespace net | 157 } // namespace net |
OLD | NEW |