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