Commit 8283ffeb authored by Vincent Pelletier's avatar Vincent Pelletier

shell: Resist inputs starting with dashes.

parent 2261582d
......@@ -938,7 +938,7 @@ EOF
crt="$(getCertificate "${ca_anon_url}/${mode_path}" "$csr_id")"
status=$?
test $status -ne 0 && return $status
if [ "$crt_path" = '-' ]; then
if [ "x$crt_path" = 'x-' ]; then
printf '%s\n' "$crt"
else
if [ -e "$crt_path" ]; then
......@@ -1002,7 +1002,7 @@ EOF
)"
status=$?
test $status -ne 0 && return $status
if [ "$csr_path" = '-' ]; then
if [ "x$csr_path" = 'x-' ]; then
printf '%s\n' "$csr"
else
printf '%s\n' "$csr" > "$csr_path"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment