From e8715224102df9310ad4f833844fca582d211c11 Mon Sep 17 00:00:00 2001 From: Tortue Torche <126358-tortuetorche@users.noreply.gitlab.com> Date: Fri, 3 Dec 2021 18:34:53 +0100 Subject: [PATCH] Fix PSU when using a custom Certificate Authority (CA) With the HTTPIE_VERIFY_SSL environment variable set with a path, e.g. HTTPIE_VERIFY_SSL=/etc/ssl/certs/ca-certificates.crt For more information, see: https://curl.se/docs/manpage.html#--cacert --- CHANGELOG.md | 3 +++ psu | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 384415e..5b168b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Add `linux/arm/v7` architecture to support Raspberry Pi +### Fixed +- `psu` was unusable when using a custom CA, with the `HTTPIE_VERIFY_SSL` env + ## [1.3.0-beta.1] - 2021-11-30 ### Added - Docker images are now multi-architecture (`linux/amd64` and `linux/arm64` 🦾) diff --git a/psu b/psu index c35bda5..ccfc417 100755 --- a/psu +++ b/psu @@ -948,7 +948,7 @@ curl_wrapper() { $curl_fail_params \ --header "Content-Type: application/json" \ --silent \ - $(if [ "$HTTPIE_VERIFY_SSL" == "no" ]; then echo --insecure; else $(if [ -f "$HTTPIE_VERIFY_SSL" ]; then echo --cacert "$HTTPIE_VERIFY_SSL"; else echo ''; fi); fi) \ + $(if [ "$HTTPIE_VERIFY_SSL" == "no" ]; then echo --insecure; elif [ -f "$HTTPIE_VERIFY_SSL" ]; then echo --cacert "$HTTPIE_VERIFY_SSL"; else echo ''; fi) \ "$@")" result_exit_code="$?"