| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |