~ubuntu-branches/ubuntu/oneiric/curl/oneiric-security

« back to all changes in this revision

Viewing changes to lib/polarssl.c

  • Committer: Bazaar Package Importer
  • Author(s): Lorenzo De Liso
  • Date: 2011-05-02 19:12:31 UTC
  • mfrom: (3.4.17 sid)
  • Revision ID: james.westby@ubuntu.com-20110502191231-1hiklg06nzo62ws8
Tags: 7.21.6-1ubuntu1
* Merge from debian unstable (LP: #775794), remaining changes:
  - debian/control:
    + Build-Depends: Replace libssh2-1-dev with openssh-server.
      Drop stunnel since it's in universe, as well.
    + Drop libssh2-1-dev from libcurl4-openssl-dev's Depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *                            | (__| |_| |  _ <| |___
6
6
 *                             \___|\___/|_| \_\_____|
7
7
 *
8
 
 * Copyright (C) 2010, Hoi-Ho Chan, <hoiho.chan@gmail.com>
 
8
 * Copyright (C) 2010, 2011, Hoi-Ho Chan, <hoiho.chan@gmail.com>
9
9
 *
10
10
 * This software is licensed as described in the file COPYING, which
11
11
 * you should have received as part of this distribution. The terms
229
229
      return CURLE_SSL_CONNECT_ERROR;
230
230
    } else {
231
231
      /* wait for data from server... */
232
 
      long timeout_ms = Curl_timeleft(conn, NULL, TRUE);
 
232
      long timeout_ms = Curl_timeleft(data, NULL, TRUE);
233
233
 
234
234
      if(timeout_ms < 0) {
235
235
        failf(data, "SSL connection timeout");
352
352
  ret = ssl_read(&conn->ssl[num].ssl, (unsigned char *)buf, buffersize);
353
353
 
354
354
  if(ret <= 0) {
 
355
    if(ret == POLARSSL_ERR_SSL_PEER_CLOSE_NOTIFY)
 
356
      return 0;
 
357
 
355
358
    *curlcode = (ret == POLARSSL_ERR_NET_TRY_AGAIN) ?
356
359
      CURLE_AGAIN : CURLE_RECV_ERROR;
357
360
    return -1;