pub fn default_symcrypt_provider() -> CryptoProviderExpand description
default_symcrypt_provider returns a CryptoProvider using the default SymCrypt configuration and cipher suites.
To see the default cipher suites, please take a look at DEFAULT_CIPHER_SUITES.
Sample usage:
use rustls::{ClientConfig, RootCertStore};
use rustls_symcrypt::default_symcrypt_provider;
use std::sync::Arc;
use webpki_roots;
let mut root_store = RootCertStore {
roots: webpki_roots::TLS_SERVER_ROOTS.iter().cloned().collect(),
};
let mut config =
ClientConfig::builder_with_provider(Arc::new(default_symcrypt_provider()))
.with_safe_default_protocol_versions()
.unwrap()
.with_root_certificates(root_store)
.with_no_client_auth();
// Rest of the connection setup