mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +01:00
Check result of openssl when renegotiating
An OpenSSL error could influence the test result
This commit is contained in:
parent
d0d7bb47e2
commit
7994fab035
@ -2081,10 +2081,16 @@ renego() {
|
||||
pr_bold " Renegotiation "; out "(CVE 2009-3555) "
|
||||
NEG_STR="Secure Renegotiation IS NOT"
|
||||
echo "R" | $OPENSSL s_client $STARTTLS -connect $NODEIP:$PORT $SNI 2>&1 | grep -iq "$NEG_STR"
|
||||
secreg=$? # 0= Secure Renegotiation IS NOT supported
|
||||
pipe_result=("${PIPESTATUS[@]}") # catch the return values of all commands
|
||||
secreg=${pipe_result[2]} # 0= Secure Renegotiation IS NOT supported
|
||||
if [[ ${pipe_result[1]} -ge 1 ]]; then
|
||||
let secreg+=2 # OpenSSL didn't exit correctly
|
||||
fi
|
||||
case $secreg in
|
||||
0) pr_redln "VULNERABLE (NOT ok)" ;;
|
||||
1) pr_greenln "not vulnerable (OK)" ;;
|
||||
2) pr_magentaln "Looks vulnerable but generates error" ;;
|
||||
3) pr_magentaln "probably not vulnerable but error (OK)" ;;
|
||||
*) outln "FIXME: $secreg" ;;
|
||||
esac
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user