mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +01:00
- Fix #46 (preload lists HPKP and HSTS)
- word match for includeSubDomains (useful if one specified the keyword wrong)
This commit is contained in:
parent
b0a40ae1e8
commit
f203b8b299
10
testssl.sh
10
testssl.sh
@ -435,13 +435,17 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
includeSubDomains() {
|
includeSubDomains() {
|
||||||
if grep -aiq includeSubDomains "$1"; then
|
if grep -aiqw includeSubDomains "$1"; then
|
||||||
pr_litegreen ", includeSubDomains"
|
pr_litegreen ", includeSubDomains"
|
||||||
else
|
else
|
||||||
pr_litecyan ", just this domain"
|
pr_litecyan ", just this domain"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
preload() {
|
||||||
|
grep -aiqw preload "$1" && pr_litegreen ", preload"
|
||||||
|
}
|
||||||
|
|
||||||
hsts() {
|
hsts() {
|
||||||
pr_bold " HSTS "
|
pr_bold " HSTS "
|
||||||
if [ ! -s $HEADERFILE ] ; then
|
if [ ! -s $HEADERFILE ] ; then
|
||||||
@ -458,6 +462,7 @@ hsts() {
|
|||||||
pr_brown "$AGE_DAYS days (<$HSTS_MIN is not good enough)"
|
pr_brown "$AGE_DAYS days (<$HSTS_MIN is not good enough)"
|
||||||
fi
|
fi
|
||||||
includeSubDomains "$TMPFILE"
|
includeSubDomains "$TMPFILE"
|
||||||
|
preload "$TMPFILE" #FIXME: To be checked against: e.g. https://dxr.mozilla.org/mozilla-central/source/security/manager/boot/src/nsSTSPreloadList.inc and https://chromium.googlesource.com/chromium/src/+/master/net/http/transport_security_state_static.json
|
||||||
else
|
else
|
||||||
out "--"
|
out "--"
|
||||||
fi
|
fi
|
||||||
@ -483,6 +488,7 @@ hpkp() {
|
|||||||
pr_brown "$AGE_DAYS days (<$HPKP_MIN is not good enough)"
|
pr_brown "$AGE_DAYS days (<$HPKP_MIN is not good enough)"
|
||||||
fi
|
fi
|
||||||
includeSubDomains "$TMPFILE"
|
includeSubDomains "$TMPFILE"
|
||||||
|
preload "$TMPFILE"
|
||||||
out ", fingerprints not checked"
|
out ", fingerprints not checked"
|
||||||
else
|
else
|
||||||
out "--"
|
out "--"
|
||||||
@ -2853,6 +2859,6 @@ case "$1" in
|
|||||||
exit $ret ;;
|
exit $ret ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# $Id: testssl.sh,v 1.189 2015/02/15 12:14:10 dirkw Exp $
|
# $Id: testssl.sh,v 1.190 2015/02/15 12:37:43 dirkw Exp $
|
||||||
# vim:ts=5:sw=5
|
# vim:ts=5:sw=5
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user