Skip to content

vtls: optimize the error handling in ssl_cf_connect()#19196

Closed
x2018 wants to merge 1 commit into
curl:masterfrom
x2018:ssl_cf_connect_error_path
Closed

vtls: optimize the error handling in ssl_cf_connect()#19196
x2018 wants to merge 1 commit into
curl:masterfrom
x2018:ssl_cf_connect_error_path

Conversation

@x2018
Copy link
Copy Markdown
Contributor

@x2018 x2018 commented Oct 22, 2025

In lib/vtls/vtls.c:ssl_cf_connect(), an error path do not properly restore the cfilter.
This PR unifies its error handling.
By the way, as checking preferences is more lightweight than initing a peer, this PR also optimize the execution order: Check prefs at first to avoid unnecessary initialization for a peer when ssl_prefs_check fails.

…ence at first, then init peer and do connect
@github-actions github-actions Bot added the TLS label Oct 22, 2025
@bagder bagder closed this in 6032b8f Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants