summaryrefslogtreecommitdiff
path: root/sign-request.in
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-09-03 10:59:44 +0200
committerErich Eckner <git@eckner.net>2019-09-03 10:59:44 +0200
commit6ef9ed3ba2e187b0a4efd1fd8f2ee922ab01c777 (patch)
treed135beaf48d6655205d459e5f86c2a826523cf26 /sign-request.in
parentc6179a2a39695402ec6e3007957bebf72bc55669 (diff)
downloadsimple-pki-6ef9ed3ba2e187b0a4efd1fd8f2ee922ab01c777.tar.xz
sign-request: connection-timeout 10 for curl
Diffstat (limited to 'sign-request.in')
-rwxr-xr-xsign-request.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/sign-request.in b/sign-request.in
index c4d9ba7..3de4e56 100755
--- a/sign-request.in
+++ b/sign-request.in
@@ -19,7 +19,7 @@ trap 'rm -rf --one-file-system "${tmp_dir}"' EXIT
while read -r csr; do
csr_local="${tmp_dir}/${csr##*/}"
- curl -Ss --insecure "${csr}" -o "${csr_local}"
+ curl --connect-timeout 10 -Ss --insecure "${csr}" -o "${csr_local}"
if ! content=$(
openssl req -text -noout -verify -in "${csr_local}" 2>/dev/null
); then
@@ -78,7 +78,7 @@ while read -r csr; do
ok_sans=$(
printf '%s\n' "${cn}" "${sans}" \
| while read -r san; do
- if ! curl -Ss --insecure 'https://'"${san}/${csr#*//*/}" \
+ if ! curl --connect-timeout 10 -Ss --insecure 'https://'"${san}/${csr#*//*/}" \
| diff -q - "${csr_local}"; then
>&2 printf 'invalid san "%s" - skipping\n' "${san}"
rm "${csr_local}"