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

Side by Side Diff: net/quic/crypto/crypto_server_test.cc

Issue 1780983002: Provide valid port on HPKP reports for QUIC connections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix missed tests Created 4 years, 9 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
OLDNEW
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 <ostream> 5 #include <ostream>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "crypto/secure_hash.h" 9 #include "crypto/secure_hash.h"
10 #include "net/quic/crypto/cert_compressor.h" 10 #include "net/quic/crypto/cert_compressor.h"
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 common_cert_sets, &certs)); 870 common_cert_sets, &certs));
871 871
872 // Check that the proof in the REJ message is valid. 872 // Check that the proof in the REJ message is valid.
873 scoped_ptr<ProofVerifier> proof_verifier( 873 scoped_ptr<ProofVerifier> proof_verifier(
874 CryptoTestUtils::ProofVerifierForTesting()); 874 CryptoTestUtils::ProofVerifierForTesting());
875 scoped_ptr<ProofVerifyContext> verify_context( 875 scoped_ptr<ProofVerifyContext> verify_context(
876 CryptoTestUtils::ProofVerifyContextForTesting()); 876 CryptoTestUtils::ProofVerifyContextForTesting());
877 scoped_ptr<ProofVerifyDetails> details; 877 scoped_ptr<ProofVerifyDetails> details;
878 string error_details; 878 string error_details;
879 DummyProofVerifierCallback callback; 879 DummyProofVerifierCallback callback;
880 EXPECT_EQ(QUIC_SUCCESS, proof_verifier->VerifyProof( 880 EXPECT_EQ(QUIC_SUCCESS,
881 "test.example.com", scfg_str.as_string(), certs, 881 proof_verifier->VerifyProof("test.example.com", 443,
882 "", proof.as_string(), verify_context.get(), 882 scfg_str.as_string(), certs, "",
883 &error_details, &details, &callback)); 883 proof.as_string(), verify_context.get(),
884 &error_details, &details, &callback));
884 } 885 }
885 886
886 TEST_P(CryptoServerTest, RejectInvalidXlct) { 887 TEST_P(CryptoServerTest, RejectInvalidXlct) {
887 if (client_version_ <= QUIC_VERSION_25) { 888 if (client_version_ <= QUIC_VERSION_25) {
888 // XLCT tag introduced in QUIC_VERSION_26. 889 // XLCT tag introduced in QUIC_VERSION_26.
889 return; 890 return;
890 } 891 }
891 // clang-format off 892 // clang-format off
892 CryptoHandshakeMessage msg = CryptoTestUtils::Message( 893 CryptoHandshakeMessage msg = CryptoTestUtils::Message(
893 "CHLO", 894 "CHLO",
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 1193
1193 strike_register_client_->RunPendingVerifications(); 1194 strike_register_client_->RunPendingVerifications();
1194 ASSERT_TRUE(called); 1195 ASSERT_TRUE(called);
1195 EXPECT_EQ(0, strike_register_client_->PendingVerifications()); 1196 EXPECT_EQ(0, strike_register_client_->PendingVerifications());
1196 // The message should be rejected now. 1197 // The message should be rejected now.
1197 CheckRejectTag(); 1198 CheckRejectTag();
1198 } 1199 }
1199 1200
1200 } // namespace test 1201 } // namespace test
1201 } // namespace net 1202 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/crypto/proof_test.cc » ('j') | net/quic/crypto/proof_verifier_chromium.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698