commit: move: abort on any pre-existing PEM clash, figure it out later

pull/33/head
Alec Muffett 2019-01-21 14:58:51 +00:00
rodzic c963a4a192
commit bf23e8d0a4
1 zmienionych plików z 8 dodań i 7 usunięć

Wyświetl plik

@ -16,6 +16,14 @@ certfile="$PRIMARY.cert"
this=`basename $0`
# abort on any pre-existing PEM clash, figure it out later
for existing in $pemfile $csrfile $certfile ; do
if [ -s $existing ] ; then
echo $this: $existing already exists, exiting... 1>&2
exit 1
fi
done
tmp_suffix="$$.tmp"
dns="dns_${tmp_suffix}"
@ -67,13 +75,6 @@ dn_o="The SSL Onion Space" # OrganizationName
dn_ou="Self Signed Certificates" # OrganizationalUnitName
SUBJECT="/C=${dn_c}/ST=${dn_st}/L=${dn_l}/O=${dn_o}/OU=${dn_ou}/CN=${PRIMARY}"
for existing in $pemfile $csrfile $certfile ; do
if [ -s $existing ] ; then
echo $this: $existing already exists, exiting... 1>&2
exit 1
fi
done
subjectaltname=`awk '{printf "DNS." NR ":" $1 ","}' < $dns | sed -e 's/,$//'`
rm $dns