Commit 504970e2 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

fix(ca-certs): use custom CA certs with curl

Uses CURL_CA_BUNDLE variable
Fixes #31
parent a3d8621d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -163,17 +163,19 @@ stages:
    then
      return
    fi
    # creat a writable folder for the keystore and certs
    # create a writable folder for the keystore and certs
    mkdir -p /tmp/certs

    # import in system
    if echo "$certs" >> /tmp/certs/ca-certificates.crt
    then
      log_info "CA certificates imported in \\e[33;1m/tmp/certs/ca-certificates.crt\\e[0m"
      export CURL_CA_BUNDLE=/tmp/certs/ca-certificates.crt
    fi
    if echo "$certs" >> /tmp/certs/cert.pem
    then
      log_info "CA certificates imported in \\e[33;1m/tmp/certs/cert.pem\\e[0m"
      export CURL_CA_BUNDLE=/tmp/certs/cert.pem
    fi

    # import in Java keystore (if keytool command found)