~ubuntu-branches/ubuntu/saucy/wpasupplicant/saucy

« back to all changes in this revision

Viewing changes to src/eap_common/chap.c

  • Committer: Bazaar Package Importer
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2010-11-22 09:43:43 UTC
  • mfrom: (1.1.16 upstream)
  • Revision ID: james.westby@ubuntu.com-20101122094343-qgsxaojvmswfri77
Tags: 0.7.3-0ubuntu1
* Get wpasupplicant 0.7.3 from Debian's SVN. Leaving 0.7.3-1 as unreleased
  for now.
* Build-Depend on debhelper 8, since the packaging from Debian uses compat 8.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * CHAP-MD5 (RFC 1994)
3
 
 * Copyright (c) 2007, Jouni Malinen <j@w1.fi>
 
3
 * Copyright (c) 2007-2009, Jouni Malinen <j@w1.fi>
4
4
 *
5
5
 * This program is free software; you can redistribute it and/or modify
6
6
 * it under the terms of the GNU General Public License version 2 as
15
15
#include "includes.h"
16
16
 
17
17
#include "common.h"
18
 
#include "md5.h"
19
 
#include "crypto.h"
 
18
#include "crypto/crypto.h"
20
19
#include "chap.h"
21
20
 
22
 
void chap_md5(u8 id, const u8 *secret, size_t secret_len, const u8 *challenge,
 
21
int chap_md5(u8 id, const u8 *secret, size_t secret_len, const u8 *challenge,
23
22
              size_t challenge_len, u8 *response)
24
23
{
25
24
        const u8 *addr[3];
31
30
        len[1] = secret_len;
32
31
        addr[2] = challenge;
33
32
        len[2] = challenge_len;
34
 
        md5_vector(3, addr, len, response);
 
33
        return md5_vector(3, addr, len, response);
35
34
}