Skip to content

Commit 193aa35

Browse files
authored
fix(crypto): install a default crypto provider at process level (#749)
* fix(crypto): install a default crypto provider at process level * fix: don' panick if there's already a default crypto
1 parent 65fe0fe commit 193aa35

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/lib_context.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ pub fn create_lib_context(settings: settings::Settings) -> Result<LibContext> {
247247
let _ = env_logger::try_init();
248248

249249
pyo3_async_runtimes::tokio::init_with_runtime(get_runtime()).unwrap();
250+
251+
let _ = rustls::crypto::aws_lc_rs::default_provider().install_default();
250252
});
251253

252254
let db_pools = DbPools::default();

src/ops/targets/qdrant.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,6 @@ impl StorageFactoryBase for Factory {
297297
Vec<TypedExportDataCollectionBuildOutput<Self>>,
298298
Vec<(CollectionKey, SetupState)>,
299299
)> {
300-
// Hotfix to resolve
301-
// `no process-level CryptoProvider available -- call CryptoProvider::install_default() before this point`
302-
// when using HTTPS URLs.
303-
let _ = rustls::crypto::ring::default_provider().install_default();
304-
305300
let data_coll_output = data_collections
306301
.into_iter()
307302
.map(|d| {

0 commit comments

Comments
 (0)