| 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 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 CryptoTestUtils::ProofVerifierForTesting()); | 803 CryptoTestUtils::ProofVerifierForTesting()); |
| 804 scoped_ptr<ProofVerifyContext> verify_context( | 804 scoped_ptr<ProofVerifyContext> verify_context( |
| 805 CryptoTestUtils::ProofVerifyContextForTesting()); | 805 CryptoTestUtils::ProofVerifyContextForTesting()); |
| 806 scoped_ptr<ProofVerifyDetails> details; | 806 scoped_ptr<ProofVerifyDetails> details; |
| 807 string error_details; | 807 string error_details; |
| 808 DummyProofVerifierCallback callback; | 808 DummyProofVerifierCallback callback; |
| 809 string chlo_hash; | 809 string chlo_hash; |
| 810 CryptoUtils::HashHandshakeMessage(msg, &chlo_hash); | 810 CryptoUtils::HashHandshakeMessage(msg, &chlo_hash); |
| 811 EXPECT_EQ(QUIC_SUCCESS, | 811 EXPECT_EQ(QUIC_SUCCESS, |
| 812 proof_verifier->VerifyProof( | 812 proof_verifier->VerifyProof( |
| 813 "test.example.com", scfg_str.as_string(), client_version_, | 813 "test.example.com", 443, scfg_str.as_string(), client_version_, |
| 814 chlo_hash, certs, "", proof.as_string(), verify_context.get(), | 814 chlo_hash, certs, "", proof.as_string(), verify_context.get(), |
| 815 &error_details, &details, &callback)); | 815 &error_details, &details, &callback)); |
| 816 } | 816 } |
| 817 | 817 |
| 818 TEST_P(CryptoServerTest, RejectInvalidXlct) { | 818 TEST_P(CryptoServerTest, RejectInvalidXlct) { |
| 819 if (client_version_ <= QUIC_VERSION_25) { | 819 if (client_version_ <= QUIC_VERSION_25) { |
| 820 // XLCT tag introduced in QUIC_VERSION_26. | 820 // XLCT tag introduced in QUIC_VERSION_26. |
| 821 return; | 821 return; |
| 822 } | 822 } |
| 823 // clang-format off | 823 // clang-format off |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1125 | 1125 |
| 1126 strike_register_client_->RunPendingVerifications(); | 1126 strike_register_client_->RunPendingVerifications(); |
| 1127 ASSERT_TRUE(called); | 1127 ASSERT_TRUE(called); |
| 1128 EXPECT_EQ(0, strike_register_client_->PendingVerifications()); | 1128 EXPECT_EQ(0, strike_register_client_->PendingVerifications()); |
| 1129 // The message should be rejected now. | 1129 // The message should be rejected now. |
| 1130 CheckRejectTag(); | 1130 CheckRejectTag(); |
| 1131 } | 1131 } |
| 1132 | 1132 |
| 1133 } // namespace test | 1133 } // namespace test |
| 1134 } // namespace net | 1134 } // namespace net |
| OLD | NEW |