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

Side by Side Diff: net/quic/quic_crypto_server_stream_test.cc

Issue 16638016: Implement ChannelIDVerifier using NSS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Disable QuicCryptoServerStreamTest.ChannelID. Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/crypto/channel_id_test.cc ('k') | no next file » | 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/quic_crypto_server_stream.h" 5 #include "net/quic/quic_crypto_server_stream.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 if (!Aes128Gcm12Encrypter::IsSupported()) { 237 if (!Aes128Gcm12Encrypter::IsSupported()) {
238 LOG(INFO) << "AES GCM not supported. Test skipped."; 238 LOG(INFO) << "AES GCM not supported. Test skipped.";
239 return; 239 return;
240 } 240 }
241 241
242 crypto_config_.SetProofSource(NULL); 242 crypto_config_.SetProofSource(NULL);
243 client_options_.dont_verify_certs = true; 243 client_options_.dont_verify_certs = true;
244 244
245 // Only 2 client hellos need to be sent in the no-certs case: one to get the 245 // Only 2 client hellos need to be sent in the no-certs case: one to get the
246 // source-address token and the second to finish. 246 // source-address token and the second to finish.
247 // TODO(rtenneti): Enable testing of ProofVerifier.
wtc 2013/06/12 23:48:21 This test does not verify certs, so we don't need
ramant (doing other things) 2013/06/12 23:53:24 Sounds great.
248 EXPECT_EQ(2, CompleteCryptoHandshake()); 247 EXPECT_EQ(2, CompleteCryptoHandshake());
249 EXPECT_TRUE(stream_.encryption_established()); 248 EXPECT_TRUE(stream_.encryption_established());
250 EXPECT_TRUE(stream_.handshake_confirmed()); 249 EXPECT_TRUE(stream_.handshake_confirmed());
251 } 250 }
252 251
253 TEST_F(QuicCryptoServerStreamTest, ChannelID) { 252 // TODO(rtenneti): Enable testing of ChannelID.
253 TEST_F(QuicCryptoServerStreamTest, DISABLED_ChannelID) {
254 if (!Aes128Gcm12Encrypter::IsSupported()) { 254 if (!Aes128Gcm12Encrypter::IsSupported()) {
255 LOG(INFO) << "AES GCM not supported. Test skipped."; 255 LOG(INFO) << "AES GCM not supported. Test skipped.";
256 return; 256 return;
257 } 257 }
258 258
259 client_options_.channel_id_enabled = true; 259 client_options_.channel_id_enabled = true;
260 // TODO(rtenneti): Enable testing of ProofVerifier. 260 // TODO(rtenneti): Enable testing of ProofVerifier.
261 EXPECT_EQ(2, CompleteCryptoHandshake()); 261 EXPECT_EQ(2, CompleteCryptoHandshake());
wtc 2013/06/12 23:48:21 With a real implementation of ChannelIDVerifier::V
ramant (doing other things) 2013/06/12 23:53:24 This changes sounds good to me. My pending CL has
262 EXPECT_TRUE(stream_.encryption_established()); 262 EXPECT_TRUE(stream_.encryption_established());
263 EXPECT_TRUE(stream_.handshake_confirmed()); 263 EXPECT_TRUE(stream_.handshake_confirmed());
264 // TODO(rtenneti): Enable testing of ChannelID. 264 EXPECT_EQ(CryptoTestUtils::ChannelIDKeyForHostname("test.example.com"),
265 // EXPECT_EQ(CryptoTestUtils::ChannelIDKeyForHostname("test.example.com"), 265 stream_.crypto_negotiated_params().channel_id);
266 // stream_.crypto_negotiated_params().channel_id);
267 } 266 }
268 267
269 } // namespace 268 } // namespace
270 } // namespace test 269 } // namespace test
271 } // namespace net 270 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/channel_id_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698