QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 1 | // Copyright (c) 2019 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_PLATFORM_API_QUIC_DEFAULT_PROOF_PROVIDERS_H_ |
| 6 | #define QUICHE_QUIC_PLATFORM_API_QUIC_DEFAULT_PROOF_PROVIDERS_H_ |
| 7 | |
| 8 | #include <memory> |
| 9 | |
| 10 | #include "net/third_party/quiche/src/quic/core/crypto/proof_source.h" |
| 11 | #include "net/third_party/quiche/src/quic/core/crypto/proof_verifier.h" |
| 12 | #include "net/quic/platform/impl/quic_default_proof_providers_impl.h" |
| 13 | |
| 14 | namespace quic { |
| 15 | |
| 16 | // Provides a default proof verifier. The verifier has to do a good faith |
| 17 | // attempt at verifying the certificate against a reasonable root store, and not |
| 18 | // just always return success. |
| 19 | inline std::unique_ptr<ProofVerifier> CreateDefaultProofVerifier() { |
| 20 | return CreateDefaultProofVerifierImpl(); |
| 21 | } |
| 22 | |
| 23 | // Provides a default proof source for CLI-based tools. The actual certificates |
| 24 | // used in the proof source should be confifgurable via command-line flags. |
| 25 | inline std::unique_ptr<ProofSource> CreateDefaultProofSource() { |
| 26 | return CreateDefaultProofSourceImpl(); |
| 27 | } |
| 28 | |
| 29 | } // namespace quic |
| 30 | |
| 31 | #endif // QUICHE_QUIC_PLATFORM_API_QUIC_DEFAULT_PROOF_PROVIDERS_H_ |