| 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 <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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |