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
This commit is contained in:
Tortue Torche 2021-12-03 18:34:53 +01:00
parent a4cdca2801
commit e871522410
2 changed files with 4 additions and 1 deletions

View File

@ -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 <abbr title="Certificate Authority">CA</abbr>, 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` 🦾)

2
psu
View File

@ -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="$?"