mirror of
				https://github.com/drwetter/testssl.sh.git
				synced 2025-10-31 05:45:26 +01:00 
			
		
		
		
	Merge pull request #1126 from dcooper16/fewer_key_shares
Send fewer key shares
This commit is contained in:
		| @@ -11505,6 +11505,7 @@ generate_key_share_extension() { | |||||||
|      local -i i len supported_groups_len group |      local -i i len supported_groups_len group | ||||||
|      local extn_len list_len |      local extn_len list_len | ||||||
|      local key_share key_shares="" |      local key_share key_shares="" | ||||||
|  |      local -i nr_key_shares=0 | ||||||
|  |  | ||||||
|      supported_groups="${1//\\x/}" |      supported_groups="${1//\\x/}" | ||||||
|      [[ "${supported_groups:0:4}" != "000a" ]] && return 1 |      [[ "${supported_groups:0:4}" != "000a" ]] && return 1 | ||||||
| @@ -11548,6 +11549,9 @@ generate_key_share_extension() { | |||||||
|           key_share="${TLS13_PUBLIC_KEY_SHARES[group]}" |           key_share="${TLS13_PUBLIC_KEY_SHARES[group]}" | ||||||
|           if [[ ${#key_share} -gt 4 ]]; then |           if [[ ${#key_share} -gt 4 ]]; then | ||||||
|                key_shares+=",$key_share" |                key_shares+=",$key_share" | ||||||
|  |                nr_key_shares+=1 | ||||||
|  |                # Don't include more than two keys, so that the extension isn't too large. | ||||||
|  |                [[ $nr_key_shares -ge 2 ]] && break | ||||||
|           fi |           fi | ||||||
|      done |      done | ||||||
|      [[ -z "$key_shares" ]] && tm_out "" && return 0 |      [[ -z "$key_shares" ]] && tm_out "" && return 0 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Dirk Wetter
					Dirk Wetter