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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 TestCompletionCallback comp_callback; | 65 TestCompletionCallback comp_callback; |
66 bool ok; | 66 bool ok; |
67 string error_details; | 67 string error_details; |
68 std::unique_ptr<ProofVerifyContext> verify_context( | 68 std::unique_ptr<ProofVerifyContext> verify_context( |
69 CryptoTestUtils::ProofVerifyContextForTesting()); | 69 CryptoTestUtils::ProofVerifyContextForTesting()); |
70 TestProofVerifierCallback* callback = | 70 TestProofVerifierCallback* callback = |
71 new TestProofVerifierCallback(&comp_callback, &ok, &error_details); | 71 new TestProofVerifierCallback(&comp_callback, &ok, &error_details); |
72 | 72 |
73 QuicAsyncStatus status = verifier->VerifyProof( | 73 QuicAsyncStatus status = verifier->VerifyProof( |
74 hostname, port, server_config, quic_version, chlo_hash, certs, "", proof, | 74 hostname, port, server_config, quic_version, chlo_hash, certs, "", proof, |
75 verify_context.get(), &error_details, &details, callback); | 75 verify_context.get(), &error_details, &details, |
| 76 std::unique_ptr<ProofVerifierCallback>()); |
76 | 77 |
77 switch (status) { | 78 switch (status) { |
78 case QUIC_FAILURE: | 79 case QUIC_FAILURE: |
79 delete callback; | 80 delete callback; |
80 ASSERT_FALSE(expected_ok); | 81 ASSERT_FALSE(expected_ok); |
81 ASSERT_NE("", error_details); | 82 ASSERT_NE("", error_details); |
82 return; | 83 return; |
83 case QUIC_SUCCESS: | 84 case QUIC_SUCCESS: |
84 delete callback; | 85 delete callback; |
85 ASSERT_TRUE(expected_ok); | 86 ASSERT_TRUE(expected_ok); |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 for (size_t i = 1; i < certs.size(); i++) { | 410 for (size_t i = 1; i < certs.size(); i++) { |
410 wrong_certs.push_back(certs[i]); | 411 wrong_certs.push_back(certs[i]); |
411 } | 412 } |
412 RunVerification(verifier.get(), hostname, port, server_config, quic_version, | 413 RunVerification(verifier.get(), hostname, port, server_config, quic_version, |
413 chlo_hash, wrong_certs, signature, false); | 414 chlo_hash, wrong_certs, signature, false); |
414 } | 415 } |
415 } | 416 } |
416 | 417 |
417 } // namespace test | 418 } // namespace test |
418 } // namespace net | 419 } // namespace net |
OLD | NEW |