Skip to main content

tests_fuzz/
lib.rs

1// Copyright 2023 Greptime Team
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15pub mod context;
16pub mod error;
17pub mod fake;
18pub mod generator;
19pub mod ir;
20pub mod translator;
21pub mod utils;
22pub mod validator;
23
24use std::sync::OnceLock;
25
26#[cfg(test)]
27pub mod test_utils;
28
29static RUSTLS_CRYPTO_PROVIDER_INIT: OnceLock<()> = OnceLock::new();
30
31pub fn install_rustls_crypto_provider() {
32    RUSTLS_CRYPTO_PROVIDER_INIT.get_or_init(|| {
33        if rustls::crypto::CryptoProvider::get_default().is_none() {
34            let _ = rustls::crypto::CryptoProvider::install_default(
35                rustls::crypto::aws_lc_rs::default_provider(),
36            );
37        }
38    });
39}