Re: HTTPS using my own TLS session
Date: Tue, 17 Sep 2019 16:08:54 +0200 (CEST)
On Fri, 13 Sep 2019, David Woodhouse via curl-library wrote:
> So: what would it take to use curl for HTTP while basically abusing it from
> both sides? Not only do I need it to use my own underlying TLS connection,
> but I also need in some cases to make a CONNECT or even GET request which
> completes as soon as it has an HTTP 101 or 200 response and immediately
> hands the connection back to me since it's passing binary traffic over it
> then.
"my own underlying TLS connection" could probably be done by using
CURLOPT_OPENSOCKETFUNCTION, depending on how you do it. Then you can hand over
a socket to curl to work on and you do the rest.
If you rather curl do the socket handling and the existing TLS backends aren't
suitable, then I figure you'd need to create a new TLS backend for this
purpose - but there's no dynamic or external way to hook one in. You'd need to
change curl code and recompile for that.
> hands the connection back to me
That sounds like maybe a job for CURLOPT_CONNECT_ONLY and
CURLINFO_ACTIVESOCKET ?
-- / daniel.haxx.se | Get the best commercial curl support there is - from me | Private help, bug fixes, support, ports, new features | https://www.wolfssl.com/contact/ ------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2019-09-17