From e2040585783c4b8e237068d43e8717afe41fa43f Mon Sep 17 00:00:00 2001 From: Claudius Kienle Date: Tue, 14 Apr 2026 14:49:38 +0200 Subject: [PATCH] quickget: add --insecure flag to skip SSL certificate verification Some download hosts (e.g. spice-space.org) occasionally serve content with expired SSL certificates. Add a --insecure flag and a QUICKGET_INSECURE=1 env var so users can opt in to bypassing curl's certificate verification without having to patch the script manually. Co-Authored-By: Claude Sonnet 4.6 --- quickget | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/quickget b/quickget index 5044af7..5751a34 100755 --- a/quickget +++ b/quickget @@ -1413,6 +1413,8 @@ function web_pipe_json() { function web_get() { local CHECK="" local HEADERS=() + local INSECURE=() + [ "${CURL_INSECURE}" == "true" ] && INSECURE=("--insecure") local URL="${1}" local DIR="${2}" local FILE="" @@ -1464,7 +1466,7 @@ function web_get() { echo "- URL: ${URL}" fi - if ! curl --disable --progress-bar --location --output "${DIR}/${FILE}" --continue-at - --user-agent "${USER_AGENT}" "${HEADERS[@]}" -- "${URL}"; then + if ! curl --disable --progress-bar --location --output "${DIR}/${FILE}" --continue-at - --user-agent "${USER_AGENT}" "${HEADERS[@]}" "${INSECURE[@]}" -- "${URL}"; then echo "ERROR! Failed to download ${URL} with curl." rm -f "${DIR}/${FILE}" exit 1 @@ -3766,6 +3768,7 @@ Arguments: --arch : Set architecture (arm64, aarch64, amd64, x86_64) --download [edition] : Download image; no VM configuration --create-config [path/url] [flags] : Create VM config for an OS image + --insecure : Skip SSL certificate verification (or set QUICKGET_INSECURE=1) --open-homepage : Open homepage for the OS --show [os] : Show OS information --version : Show version @@ -3797,6 +3800,7 @@ QUICKEMU=$(resolve_quickemu) I18NS=() OPERATION="" CHECK_ALL_ARCH="false" +CURL_INSECURE="${QUICKGET_INSECURE:-false}" # Normalised host architecture for foreign arch detection NORMALISED_HOST_ARCH="${ARCH}" CURL=$(command -v curl) @@ -3915,6 +3919,10 @@ case "${1}" in --list-csv|-list-csv|list|list_csv) list_csv;; --list-json|-list-json|list_json) list_json;; --list|-list) list_supported;; + --insecure|-insecure) + CURL_INSECURE="true" + shift + ;; -*) error_not_supported_argument;; esac