On Thu, 8 Mar 2018, Lessandro Mariano wrote:
I see. I can't figure out a way to solve my use case without patching curl though.
(First: this is why we don't top-post. It is really hard to remember what you're talking about here and we need to search the bottom of the mail to remind us.)
I didn't actually mean to imply that you can accomplish that URL rewrite in curl with any existing options. I'm primarily suggesting that CURLOPT_RESOVLE does something else than what you want. Ie a missing feature, not actually a bug in existing functionality.
I can use CURLOPT_SSL_CTX_FUNCTION and
...
It would make more sense if curl passed the mbedtls context to the callback because you can get the config from the context and not vice versa, but changing this would break backwards compatibility with existing code.
Yeah, it would have to be enabled somehow.
Alternatively, another solution would be to add a new option that overrides the hostname used for ssl/sni, i.e. CURLOPT_SSL_HOSTNAME or similar.
That has been suggested before but never implemented. I think primarily because past users have made things work with _RESOLVE or _CONNECT_TO. Your added complexity is that you go through a HTTP proxy which basically rules out those options.
Maybe the time is ripe now... -- / daniel.haxx.se ------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html
