QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 1 | // Copyright (c) 2017 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef QUICHE_QUIC_TEST_TOOLS_FAILING_PROOF_SOURCE_H_ |
| 6 | #define QUICHE_QUIC_TEST_TOOLS_FAILING_PROOF_SOURCE_H_ |
| 7 | |
| 8 | #include "net/third_party/quiche/src/quic/core/crypto/proof_source.h" |
QUICHE team | 6dcf6ab | 2019-12-11 10:10:51 -0800 | [diff] [blame] | 9 | #include "net/third_party/quiche/src/common/platform/api/quiche_string_piece.h" |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 10 | |
| 11 | namespace quic { |
| 12 | namespace test { |
| 13 | |
| 14 | class FailingProofSource : public ProofSource { |
| 15 | public: |
| 16 | void GetProof(const QuicSocketAddress& server_address, |
danzh | d1fc591 | 2020-05-01 15:29:04 -0700 | [diff] [blame] | 17 | const QuicSocketAddress& client_address, |
vasilvv | c48c871 | 2019-03-11 13:38:16 -0700 | [diff] [blame] | 18 | const std::string& hostname, |
| 19 | const std::string& server_config, |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 20 | QuicTransportVersion transport_version, |
QUICHE team | 6dcf6ab | 2019-12-11 10:10:51 -0800 | [diff] [blame] | 21 | quiche::QuicheStringPiece chlo_hash, |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 22 | std::unique_ptr<Callback> callback) override; |
| 23 | |
| 24 | QuicReferenceCountedPointer<Chain> GetCertChain( |
| 25 | const QuicSocketAddress& server_address, |
danzh | d1fc591 | 2020-05-01 15:29:04 -0700 | [diff] [blame] | 26 | const QuicSocketAddress& client_address, |
vasilvv | c48c871 | 2019-03-11 13:38:16 -0700 | [diff] [blame] | 27 | const std::string& hostname) override; |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 28 | |
| 29 | void ComputeTlsSignature( |
| 30 | const QuicSocketAddress& server_address, |
danzh | d1fc591 | 2020-05-01 15:29:04 -0700 | [diff] [blame] | 31 | const QuicSocketAddress& client_address, |
vasilvv | c48c871 | 2019-03-11 13:38:16 -0700 | [diff] [blame] | 32 | const std::string& hostname, |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 33 | uint16_t signature_algorithm, |
QUICHE team | 6dcf6ab | 2019-12-11 10:10:51 -0800 | [diff] [blame] | 34 | quiche::QuicheStringPiece in, |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 35 | std::unique_ptr<SignatureCallback> callback) override; |
nharper | 037c21b | 2020-04-23 14:41:35 -0700 | [diff] [blame] | 36 | |
nharper | 1f8289a | 2020-04-27 11:57:28 -0700 | [diff] [blame] | 37 | TicketCrypter* GetTicketCrypter() override { return nullptr; } |
QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 38 | }; |
| 39 | |
| 40 | } // namespace test |
| 41 | } // namespace quic |
| 42 | |
| 43 | #endif // QUICHE_QUIC_TEST_TOOLS_FAILING_PROOF_SOURCE_H_ |