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 | 237 | .It Sy tabstop |
| 238 | 238 | Number of spaces that a <Tab> counts for. |
| 239 | 239 | Defaults to 4. |
| 240 | |
| 241 | .It Sy ssl_verify |
| 242 | Enable SSL verification for the HTTP requests. |
| 243 | Defaults to true. |
| 240 | 244 | .El |
| 241 | 245 | .Ss Example 1: Avoid showing Emojis (useful for terminals w/o support) |
| 242 | 246 | .Bd -literal -offset indent |
src/config.rs
+4
| @@ -540,6 +540,7 @@ pub struct TunableValues { |
| 540 | 540 | pub user_gutter_width: usize, |
| 541 | 541 | pub external_edit_file_suffix: String, |
| 542 | 542 | pub tabstop: usize, |
| 543 | pub ssl_verify: bool, |
| 543 | 544 | } |
| 544 | 545 | |
| 545 | 546 | #[derive(Clone, Default, Deserialize)] |
| @@ -569,6 +570,7 @@ pub struct Tunables { |
| 569 | 570 | pub user_gutter_width: Option<usize>, |
| 570 | 571 | pub external_edit_file_suffix: Option<String>, |
| 571 | 572 | pub tabstop: Option<usize>, |
| 573 | pub ssl_verify: Option<bool>, |
| 572 | 574 | } |
| 573 | 575 | |
| 574 | 576 | impl Tunables { |
| @@ -604,6 +606,7 @@ impl Tunables { |
| 604 | 606 | .external_edit_file_suffix |
| 605 | 607 | .or(other.external_edit_file_suffix), |
| 606 | 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 | 638 | .external_edit_file_suffix |
| 636 | 639 | .unwrap_or_else(|| ".md".to_string()), |
| 637 | 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 | 203 | image_preview: None, |
| 204 | 204 | user_gutter_width: 30, |
| 205 | 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 | 715 | .pool_idle_timeout(Duration::from_secs(60)) |
| 716 | 716 | .pool_max_idle_per_host(10) |
| 717 | 717 | .tcp_keepalive(Duration::from_secs(10)) |
| 718 | .danger_accept_invalid_certs(!settings.tunables.ssl_verify) |
| 718 | 719 | .build() |
| 719 | 720 | .unwrap(); |
| 720 | 721 | |