cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: further schannel improvements

From: Marc Hoersken <info_at_marc-hoersken.de>
Date: Thu, 14 Jun 2012 01:02:35 +0200

Hello everyone,

2012/6/13 Salisbury, Mark <mark.salisbury_at_hp.com>:
> Hello,
>
> Back in April I announced I had some experience creating a schannel implementation for libcurl and I would like to help contribute to the effort that Marc had started.  Marc took a first review of these patches yesterday, I've rebased them on top of the more recent changes and I think they are ready to go.
>
> I'd appreciate any feedback or questions anyone has on my patches.
>
> Things to note:
> * Supporting Windows CE and XP/Vista/Win7 is one of my main requirements (I work for HP on devices which run various flavors of windows - Linux too - which use libcurl).  Because libcurl relies on posix methods that WinCE doesn't define, to actually build libcurl for WinCE one needs to find a Windows CE posix library.  I'm using wceelibcex right now (with some improvements).
>
> * I tried to build using the suggested nmake process.  It didn't work for me - include paths weren't valid relative to where I was building.  I tried building with a VS 2008 command shell.  (do other people have problems running nmake too?)  For me it was easy to create a VS 2008 project to build / test with.
>
> **** I have not modified the build files but I did add one new file - win32_multibyte.c - so I'd appreciate help getting this into the necessary makefiles. ****
>
> I'd like to thank Marc H for his efforts here.  I think he's done a great job.  I'd love for more people to test and provide feedback on this new schannel implementation.
>

thanks Mark. I do also appreciate the work you spend on these patches
to improve my Schannel implementation and especially adding write
buffering as well as SSL/TLS shutdown behaviour.

During "git am" I get the following warning:

d:/Dev/curl/.git/rebase-apply/patch:182: trailing whitespace.
    &connssl->cred->cred_handle, NULL,
warning: 1 line adds whitespace errors.

Besides that, I noticed that for example the following lines are
longer than 79 chars:
88, 95, 143, 147, 149, 151, 152, 160, 184, 358, 407, 410, 411, 421,
452, 495, 528, 689, 783, 784, 786, and more after line 800.

During compilation with mingw32 I get the following warnings:

gcc -I. -I../include -g -O2 -Wall -fno-strict-aliasing
-DBUILDING_LIBCURL -DUSE_WINDOWS_SSPI -DUSE_SCHANNEL -c
curl_schannel.c

curl_schannel.c: In function 'schannel_connect_step2':
curl_schannel.c:412:32: warning: pointer targets in passing argument 2
of 'Curl_read_plain' differ in signedness [-Wpointer-sign]
sendf.h:58:10: note: expected 'char *' but argument is of type 'unsigned char *'

curl_schannel.c: In function 'schannel_recv':
curl_schannel.c:913:21: warning: pointer targets in passing argument 2
of 'Curl_read_plain' differ in signedness [-Wpointer-sign]
sendf.h:58:10: note: expected 'char *' but argument is of type 'unsigned char *'

It would be great if you could fix those small issues.

Aside from those warnings and smaller issues, applying those patches
breaks Schannel support for me.

Performing the following simple test command, curl just sits there and
prints nothing:
src\curl.exe https://www.google.de

Doing the same command with verbose output enabled, works:
src\curl.exe -v https://www.google.de

I had similiar problems during the development of the first
implementation and it always seemed to be a corner-case there curl was
running too fast and it didn't receive all the required data for a
decryption operation. I will try to debug this, but it was always very
hard and required quite a lot of work to tune the receive buffering to
handle those cases. You may have unintentionally broken something
there.

Best regards,
Marc

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