Menu

#544 libcurl built with gnutls ignores a rehandshake request

closed-fixed
libcurl (356)
5
2013-06-21
2005-10-21
Dima Barsky
No

I have a small python application which uses pycurl to
download my bank statements every week. I was using
pycurl 7.13 built with openssl until recently and the
application worked fine. A few days ago I upgraded the
pycurl and the libcurl packages to 7.15.0
(pycurl.version reports 'libcurl/7.15.0 GnuTLS/1.2.8
zlib/1.2.3 libidn/0.5.18') and now my application fails
with this message:

* GnuTLS recv error (-37): Rehandshake was requested by
the peer.
* Empty reply from server
* Connection #0 to host www2.auth.net.hsbc.com left intact
Traceback (most recent call last):
.......................................
pycurl.error: (52, 'Peer closed the TLS connection')
* Closing connection #0

Looking at lib/gtls.c file, I found that the
Curl_gtls_recv function ignores a possible rehandshake
request from the server and returns an error, which
forces the server to drop the connection. Please
correct me if I'm wrong, but I think that a new
handshake should be issued if gnutls_record_recv()
returned GNUTLS_E_REHANDSHAKE.

Discussion

  • Daniel Stenberg

    Daniel Stenberg - 2005-10-21

    Logged In: YES
    user_id=1110

    Yes, the man page for gnutls_record_recv() seems to agree
    with you.

     
  • Daniel Stenberg

    Daniel Stenberg - 2005-10-22

    Logged In: YES
    user_id=1110

    Thanks for reporting! I just now committed a fix for this
    case. Not in an elegant way, but hopefully at least working.

     
  • Daniel Stenberg

    Daniel Stenberg - 2005-10-22
    • status: open --> closed-fixed
     
  • Dima Barsky

    Dima Barsky - 2005-10-24

    Logged In: YES
    user_id=644787

    Thank you for the quick fix, it seems to help. This
    particular request now succeeds. The whole application
    still does not work, but it crashes somewhere else now.

     
  • Daniel Stenberg

    Daniel Stenberg - 2005-10-25

    Logged In: YES
    user_id=1110

    If you think it is another libcurl problem, please file a
    new bug report with all details you can figure out.

     
  • Nobody/Anonymous

    Logged In: NO

    Hi! Cool site! <a href=http://car-car-in-loan-title-virginia.laeblog.com/ >car car in loan title virginia</a>
    [url=http://car-car-in-loan-title-virginia.laeblog.com/ ]car car in loan title virginia[/url]