Skip to content

Fix run_server_preference() with no default protocol#2155

Merged
drwetter merged 1 commit intotestssl:3.0from
dcooper16:server_pref_no_default_protocol_30
Apr 24, 2022
Merged

Fix run_server_preference() with no default protocol#2155
drwetter merged 1 commit intotestssl:3.0from
dcooper16:server_pref_no_default_protocol_30

Conversation

@dcooper16
Copy link
Copy Markdown
Collaborator

run_server_preference() calls default_proto=$(get_protocol $TMPFILE) even if all attempts to connect to the server failed. This will result in default_proto incorrectly being set to TLS 1.2. This PR fixes the issue by only calling get_protocol() if an attempt to connect to the server was successful.

run_server_preference() calls "default_proto=$(get_protocol $TMPFILE)" even if all attempts to connect to the server failed. This will result in default_proto incorrectly being set to TLS 1.2. This commit fixes the issue by only calling get_protocol() if an attempt to connect to the server was successful.
@drwetter drwetter merged commit 2eac75d into testssl:3.0 Apr 24, 2022
@drwetter
Copy link
Copy Markdown
Collaborator

drwetter commented Apr 24, 2022

Good catch! Thanks.

@dcooper16 dcooper16 deleted the server_pref_no_default_protocol_30 branch April 25, 2022 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants