#[cfg(feature = "rcgen_ca")]
mod rcgen_authority;
use product_os_http::uri::Authority;
use std::{future::Future, sync::Arc};
use tokio_rustls::rustls::ServerConfig;
#[cfg(feature = "openssl_ca")]
pub use openssl::*;
#[cfg(feature = "rcgen_ca")]
pub use rcgen_authority::*;
const TTL_SECS: i64 = 365 * 24 * 60 * 60;
const CACHE_TTL: u64 = TTL_SECS as u64 / 2;
const NOT_BEFORE_OFFSET: i64 = 60;
pub trait CertificateAuthority: Send + Sync + 'static {
fn gen_server_config(
&self,
authority: &Authority,
) -> impl Future<Output = Arc<ServerConfig>> + Send;
}