kopia lustrzana https://github.com/alecmuffett/eotk
commit: move: abort on any pre-existing PEM clash, figure it out later
rodzic
c963a4a192
commit
bf23e8d0a4
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue