Crypto provider test fixes
This commit is contained in:
@@ -21,6 +21,7 @@ pub struct DavSeed {
|
||||
|
||||
impl DavSeed {
|
||||
pub fn new(base: impl Into<String>, user: &str, password: &str) -> Self {
|
||||
super::install_crypto_provider();
|
||||
let agent = ureq::Agent::config_builder()
|
||||
.http_status_as_error(false)
|
||||
.allow_non_standard_methods(true)
|
||||
|
||||
@@ -22,6 +22,16 @@ pub mod webdav;
|
||||
|
||||
pub use error::{ContainerError, ContainerResult};
|
||||
|
||||
use std::sync::Once;
|
||||
|
||||
static CRYPTO_INIT: Once = Once::new();
|
||||
|
||||
pub fn install_crypto_provider() {
|
||||
CRYPTO_INIT.call_once(|| {
|
||||
let _ = rustls::crypto::aws_lc_rs::default_provider().install_default();
|
||||
});
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Endpoint {
|
||||
pub host: String,
|
||||
|
||||
Reference in New Issue
Block a user