openssl: auto-pause on verify callback retry

When an application install its own OpenSSL verify callback and that
callback invokes `SSL_set_retry_verify()`, the transfer is automatically
paused and does not progress the connect attempt any further until
unpaused via `curl_easy_pause().

Added test758 to verify.

Ref: #18284
Original PR by @Natris
Bug: https://curl.se/mail/lib-2025-08/0012.html
Closes #18288
This commit is contained in:
Stefan Eissing 2025-08-14 14:12:54 +02:00 committed by Daniel Stenberg
parent c5f76b8096
commit a5f0ab7995
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
7 changed files with 599 additions and 22 deletions

View file

@ -60,7 +60,9 @@ callbacks to add additional validation code for certificates, and even to
change the actual URI of an HTTPS request.
For OpenSSL, asynchronous certificate verification via *SSL_set_retry_verify*
is supported. (Added in 8.3.0)
is supported. When *SSL_set_retry_verify* is set, the transfer is paused.
When verification should continue, call curl_easy_pause(3) to unpause
the transfer. (Added in 8.3.0, Pausing added in 8.16.0)
The CURLOPT_SSL_CTX_FUNCTION(3) callback allows the application to reach in
and modify SSL details in the connection without libcurl itself knowing