cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLINFO_LASTSOCKET change

From: David McCreedy <mccreedytpf_at_msn.com>
Date: Thu, 11 May 2006 00:03:06 +0000

On Wed, 10 May 2006 15:38:52 -0700, Dan Fandrich wrote:
>
>On Wed, May 10, 2006 at 09:37:47PM +0000, David McCreedy wrote:
> >+ if(data->state.connects[data->state.lastconnect]->protocol
> >+ & (PROT_FTPS|PROT_SSL)) {
> >+ /* use the SSL context */
>
>This checks for FTPS and HTTPS, but what happens in the case when SSL is
>negotiated as part of FTP, using --ftp-ssl? There must be a better way of
>telling if SSL is in use on a connection or not, or if not, there should
>be.

Would a check for "use" work?
if (data->state.connects[data->state.lastconnect]->ssl[FIRSTSOCKET].use)

Also, does PROT_FTPS get set for HTTPS? If not, the code won't be activated
for HTTPS.

-David McCreedy
Received on 2006-05-11