cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: POP3 not using same connection for multiple requests when using starttls

From: Steve Holme <steve_holme_at_hotmail.com>
Date: Thu, 3 Nov 2011 14:54:17 +0000

Hi Daniel,

> > I have tried commenting out the contents of pop3_to_pop3s() which only
> > gets called during the upgrade process (and thus not changing the
> > handler). This appears to work, although I am not too sure if this
> > will cause any other problems.
>
> That will just cause the reversed problem: if you have a POP3 connection
> without SSL and one _with_ SSL you don't want them to match.

Surely a POP3 connection upgraded to TLS is not the same as a POP3S
connection, so I don't believe you would want these to match. However, the
existing implementation will match a new POP3S connection with an existing
POP3 connection that has been upgraded to TLS.

And to this degree, performing a curl_easy_perform(curl,
"pop3s://mail.domain.com") after my pop3 connection was upgraded worked.
However, because the connection is automatically upgraded by libcurl and the
server this not a true SSL connection that the application programmer is
aware of or asking for.

> > I was wondering whether we could introduce another handler. For example:

> > Curl_handler_pop3tls (and subsequently: Curl_handler_smtptls and
> > Curl_handler_imaptls) which then has flags to say that the connection
> > has been upgraded but then the scheme would be the same and could be
> > used during the reuse test.
>
> Yes, I figure that should be possible. The only question is another
handler struct
> is better than a handicrafted extra check in the ConnectionExists()
function. After
> all, we're talking about 4 new handler structs.

True. However, I think we need to answer the previous point as I have a
couple of solutions in mind.

Also, do we want to work on fixing this for v7.23?

Kind Regards

Steve

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-11-03