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 that can verify a cert chain for |host|. 17 // The verifier has to do a good faith attempt at verifying the certificate 18 // against a reasonable root store, and not just always return success. CreateDefaultProofVerifier(const std::string & host)19inline std::unique_ptr<ProofVerifier> CreateDefaultProofVerifier( 20 const std::string& host) { 21 return CreateDefaultProofVerifierImpl(host); 22 } 23 24 // Provides a default proof source for CLI-based tools. The actual certificates 25 // used in the proof source should be confifgurable via command-line flags. CreateDefaultProofSource()26inline std::unique_ptr<ProofSource> CreateDefaultProofSource() { 27 return CreateDefaultProofSourceImpl(); 28 } 29 30 } // namespace quic 31 32 #endif // QUICHE_QUIC_PLATFORM_API_QUIC_DEFAULT_PROOF_PROVIDERS_H_ 33