rch | c8fda78 | 2019-05-15 16:53:49 -0700 | [diff] [blame] | 1 | // Copyright (c) 2012 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_TOOLS_FAKE_PROOF_VERIFIER_H_ |
| 6 | #define QUICHE_QUIC_TOOLS_FAKE_PROOF_VERIFIER_H_ |
| 7 | |
| 8 | #include "net/third_party/quiche/src/quic/core/crypto/proof_verifier.h" |
QUICHE team | 5015e2e | 2019-12-11 09:38:06 -0800 | [diff] [blame] | 9 | #include "net/third_party/quiche/src/common/platform/api/quiche_string_piece.h" |
rch | c8fda78 | 2019-05-15 16:53:49 -0700 | [diff] [blame] | 10 | |
| 11 | namespace quic { |
| 12 | |
| 13 | // ProofVerifier implementation which always returns success. |
| 14 | class FakeProofVerifier : public ProofVerifier { |
| 15 | public: |
| 16 | ~FakeProofVerifier() override {} |
| 17 | QuicAsyncStatus VerifyProof( |
| 18 | const std::string& /*hostname*/, |
| 19 | const uint16_t /*port*/, |
| 20 | const std::string& /*server_config*/, |
| 21 | QuicTransportVersion /*quic_version*/, |
QUICHE team | 5015e2e | 2019-12-11 09:38:06 -0800 | [diff] [blame] | 22 | quiche::QuicheStringPiece /*chlo_hash*/, |
rch | c8fda78 | 2019-05-15 16:53:49 -0700 | [diff] [blame] | 23 | const std::vector<std::string>& /*certs*/, |
| 24 | const std::string& /*cert_sct*/, |
| 25 | const std::string& /*signature*/, |
| 26 | const ProofVerifyContext* /*context*/, |
| 27 | std::string* /*error_details*/, |
| 28 | std::unique_ptr<ProofVerifyDetails>* /*details*/, |
| 29 | std::unique_ptr<ProofVerifierCallback> /*callback*/) override { |
| 30 | return QUIC_SUCCESS; |
| 31 | } |
| 32 | QuicAsyncStatus VerifyCertChain( |
| 33 | const std::string& /*hostname*/, |
| 34 | const std::vector<std::string>& /*certs*/, |
| 35 | const std::string& /*ocsp_response*/, |
| 36 | const std::string& /*cert_sct*/, |
| 37 | const ProofVerifyContext* /*context*/, |
| 38 | std::string* /*error_details*/, |
| 39 | std::unique_ptr<ProofVerifyDetails>* /*details*/, |
| 40 | std::unique_ptr<ProofVerifierCallback> /*callback*/) override { |
| 41 | return QUIC_SUCCESS; |
| 42 | } |
| 43 | std::unique_ptr<ProofVerifyContext> CreateDefaultContext() override { |
| 44 | return nullptr; |
| 45 | } |
| 46 | }; |
| 47 | |
| 48 | } // namespace quic |
| 49 | |
| 50 | #endif // QUICHE_QUIC_TOOLS_FAKE_PROOF_VERIFIER_H_ |