summaryrefslogtreecommitdiff
path: root/sign-request.in
diff options
context:
space:
mode:
Diffstat (limited to 'sign-request.in')
-rwxr-xr-xsign-request.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/sign-request.in b/sign-request.in
index 191bbea..56f041e 100755
--- a/sign-request.in
+++ b/sign-request.in
@@ -28,7 +28,13 @@ trap 'rm -rf --one-file-system "${tmp_dir}"' EXIT
while read -r csr; do
csr_local="${tmp_dir}/${csr##*/}"
- curl --connect-timeout 10 -Ss --insecure "${csr}" -o "${csr_local}"
+ host="${csr#*://}"
+ host="${host%%/*}"
+ curl -Ss \
+ --resolve "${host}:443:${SSH_CLIENT%% *}" \
+ --resolve "${host}:80:${SSH_CLIENT%% *}" \
+ --connect-timeout 10 \
+ --insecure "${csr}" -o "${csr_local}"
if ! content=$(
openssl req -text -noout -verify -in "${csr_local}" 2>/dev/null
); then