~ubuntu-branches/ubuntu/lucid/curl/lucid-security

« back to all changes in this revision

Viewing changes to lib/ssluse.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2005-12-12 15:04:52 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20051212150452-2ymlra67b2p7kjyy
Tags: 7.15.1-1ubuntu1
Resynchronise with Debian to get URL parser overflow fix from 7.15.1
(CVE-2005-4077).

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19
19
 * KIND, either express or implied.
20
20
 *
21
 
 * $Id: ssluse.c,v 1.134 2005/04/13 06:52:03 bagder Exp $
 
21
 * $Id: ssluse.c,v 1.138 2005/12/05 15:14:04 bagder Exp $
22
22
 ***************************************************************************/
23
23
 
24
24
/*
104
104
#undef HAVE_PKCS12_SUPPORT
105
105
#endif
106
106
 
107
 
 
108
107
#if OPENSSL_VERSION_NUMBER >= 0x00906001L
109
108
#define HAVE_ERR_ERROR_STRING_N 1
110
109
#endif
111
110
 
 
111
#if OPENSSL_VERSION_NUMBER >= 0x00909000L
 
112
#define SSL_METHOD_QUAL const
 
113
#else
 
114
#define SSL_METHOD_QUAL
 
115
#endif
 
116
 
112
117
/*
113
118
 * Number of bytes to read from the random number seed file. This must be
114
119
 * a finite value (because some entropy "files" like /dev/urandom have
1098
1103
  msg_type = *(char*)buf;
1099
1104
  msg_name = ssl_msg_type(ssl_ver, msg_type);
1100
1105
 
1101
 
  txt_len = 1 + snprintf(ssl_buf, sizeof(ssl_buf), "SSLv%c, %s%s (%d):\n",
1102
 
                         ver, tls_rt_name, msg_name, msg_type);
 
1106
  txt_len = snprintf(ssl_buf, sizeof(ssl_buf), "SSLv%c, %s%s (%d):\n",
 
1107
                     ver, tls_rt_name, msg_name, msg_type);
1103
1108
  Curl_debug(data, CURLINFO_TEXT, ssl_buf, txt_len, NULL);
1104
1109
 
1105
1110
  Curl_debug(data, (direction == 1) ? CURLINFO_SSL_DATA_OUT :
1121
1126
  long lerr;
1122
1127
  int what;
1123
1128
  char * str;
1124
 
  SSL_METHOD *req_method;
 
1129
  SSL_METHOD_QUAL SSL_METHOD *req_method=NULL;
1125
1130
  void *ssl_sessionid=NULL;
1126
1131
  ASN1_TIME *certdate;
1127
1132
  curl_socket_t sockfd = conn->sock[sockindex];
1162
1167
#ifdef SSL_CTRL_SET_MSG_CALLBACK
1163
1168
  if (data->set.fdebug) {
1164
1169
    if (!SSL_CTX_callback_ctrl(connssl->ctx, SSL_CTRL_SET_MSG_CALLBACK,
1165
 
                               ssl_tls_trace)) {
 
1170
                               (void (*)(void))ssl_tls_trace)) {
1166
1171
      failf(data, "SSL: couldn't set callback!");
1167
1172
      return CURLE_SSL_CONNECT_ERROR;
1168
1173
    }