diff --git a/src/commands.rs b/src/commands.rs index 1401b34..9fcb4a9 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -138,6 +138,13 @@ pub(crate) struct GlobalArgs { help = "Credentials to use for proxy authentication in the format username:password." )] pub proxy_credentials: Option, + + #[clap( + long, + help = "Accept invalid TLS certificates.", + long_help = "Accept invalid TLS certificates. Be warned, this is insecure and enables man-in-the-middle attacks." + )] + pub danger_accept_invalid_certs: bool, } #[derive(Debug, Clone, Parser)] diff --git a/src/main.rs b/src/main.rs index d7fe8ad..aaf8b57 100644 --- a/src/main.rs +++ b/src/main.rs @@ -228,6 +228,9 @@ fn run(args: commands::Args) -> anyhow::Result<()> { } http_client = http_client.proxy(proxy); } + if globalargs.danger_accept_invalid_certs { + http_client = http_client.danger_accept_invalid_certs(true); + } let http_client = http_client.build()?; let transport = WebApiTransport::new(http_client);