Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: net/quic/test_tools/crypto_test_utils.cc

Issue 2097123002: QUIC - Race Cert Verification with host resolution if certs are (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Race cert verification. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/quic_stream_factory_test.cc ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/quic/quic_stream_factory_test.cc ('k') | net/quic/test_tools/quic_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698