Commit e5df6d1e20
e5df6d1e201a2e14832f436fe60ad28b2a56c7cb
parent: 4cdf674d51
Unregistered key
Stefano Debenedetti <44903077+demaledetti@users.noreply.github.com> · 2026-07-24 15:42 UTC
committer: <noreply@github.com>
Support disabling SSL verification (#565)
Layout: unified · split
docs/iamb.5
+4
| @@ -237,6 +237,10 @@ Defaults to 30. |
| 237 | .It Sy tabstop |
237 | .It Sy tabstop |
| 238 | Number of spaces that a <Tab> counts for. |
238 | Number of spaces that a <Tab> counts for. |
| 239 | Defaults to 4. |
239 | Defaults to 4. |
| |
240 | |
| |
241 | .It Sy ssl_verify |
| |
242 | Enable SSL verification for the HTTP requests. |
| |
243 | Defaults to true. |
| 240 | .El |
244 | .El |
| 241 | .Ss Example 1: Avoid showing Emojis (useful for terminals w/o support) |
245 | .Ss Example 1: Avoid showing Emojis (useful for terminals w/o support) |
| 242 | .Bd -literal -offset indent |
246 | .Bd -literal -offset indent |
src/config.rs
+4
| @@ -540,6 +540,7 @@ pub struct TunableValues { |
| 540 | pub user_gutter_width: usize, |
540 | pub user_gutter_width: usize, |
| 541 | pub external_edit_file_suffix: String, |
541 | pub external_edit_file_suffix: String, |
| 542 | pub tabstop: usize, |
542 | pub tabstop: usize, |
| |
543 | pub ssl_verify: bool, |
| 543 | } |
544 | } |
| 544 | |
545 | |
| 545 | #[derive(Clone, Default, Deserialize)] |
546 | #[derive(Clone, Default, Deserialize)] |
| @@ -569,6 +570,7 @@ pub struct Tunables { |
| 569 | pub user_gutter_width: Option<usize>, |
570 | pub user_gutter_width: Option<usize>, |
| 570 | pub external_edit_file_suffix: Option<String>, |
571 | pub external_edit_file_suffix: Option<String>, |
| 571 | pub tabstop: Option<usize>, |
572 | pub tabstop: Option<usize>, |
| |
573 | pub ssl_verify: Option<bool>, |
| 572 | } |
574 | } |
| 573 | |
575 | |
| 574 | impl Tunables { |
576 | impl Tunables { |
| @@ -604,6 +606,7 @@ impl Tunables { |
| 604 | .external_edit_file_suffix |
606 | .external_edit_file_suffix |
| 605 | .or(other.external_edit_file_suffix), |
607 | .or(other.external_edit_file_suffix), |
| 606 | tabstop: self.tabstop.or(other.tabstop), |
608 | tabstop: self.tabstop.or(other.tabstop), |
| |
609 | ssl_verify: self.ssl_verify.or(other.ssl_verify), |
| 607 | } |
610 | } |
| 608 | } |
611 | } |
| 609 | |
612 | |
| @@ -635,6 +638,7 @@ impl Tunables { |
| 635 | .external_edit_file_suffix |
638 | .external_edit_file_suffix |
| 636 | .unwrap_or_else(|| ".md".to_string()), |
639 | .unwrap_or_else(|| ".md".to_string()), |
| 637 | tabstop: self.tabstop.unwrap_or(4), |
640 | tabstop: self.tabstop.unwrap_or(4), |
| |
641 | ssl_verify: self.ssl_verify.unwrap_or(true), |
| 638 | } |
642 | } |
| 639 | } |
643 | } |
| 640 | } |
644 | } |
src/tests.rs
+1
| @@ -203,6 +203,7 @@ pub fn mock_tunables() -> TunableValues { |
| 203 | image_preview: None, |
203 | image_preview: None, |
| 204 | user_gutter_width: 30, |
204 | user_gutter_width: 30, |
| 205 | tabstop: 4, |
205 | tabstop: 4, |
| |
206 | ssl_verify: true, |
| 206 | } |
207 | } |
| 207 | } |
208 | } |
| 208 | |
209 | |
src/worker.rs
+1
| @@ -715,6 +715,7 @@ async fn create_client_inner( |
| 715 | .pool_idle_timeout(Duration::from_secs(60)) |
715 | .pool_idle_timeout(Duration::from_secs(60)) |
| 716 | .pool_max_idle_per_host(10) |
716 | .pool_max_idle_per_host(10) |
| 717 | .tcp_keepalive(Duration::from_secs(10)) |
717 | .tcp_keepalive(Duration::from_secs(10)) |
| |
718 | .danger_accept_invalid_certs(!settings.tunables.ssl_verify) |
| 718 | .build() |
719 | .build() |
| 719 | .unwrap(); |
720 | .unwrap(); |
| 720 | |
721 | |