From b9a8111a00b58e355baf60a55893dbfc70b0dfdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 10 Aug 2021 13:19:45 +0200 Subject: refactor: --unsafely-ignore-certificate-errors (#11629) --- extensions/net/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'extensions/net/lib.rs') diff --git a/extensions/net/lib.rs b/extensions/net/lib.rs index f68034517..fe10abf5f 100644 --- a/extensions/net/lib.rs +++ b/extensions/net/lib.rs @@ -94,16 +94,16 @@ pub struct DefaultTlsOptions { pub root_cert_store: Option, } -/// `UnsafelyTreatInsecureOriginAsSecure` is a wrapper struct so it can be placed inside `GothamState`; +/// `UnsafelyIgnoreCertificateErrors` is a wrapper struct so it can be placed inside `GothamState`; /// using type alias for a `Option>` could work, but there's a high chance /// that there might be another type alias pointing to a `Option>`, which /// would override previously used alias. -pub struct UnsafelyTreatInsecureOriginAsSecure(Option>); +pub struct UnsafelyIgnoreCertificateErrors(Option>); pub fn init( root_cert_store: Option, unstable: bool, - unsafely_treat_insecure_origin_as_secure: Option>, + unsafely_ignore_certificate_errors: Option>, ) -> Extension { let mut ops_to_register = vec![]; ops_to_register.extend(io::init()); @@ -122,8 +122,8 @@ pub fn init( root_cert_store: root_cert_store.clone(), }); state.put(UnstableChecker { unstable }); - state.put(UnsafelyTreatInsecureOriginAsSecure( - unsafely_treat_insecure_origin_as_secure.clone(), + state.put(UnsafelyIgnoreCertificateErrors( + unsafely_ignore_certificate_errors.clone(), )); Ok(()) }) -- cgit v1.2.3