OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/quic/test_tools/crypto_test_utils.h" | 5 #include "net/quic/test_tools/crypto_test_utils.h" |
6 | 6 |
7 #include <openssl/bn.h> | 7 #include <openssl/bn.h> |
8 #include <openssl/ec.h> | 8 #include <openssl/ec.h> |
9 #include <openssl/ecdsa.h> | 9 #include <openssl/ecdsa.h> |
10 #include <openssl/evp.h> | 10 #include <openssl/evp.h> |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 crypto_config.SetChannelIDSource(source); | 327 crypto_config.SetChannelIDSource(source); |
328 } | 328 } |
329 if (options.token_binding_enabled) { | 329 if (options.token_binding_enabled) { |
330 crypto_config.tb_key_params.push_back(kP256); | 330 crypto_config.tb_key_params.push_back(kP256); |
331 } | 331 } |
332 TestQuicSpdyClientSession client_session(client_conn, DefaultQuicConfig(), | 332 TestQuicSpdyClientSession client_session(client_conn, DefaultQuicConfig(), |
333 server_id, &crypto_config); | 333 server_id, &crypto_config); |
334 | 334 |
335 EXPECT_CALL(client_session, OnProofValid(testing::_)) | 335 EXPECT_CALL(client_session, OnProofValid(testing::_)) |
336 .Times(testing::AnyNumber()); | 336 .Times(testing::AnyNumber()); |
| 337 EXPECT_CALL(client_session, OnChannelValid()).Times(testing::AnyNumber()); |
337 client_session.GetCryptoStream()->CryptoConnect(); | 338 client_session.GetCryptoStream()->CryptoConnect(); |
338 CHECK_EQ(1u, client_conn->encrypted_packets_.size()); | 339 CHECK_EQ(1u, client_conn->encrypted_packets_.size()); |
339 | 340 |
340 CommunicateHandshakeMessagesAndRunCallbacks( | 341 CommunicateHandshakeMessagesAndRunCallbacks( |
341 client_conn, client_session.GetCryptoStream(), server_conn, server, | 342 client_conn, client_session.GetCryptoStream(), server_conn, server, |
342 async_channel_id_source); | 343 async_channel_id_source); |
343 | 344 |
344 CompareClientAndServerKeys(client_session.GetCryptoStream(), server); | 345 CompareClientAndServerKeys(client_session.GetCryptoStream(), server); |
345 | 346 |
346 if (options.channel_id_enabled) { | 347 if (options.channel_id_enabled) { |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
821 | 822 |
822 ASSERT_EQ(0u, crypto_framer.InputBytesRemaining()); | 823 ASSERT_EQ(0u, crypto_framer.InputBytesRemaining()); |
823 | 824 |
824 for (const CryptoHandshakeMessage& message : crypto_visitor.messages()) { | 825 for (const CryptoHandshakeMessage& message : crypto_visitor.messages()) { |
825 dest_stream->OnHandshakeMessage(message); | 826 dest_stream->OnHandshakeMessage(message); |
826 } | 827 } |
827 } | 828 } |
828 | 829 |
829 } // namespace test | 830 } // namespace test |
830 } // namespace net | 831 } // namespace net |
OLD | NEW |