curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder Daniel himself.

Re: Asynchronous certificate verification: busy loop?

From: Daniel Stenberg via curl-users <curl-users_at_lists.haxx.se>
Date: Fri, 8 Aug 2025 16:19:19 +0200 (CEST)

On Fri, 8 Aug 2025, Ondra via curl-users wrote:

You might enjoy the curl-library mailing list more, as that focuses on
libcurl and this list is more curl tool oriented.

> Proper approach how to do this seems to be to use *CURLOPT_SSL_CTX_FUNCTION
> to register custom ctx function from which *SSL_CTX_set_cert_verify_callback
> can be used to register a verify callback.
>
> When this cert_verify_callback is invoked, I obtain the chain of
> certificates and post it for verification. Then I “return
> SSL_set_retry_verify(ssl);” from it.
> This works, however the problem is that the sockets scheduled by multi on
> behalf of this easy are not unscheduled; thus we busy loop until the cert
> verification finishes.

This explanation seems to leave something out. How can libcurl call a callback
and wait for its return and at the same time run in a busy-loop?

-- 
  / daniel.haxx.se || https://rock-solid.curl.dev


-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2025-08-08