cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: how to obtain a 'unique authentication context' in libcurl?

From: Joe Mason <jmason_at_rim.com>
Date: Mon, 30 Jul 2012 13:30:30 +0000

> From: curl-library-bounces_at_cool.haxx.se [curl-library-bounces_at_cool.haxx.se] on behalf of Ellié Computing Open Source Program [opensource_at_elliecomputing.com]
>
> So, I was thinking of an option such as “CULROPT_AUTHENTICATION_CONTEXT_GENERATION” (of course naming here is just a vague idea), it would be 0 by default. It would be tested by the
> connection reuse algorithm (can reuse only if values in ‘about-to-be-connected’
> and reusable connection are equal). The user code of libcurl would increment the value each time it knows the user did special things about authentication information that libcurl cannot be aware of.
>
> Is there another way to do that? or should I propose a patch?

Would the auth callback interface proposed at http://curl.haxx.se/mail/lib-2012-07/0094.html be useful for this? Currently (in the proposed patch) it's only called for HTTP auth, but it could also be called for SSH key failures.

I suppose that's the opposite problem to what you're having - libcurl is informing the user that the auth parameters which are supplied to libcurl must be updated. Your problem is that libcurl does not know about the auth parameters. But any solution should not conflict with this interface, and it would be good to have a similar design to avoid fragmentation.

See also the recent discussion on pipelining improvements. I'm starting to think that it may be useful to expose the concept of connections to the embedder and allow them to map curl handles to connections manually is a good idea after al, so we wouldn't have to add a new ad-hoc option every time we find a new criteria for whether or not a connection can be reused.

Joe

---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-07-30