On Thu, 15 Apr 2010, Jerome Vouillon wrote:

This patch improves the GnuTLS back-end to make the SSL connection phase non-blocking when the multi interface is used.

GREAT! Many thanks for this improvement. When trying it out, I noticed that our tests all failed when we built with GnuTLS which made suspect you didn't try the test suite yet? I fixed that particular problem, but now with your patch applied I get this:

$ ./src/curl -V
curl 7.20.2-DEV (i686-pc-linux-gnu) libcurl/7.20.2-DEV GnuTLS/2.8.5 zlib/1.2.3.4 libidn/1.15 Protocols: dict file ftp ftps http https imap imaps ldap pop3 pop3s rtsp smtp smtps telnet tftp
Features: Debug TrackMemory IDN IPv6 Largefile NTLM SSL libz

$ cd tests
$ ./runtests -g 305
[...]
15:37:10.757304 * Connected to 127.0.0.1 (127.0.0.1) port 8991 (#0)
15:37:10.757624 * error reading ca cert file moooo (Error while reading file.)

Program received signal SIGSEGV, Segmentation fault.
0xb7ecc7fd in gnutls_handshake () from /usr/lib/libgnutls.so.26
(gdb) bt
#0  0xb7ecc7fd in gnutls_handshake () from /usr/lib/libgnutls.so.26
#1  0x080839c5 in handshake (conn=0x80c737c, sockindex=0, duringconnect=true,
    nonblocking=false) at gtls.c:238
#2  0x08084850 in gtls_connect_common (conn=0x80c737c, sockindex=0,
    nonblocking=false, done=0xbfffe42b) at gtls.c:688
#3 0x080848f3 in Curl_gtls_connect (conn=0x80c737c, sockindex=0) at gtls.c:721
#4  0x080638c8 in Curl_ssl_connect (conn=0x80c737c, sockindex=0)
    at sslgen.c:194
#5  0x0806b0bb in Curl_http_connect (conn=0x80c737c, done=0xbfffe56a)
    at http.c:1779
#6  0x08074acf in Curl_protocol_connect (conn=0x80c737c,
    protocol_done=0xbfffe56a) at url.c:3281
#7  0x08077381 in setup_conn (conn=0x80c737c, protocol_done=0xbfffe56a)
    at url.c:4963
#8  0x080774dc in Curl_connect (data=0x80bde5c, in_connect=0xbfffe5a4,
    asyncp=0xbfffe56b, protocol_done=0xbfffe56a) at url.c:5036
#9  0x0807e8fb in connect_host (data=0x80bde5c, conn=0xbfffe5a4)
    at transfer.c:1900
#10 0x0807eb9d in Curl_perform (data=0x80bde5c) at transfer.c:2039
#11 0x0805b972 in curl_easy_perform (curl=0x80bde5c) at easy.c:556
#12 0x08054109 in operate (config=0xbfffe9f0, argc=9, argv=0xbfffec54)
    at main.c:5197
#13 0x08054a2d in main (argc=9, argv=0xbfffec54) at main.c:5522
(gdb) fr 1
#1  0x080839c5 in handshake (conn=0x80c737c, sockindex=0, duringconnect=true,
    nonblocking=false) at gtls.c:238
238         rc = gnutls_handshake(session);
(gdb) list
233             }
234           }
235           /* socket is readable or writable */
236         }
237
238         rc = gnutls_handshake(session);
239
240         if((rc == GNUTLS_E_AGAIN) || (rc == GNUTLS_E_INTERRUPTED)) {
241           connssl->connecting_state =
242             gnutls_record_get_direction(session)?
(gdb) p session
$1 = (gnutls_session_t) 0x0


--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to