mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-09 02:00:57 +01:00
Correct indentation in run_server_defaults()
This second commit doesn't make any changes to the code, it just corrects the indentation.
This commit is contained in:
parent
ba2a75b093
commit
73a24cba27
10
testssl.sh
10
testssl.sh
@ -6166,8 +6166,9 @@ run_server_defaults() {
|
|||||||
|
|
||||||
if [[ ${success[n]} -ne 0 ]]; then
|
if [[ ${success[n]} -ne 0 ]]; then
|
||||||
cn_nosni="$(toupper "$(get_cn_from_cert $HOSTCERT)")"
|
cn_nosni="$(toupper "$(get_cn_from_cert $HOSTCERT)")"
|
||||||
sans_nosni="$(toupper "$($OPENSSL x509 -in $HOSTCERT -noout -text 2>>$ERRFILE | grep -A2 "Subject Alternative Name" | \
|
sans_nosni="$(toupper "$($OPENSSL x509 -in $HOSTCERT -noout -text 2>>$ERRFILE | \
|
||||||
tr ',' '\n' | grep "DNS:" | sed -e 's/DNS://g' -e 's/ //g' | tr '\n' ' ')")"
|
grep -A2 "Subject Alternative Name" | tr ',' '\n' | grep "DNS:" | \
|
||||||
|
sed -e 's/DNS://g' -e 's/ //g' | tr '\n' ' ')")"
|
||||||
|
|
||||||
echo "${previous_hostcert[1]}" > $HOSTCERT
|
echo "${previous_hostcert[1]}" > $HOSTCERT
|
||||||
cn_sni="$(toupper "$(get_cn_from_cert $HOSTCERT)")"
|
cn_sni="$(toupper "$(get_cn_from_cert $HOSTCERT)")"
|
||||||
@ -6177,8 +6178,9 @@ run_server_defaults() {
|
|||||||
# match if the CNs are the same and the SANs (if
|
# match if the CNs are the same and the SANs (if
|
||||||
# present) contain at least one DNS name in common.
|
# present) contain at least one DNS name in common.
|
||||||
if [[ "$cn_nosni" == "$cn_sni" ]]; then
|
if [[ "$cn_nosni" == "$cn_sni" ]]; then
|
||||||
sans_sni="$(toupper "$($OPENSSL x509 -in $HOSTCERT -noout -text 2>>$ERRFILE | grep -A2 "Subject Alternative Name" | \
|
sans_sni="$(toupper "$($OPENSSL x509 -in $HOSTCERT -noout -text 2>>$ERRFILE | \
|
||||||
tr ',' '\n' | grep "DNS:" | sed -e 's/DNS://g' -e 's/ //g' | tr '\n' ' ')")"
|
grep -A2 "Subject Alternative Name" | tr ',' '\n' | grep "DNS:" | \
|
||||||
|
sed -e 's/DNS://g' -e 's/ //g' | tr '\n' ' ')")"
|
||||||
if [[ "$sans_nosni" == "$sans_sni" ]]; then
|
if [[ "$sans_nosni" == "$sans_sni" ]]; then
|
||||||
success[n]=0
|
success[n]=0
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user