mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +01:00
polish screen output for (extended) keyusage
This commit is contained in:
parent
61764f332c
commit
c1d75f65ce
@ -6593,18 +6593,18 @@ certificate_info() {
|
|||||||
outln "$cert_keyusage"
|
outln "$cert_keyusage"
|
||||||
if ( [[ " $cert_type " =~ " RSASig " ]] || [[ " $cert_type " =~ " DSA " ]] || [[ " $cert_type " =~ " ECDSA " ]] ) && \
|
if ( [[ " $cert_type " =~ " RSASig " ]] || [[ " $cert_type " =~ " DSA " ]] || [[ " $cert_type " =~ " ECDSA " ]] ) && \
|
||||||
[[ ! "$cert_keyusage" =~ "Digital Signature" ]]; then
|
[[ ! "$cert_keyusage" =~ "Digital Signature" ]]; then
|
||||||
prln_svrty_high "$indent -- certificate incorrectly used for digital signatures"
|
prln_svrty_high "$indent Certificate incorrectly used for digital signatures"
|
||||||
fileout "${jsonID}${json_postfix}" "HIGH" "Certificate incorrectly used for digital signatures: \"$cert_keyusage\""
|
fileout "${jsonID}${json_postfix}" "HIGH" "Certificate incorrectly used for digital signatures: \"$cert_keyusage\""
|
||||||
outok=false
|
outok=false
|
||||||
fi
|
fi
|
||||||
if [[ " $cert_type " =~ " RSAKMK " ]] && [[ ! "$cert_keyusage" =~ "Key Encipherment" ]]; then
|
if [[ " $cert_type " =~ " RSAKMK " ]] && [[ ! "$cert_keyusage" =~ "Key Encipherment" ]]; then
|
||||||
prln_svrty_high "$indent -- certificate incorrectly used for key encipherment"
|
prln_svrty_high "$indent Certificate incorrectly used for key encipherment"
|
||||||
fileout "${jsonID}${json_postfix}" "HIGH" "Certificate incorrectly used for key encipherment: \"$cert_keyusage\""
|
fileout "${jsonID}${json_postfix}" "HIGH" "Certificate incorrectly used for key encipherment: \"$cert_keyusage\""
|
||||||
outok=false
|
outok=false
|
||||||
fi
|
fi
|
||||||
if ( [[ " $cert_type " =~ " DH " ]] || [[ " $cert_type " =~ " ECDH " ]] ) && \
|
if ( [[ " $cert_type " =~ " DH " ]] || [[ " $cert_type " =~ " ECDH " ]] ) && \
|
||||||
[[ ! "$cert_keyusage" =~ "Key Agreement" ]]; then
|
[[ ! "$cert_keyusage" =~ "Key Agreement" ]]; then
|
||||||
prln_svrty_high "$indent -- certificate incorrectly used for key agreement"
|
prln_svrty_high "$indent Certificate incorrectly used for key agreement"
|
||||||
fileout "${jsonID}${json_postfix}" "HIGH" "Certificate incorrectly used for key agreement: \"$cert_keyusage\""
|
fileout "${jsonID}${json_postfix}" "HIGH" "Certificate incorrectly used for key agreement: \"$cert_keyusage\""
|
||||||
outok=false
|
outok=false
|
||||||
fi
|
fi
|
||||||
@ -6625,7 +6625,7 @@ certificate_info() {
|
|||||||
if [[ -n "$cert_ext_keyusage" ]]; then
|
if [[ -n "$cert_ext_keyusage" ]]; then
|
||||||
outln "$cert_ext_keyusage"
|
outln "$cert_ext_keyusage"
|
||||||
if [[ ! "$cert_ext_keyusage" =~ "TLS Web Server Authentication" ]] && [[ ! "$cert_ext_keyusage" =~ "Any Extended Key Usage" ]]; then
|
if [[ ! "$cert_ext_keyusage" =~ "TLS Web Server Authentication" ]] && [[ ! "$cert_ext_keyusage" =~ "Any Extended Key Usage" ]]; then
|
||||||
prln_svrty_high "$indent -- certificate incorrectly used for TLS Web Server Authentication"
|
prln_svrty_high "$indent Certificate incorrectly used for TLS Web Server Authentication"
|
||||||
fileout "${jsonID}${json_postfix}" "HIGH" "Certificate incorrectly used for TLS Web Server Authentication: \"$cert_ext_keyusage\""
|
fileout "${jsonID}${json_postfix}" "HIGH" "Certificate incorrectly used for TLS Web Server Authentication: \"$cert_ext_keyusage\""
|
||||||
outok=false
|
outok=false
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user