summaryrefslogtreecommitdiff
path: root/ext/net/ops_tls.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/net/ops_tls.rs')
-rw-r--r--ext/net/ops_tls.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/ext/net/ops_tls.rs b/ext/net/ops_tls.rs
index 8a7757066..b9b37b328 100644
--- a/ext/net/ops_tls.rs
+++ b/ext/net/ops_tls.rs
@@ -813,14 +813,10 @@ where
.try_borrow::<UnsafelyIgnoreCertificateErrors>()
.and_then(|it| it.0.clone());
- // TODO(@justinmchase): Ideally the certificate store is created once
- // and not cloned. The store should be wrapped in Arc<T> to reduce
- // copying memory unnecessarily.
let root_cert_store = state
.borrow()
.borrow::<DefaultTlsOptions>()
- .root_cert_store
- .clone();
+ .root_cert_store()?;
let resource_rc = state
.borrow_mut()
@@ -912,8 +908,7 @@ where
let root_cert_store = state
.borrow()
.borrow::<DefaultTlsOptions>()
- .root_cert_store
- .clone();
+ .root_cert_store()?;
let hostname_dns = ServerName::try_from(&*addr.hostname)
.map_err(|_| invalid_hostname(&addr.hostname))?;
let connect_addr = resolve_addr(&addr.hostname, addr.port)