mirror of
https://github.com/drwetter/testssl.sh.git
synced 2025-01-03 23:39:45 +01:00
Fix JSON (pretty) regression
... after introducing pre-check for 128 cipher limit, see #1226.
This commit is contained in:
parent
5b1fdfa675
commit
0e8807217d
10
testssl.sh
10
testssl.sh
@ -732,8 +732,9 @@ fileout_json_footer() {
|
|||||||
|
|
||||||
fileout_json_section() {
|
fileout_json_section() {
|
||||||
case $1 in
|
case $1 in
|
||||||
|
0) echo -e " \"pretest\" : [" ;;
|
||||||
1) echo -e " \"singleCipher\" : [" ;;
|
1) echo -e " \"singleCipher\" : [" ;;
|
||||||
2) echo -e " \"protocols\" : [" ;;
|
2) echo -e ",\n \"protocols\" : [" ;;
|
||||||
3) echo -e ",\n \"grease\" : [" ;;
|
3) echo -e ",\n \"grease\" : [" ;;
|
||||||
4) echo -e ",\n \"ciphers\" : [" ;;
|
4) echo -e ",\n \"ciphers\" : [" ;;
|
||||||
5) echo -e ",\n \"pfs\" : [" ;;
|
5) echo -e ",\n \"pfs\" : [" ;;
|
||||||
@ -18982,7 +18983,7 @@ stopwatch() {
|
|||||||
# arg1(optional): "init" --> just initializing. Or: STARTTLS protocol
|
# arg1(optional): "init" --> just initializing. Or: STARTTLS protocol
|
||||||
lets_roll() {
|
lets_roll() {
|
||||||
local -i ret=0
|
local -i ret=0
|
||||||
local section_number=1
|
local section_number=0
|
||||||
|
|
||||||
if [[ "$1" == init ]]; then
|
if [[ "$1" == init ]]; then
|
||||||
# called once upfront to be able to measure preparation time b4 everything starts
|
# called once upfront to be able to measure preparation time b4 everything starts
|
||||||
@ -19003,7 +19004,6 @@ lets_roll() {
|
|||||||
datebanner " Start"
|
datebanner " Start"
|
||||||
determine_service "$1" # STARTTLS service? Other will be determined here too. Returns 0 if test connect was ok or has already exited if fatal error occurred
|
determine_service "$1" # STARTTLS service? Other will be determined here too. Returns 0 if test connect was ok or has already exited if fatal error occurred
|
||||||
# determine_service() can return 1, it indicates that this IP cannot be reached but there are more IPs to check
|
# determine_service() can return 1, it indicates that this IP cannot be reached but there are more IPs to check
|
||||||
determine_sizelimitbug
|
|
||||||
if [[ $? -eq 0 ]] ; then
|
if [[ $? -eq 0 ]] ; then
|
||||||
# "secret" devel options --devel:
|
# "secret" devel options --devel:
|
||||||
if "$do_tls_sockets"; then
|
if "$do_tls_sockets"; then
|
||||||
@ -19025,6 +19025,10 @@ lets_roll() {
|
|||||||
run_cipher_match ${single_cipher}
|
run_cipher_match ${single_cipher}
|
||||||
stopwatch run_cipher_match
|
stopwatch run_cipher_match
|
||||||
else
|
else
|
||||||
|
fileout_section_header $section_number false && ((section_number++))
|
||||||
|
determine_sizelimitbug
|
||||||
|
fileout_section_footer false
|
||||||
|
|
||||||
((section_number++))
|
((section_number++))
|
||||||
# all top level functions now following have the prefix "run_"
|
# all top level functions now following have the prefix "run_"
|
||||||
fileout_section_header $section_number false && ((section_number++))
|
fileout_section_header $section_number false && ((section_number++))
|
||||||
|
Loading…
Reference in New Issue
Block a user