| 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 <memory> | 5 #include <memory> |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "net/base/ip_endpoint.h" | 8 #include "net/base/ip_endpoint.h" |
| 9 #include "net/base/net_errors.h" | 9 #include "net/base/net_errors.h" |
| 10 #include "net/base/test_completion_callback.h" | 10 #include "net/base/test_completion_callback.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 string* const error_details_; | 49 string* const error_details_; |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 // RunVerification runs |verifier->VerifyProof| and asserts that the result | 52 // RunVerification runs |verifier->VerifyProof| and asserts that the result |
| 53 // matches |expected_ok|. | 53 // matches |expected_ok|. |
| 54 void RunVerification(ProofVerifier* verifier, | 54 void RunVerification(ProofVerifier* verifier, |
| 55 const string& hostname, | 55 const string& hostname, |
| 56 const uint16_t port, | 56 const uint16_t port, |
| 57 const string& server_config, | 57 const string& server_config, |
| 58 QuicVersion quic_version, | 58 QuicVersion quic_version, |
| 59 StringPiece chlo_hash, | 59 QuicStringPiece chlo_hash, |
| 60 const std::vector<string>& certs, | 60 const std::vector<string>& certs, |
| 61 const string& proof, | 61 const string& proof, |
| 62 bool expected_ok) { | 62 bool expected_ok) { |
| 63 std::unique_ptr<ProofVerifyDetails> details; | 63 std::unique_ptr<ProofVerifyDetails> details; |
| 64 TestCompletionCallback comp_callback; | 64 TestCompletionCallback comp_callback; |
| 65 bool ok; | 65 bool ok; |
| 66 string error_details; | 66 string error_details; |
| 67 std::unique_ptr<ProofVerifyContext> verify_context( | 67 std::unique_ptr<ProofVerifyContext> verify_context( |
| 68 crypto_test_utils::ProofVerifyContextForTesting()); | 68 crypto_test_utils::ProofVerifyContextForTesting()); |
| 69 std::unique_ptr<TestProofVerifierCallback> callback( | 69 std::unique_ptr<TestProofVerifierCallback> callback( |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 EXPECT_TRUE(chain->HasOneRef()); | 218 EXPECT_TRUE(chain->HasOneRef()); |
| 219 | 219 |
| 220 EXPECT_FALSE(chain->certs.empty()); | 220 EXPECT_FALSE(chain->certs.empty()); |
| 221 for (const string& cert : chain->certs) { | 221 for (const string& cert : chain->certs) { |
| 222 EXPECT_FALSE(cert.empty()); | 222 EXPECT_FALSE(cert.empty()); |
| 223 } | 223 } |
| 224 } | 224 } |
| 225 | 225 |
| 226 } // namespace test | 226 } // namespace test |
| 227 } // namespace net | 227 } // namespace net |
| OLD | NEW |