diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2021-08-10 13:19:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-10 13:19:45 +0200 |
commit | b9a8111a00b58e355baf60a55893dbfc70b0dfdd (patch) | |
tree | 99f88f95143ddeaa11f77dd80dccacb03f6d5270 /extensions/net/lib.rs | |
parent | 465cf9a6fe2d77f4c3cdaeb8eea60bd2b8697608 (diff) |
refactor: --unsafely-ignore-certificate-errors (#11629)
Diffstat (limited to 'extensions/net/lib.rs')
-rw-r--r-- | extensions/net/lib.rs | 10 |
1 files changed, 5 insertions, 5 deletions
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<RootCertStore>, } -/// `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<Vec<String>>` could work, but there's a high chance /// that there might be another type alias pointing to a `Option<Vec<String>>`, which /// would override previously used alias. -pub struct UnsafelyTreatInsecureOriginAsSecure(Option<Vec<String>>); +pub struct UnsafelyIgnoreCertificateErrors(Option<Vec<String>>); pub fn init<P: NetPermissions + 'static>( root_cert_store: Option<RootCertStore>, unstable: bool, - unsafely_treat_insecure_origin_as_secure: Option<Vec<String>>, + unsafely_ignore_certificate_errors: Option<Vec<String>>, ) -> Extension { let mut ops_to_register = vec![]; ops_to_register.extend(io::init()); @@ -122,8 +122,8 @@ pub fn init<P: NetPermissions + 'static>( 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(()) }) |