Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
use super::{HttpApiClient, HttpApiResponse};
+/// See [`set_verify_callback`](openssl::ssl::SslContextBuilder::set_verify_callback()).
+pub type TlsCallback = dyn Fn(bool, &mut x509::X509StoreContextRef) -> bool + Send + Sync + 'static;
#[derive(Default)]
pub enum TlsOptions {
/// Default TLS verification.
CaCert(X509),
/// Use a callback for certificate verification.
- Callback(Box<dyn Fn(bool, &mut x509::X509StoreContextRef) -> bool + Send + Sync + 'static>),
+ Callback(Box<TlsCallback>),
}
impl TlsOptions {