LCOV - code coverage report
Current view: top level - src/eap_common - chap.c (source / functions) Hit Total Coverage
Test: wpa_supplicant/hostapd combined for hwsim test run 1393793999 Lines: 8 8 100.0 %
Date: 2014-03-02 Functions: 1 1 100.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * CHAP-MD5 (RFC 1994)
       3                 :            :  * Copyright (c) 2007-2009, Jouni Malinen <j@w1.fi>
       4                 :            :  *
       5                 :            :  * This software may be distributed under the terms of the BSD license.
       6                 :            :  * See README for more details.
       7                 :            :  */
       8                 :            : 
       9                 :            : #include "includes.h"
      10                 :            : 
      11                 :            : #include "common.h"
      12                 :            : #include "crypto/crypto.h"
      13                 :            : #include "chap.h"
      14                 :            : 
      15                 :         14 : int chap_md5(u8 id, const u8 *secret, size_t secret_len, const u8 *challenge,
      16                 :            :               size_t challenge_len, u8 *response)
      17                 :            : {
      18                 :            :         const u8 *addr[3];
      19                 :            :         size_t len[3];
      20                 :            : 
      21                 :         14 :         addr[0] = &id;
      22                 :         14 :         len[0] = 1;
      23                 :         14 :         addr[1] = secret;
      24                 :         14 :         len[1] = secret_len;
      25                 :         14 :         addr[2] = challenge;
      26                 :         14 :         len[2] = challenge_len;
      27                 :         14 :         return md5_vector(3, addr, len, response);
      28                 :            : }

Generated by: LCOV version 1.9