~ubuntu-branches/ubuntu/vivid/curl/vivid

« back to all changes in this revision

Viewing changes to lib/curl_sasl.c

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2013-05-07 12:16:37 UTC
  • mfrom: (3.4.37 sid)
  • Revision ID: package-import@ubuntu.com-20130507121637-9t3i98qgsyr9dw5d
Tags: 7.30.0-1ubuntu1
* Resynchronize on Debian. Remaining changes:
  - Drop dependencies not in main:
    + Build-Depends: Drop stunnel4 and libssh2-1-dev.
    + Drop libssh2-1-dev from binary package Depends.
  - Add new libcurl3-udeb package.
  - Add new curl-udeb package.
* Add warning to debian/patches/series.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *                            | (__| |_| |  _ <| |___
6
6
 *                             \___|\___/|_| \_\_____|
7
7
 *
8
 
 * Copyright (C) 2012-2013, Daniel Stenberg, <daniel@haxx.se>, et al.
 
8
 * Copyright (C) 2012 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
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
90
90
 * Returns CURLE_OK on success.
91
91
 */
92
92
CURLcode Curl_sasl_create_plain_message(struct SessionHandle *data,
93
 
                                        const char* userp,
94
 
                                        const char* passwdp,
 
93
                                        const char *userp,
 
94
                                        const char *passwdp,
95
95
                                        char **outptr, size_t *outlen)
96
96
{
97
97
  char plainauth[2 * MAX_CURL_USER_LENGTH + MAX_CURL_PASSWORD_LENGTH];
138
138
 * Returns CURLE_OK on success.
139
139
 */
140
140
CURLcode Curl_sasl_create_login_message(struct SessionHandle *data,
141
 
                                        const char* valuep, char **outptr,
 
141
                                        const char *valuep, char **outptr,
142
142
                                        size_t *outlen)
143
143
{
144
144
  size_t vlen = strlen(valuep);
179
179
 * Returns CURLE_OK on success.
180
180
 */
181
181
CURLcode Curl_sasl_create_cram_md5_message(struct SessionHandle *data,
182
 
                                           const char* chlg64,
183
 
                                           const char* userp,
184
 
                                           const char* passwdp,
 
182
                                           const char *chlg64,
 
183
                                           const char *userp,
 
184
                                           const char *passwdp,
185
185
                                           char **outptr, size_t *outlen)
186
186
{
187
187
  CURLcode result = CURLE_OK;
250
250
 * Returns CURLE_OK on success.
251
251
 */
252
252
CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data,
253
 
                                             const char* chlg64,
254
 
                                             const char* userp,
255
 
                                             const char* passwdp,
256
 
                                             const char* service,
 
253
                                             const char *chlg64,
 
254
                                             const char *userp,
 
255
                                             const char *passwdp,
 
256
                                             const char *service,
257
257
                                             char **outptr, size_t *outlen)
258
258
{
259
259
  static const char table16[] = "0123456789abcdef";
283
283
  if(result)
284
284
    return result;
285
285
 
 
286
  if(!chlg)
 
287
    return CURLE_LOGIN_DENIED;
 
288
 
286
289
  /* Retrieve nonce string from the challenge */
287
290
  if(!sasl_digest_get_key_value(chlg, "nonce=\"", nonce,
288
291
                                sizeof(nonce), '\"')) {