mirror of
				https://github.com/drwetter/testssl.sh.git
				synced 2025-11-04 07:45:27 +01:00 
			
		
		
		
	TLSv1.3 related bugfix
In three different places there is a line that is supposed to check whether the list of ciphers to be tested contains any TLSv1.3 ciphers. This check currently fails if there is only one TLSv1.3 cipher in the list and it is the first cipher in the list. This commit fixes the problem.
This commit is contained in:
		@@ -3065,7 +3065,7 @@ run_cipher_match(){
 | 
				
			|||||||
                              ! "${ciphers_found2[i]}" && ciphers_to_test+=", ${hexcode2[i]}"
 | 
					                              ! "${ciphers_found2[i]}" && ciphers_to_test+=", ${hexcode2[i]}"
 | 
				
			||||||
                         done
 | 
					                         done
 | 
				
			||||||
                         [[ -z "$ciphers_to_test" ]] && break
 | 
					                         [[ -z "$ciphers_to_test" ]] && break
 | 
				
			||||||
                         [[ "$proto" == "04" ]] && [[ ! "${ciphers_to_test:2}" =~ ,\ 13,[0-9a-f][0-9a-f] ]] && break
 | 
					                         [[ "$proto" == "04" ]] && [[ ! "$ciphers_to_test" =~ ,\ 13,[0-9a-f][0-9a-f] ]] && break
 | 
				
			||||||
                         ciphers_to_test="$(strip_inconsistent_ciphers "$proto" "$ciphers_to_test")"
 | 
					                         ciphers_to_test="$(strip_inconsistent_ciphers "$proto" "$ciphers_to_test")"
 | 
				
			||||||
                         [[ -z "$ciphers_to_test" ]] && break
 | 
					                         [[ -z "$ciphers_to_test" ]] && break
 | 
				
			||||||
                         if "$SHOW_SIGALGO"; then
 | 
					                         if "$SHOW_SIGALGO"; then
 | 
				
			||||||
@@ -3347,7 +3347,7 @@ run_allciphers() {
 | 
				
			|||||||
                         ! "${ciphers_found2[i]}" && ciphers_to_test+=", ${hexcode2[i]}"
 | 
					                         ! "${ciphers_found2[i]}" && ciphers_to_test+=", ${hexcode2[i]}"
 | 
				
			||||||
                    done
 | 
					                    done
 | 
				
			||||||
                    [[ -z "$ciphers_to_test" ]] && break
 | 
					                    [[ -z "$ciphers_to_test" ]] && break
 | 
				
			||||||
                    [[ "$proto" == "04" ]] && [[ ! "${ciphers_to_test:2}" =~ ,\ 13,[0-9a-f][0-9a-f] ]] && break
 | 
					                    [[ "$proto" == "04" ]] && [[ ! "$ciphers_to_test" =~ ,\ 13,[0-9a-f][0-9a-f] ]] && break
 | 
				
			||||||
                    ciphers_to_test="$(strip_inconsistent_ciphers "$proto" "$ciphers_to_test")"
 | 
					                    ciphers_to_test="$(strip_inconsistent_ciphers "$proto" "$ciphers_to_test")"
 | 
				
			||||||
                    [[ -z "$ciphers_to_test" ]] && break
 | 
					                    [[ -z "$ciphers_to_test" ]] && break
 | 
				
			||||||
                    if "$SHOW_SIGALGO"; then
 | 
					                    if "$SHOW_SIGALGO"; then
 | 
				
			||||||
@@ -7421,7 +7421,7 @@ run_pfs() {
 | 
				
			|||||||
                              ! "${ciphers_found[i]}" && ciphers_to_test+=", ${hexcode[i]}"
 | 
					                              ! "${ciphers_found[i]}" && ciphers_to_test+=", ${hexcode[i]}"
 | 
				
			||||||
                         done
 | 
					                         done
 | 
				
			||||||
                         [[ -z "$ciphers_to_test" ]] && break
 | 
					                         [[ -z "$ciphers_to_test" ]] && break
 | 
				
			||||||
                         [[ "$proto" == "04" ]] && [[ ! "${ciphers_to_test:2}" =~ ,\ 13,[0-9a-f][0-9a-f] ]] && break
 | 
					                         [[ "$proto" == "04" ]] && [[ ! "$ciphers_to_test" =~ ,\ 13,[0-9a-f][0-9a-f] ]] && break
 | 
				
			||||||
                         ciphers_to_test="$(strip_inconsistent_ciphers "$proto" "$ciphers_to_test")"
 | 
					                         ciphers_to_test="$(strip_inconsistent_ciphers "$proto" "$ciphers_to_test")"
 | 
				
			||||||
                         [[ -z "$ciphers_to_test" ]] && break
 | 
					                         [[ -z "$ciphers_to_test" ]] && break
 | 
				
			||||||
                         if "$WIDE" && "$SHOW_SIGALGO"; then
 | 
					                         if "$WIDE" && "$SHOW_SIGALGO"; then
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user