From 03433ef02419e7f48d6819f2ca603395a881e1a8 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Wed, 29 Jun 2022 01:28:27 +1000 Subject: [PATCH] Enable secure mode for `cargo-binstall` (#9) `--secure` mode enforce downloads over secure transports only. As a result, http will be disabled, and it will also set min tls version to be 1.2 Signed-off-by: Jiahao XU --- main.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.sh b/main.sh index f38cfb81..e15b126b 100755 --- a/main.sh +++ b/main.sh @@ -88,12 +88,15 @@ cargo_binstall() { install_cargo_binstall + # --secure mode enforce downloads over secure transports only. + # As a result, http will be disabled, and it will also set + # min tls version to be 1.2 case "${version}" in latest) - cargo binstall --no-confirm "$tool" + cargo binstall --secure --no-confirm "$tool" ;; *) - cargo binstall --no-confirm --version "$version" "$tool" + cargo binstall --secure --no-confirm --version "$version" "$tool" ;; esac }