xref: /aosp_15_r20/external/cronet/net/third_party/quiche/src/quiche/quic/test_tools/failing_proof_source.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
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 "absl/strings/string_view.h"
9 #include "quiche/quic/core/crypto/proof_source.h"
10 
11 namespace quic {
12 namespace test {
13 
14 class FailingProofSource : public ProofSource {
15  public:
16   void GetProof(const QuicSocketAddress& server_address,
17                 const QuicSocketAddress& client_address,
18                 const std::string& hostname, const std::string& server_config,
19                 QuicTransportVersion transport_version,
20                 absl::string_view chlo_hash,
21                 std::unique_ptr<Callback> callback) override;
22 
23   quiche::QuicheReferenceCountedPointer<Chain> GetCertChain(
24       const QuicSocketAddress& server_address,
25       const QuicSocketAddress& client_address, const std::string& hostname,
26       bool* cert_matched_sni) override;
27 
28   void ComputeTlsSignature(
29       const QuicSocketAddress& server_address,
30       const QuicSocketAddress& client_address, const std::string& hostname,
31       uint16_t signature_algorithm, absl::string_view in,
32       std::unique_ptr<SignatureCallback> callback) override;
33 
SupportedTlsSignatureAlgorithms()34   absl::InlinedVector<uint16_t, 8> SupportedTlsSignatureAlgorithms()
35       const override {
36     return {};
37   }
38 
GetTicketCrypter()39   TicketCrypter* GetTicketCrypter() override { return nullptr; }
40 };
41 
42 }  // namespace test
43 }  // namespace quic
44 
45 #endif  // QUICHE_QUIC_TEST_TOOLS_FAILING_PROOF_SOURCE_H_
46