Pass digest return value to CHAP/MSCHAPv2 caller
This commit is contained in:
parent
76f04b38b0
commit
be299ca4ce
4 changed files with 27 additions and 23 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* CHAP-MD5 (RFC 1994)
|
||||
* Copyright (c) 2007, Jouni Malinen <j@w1.fi>
|
||||
* Copyright (c) 2007-2009, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
|
@ -19,7 +19,7 @@
|
|||
#include "crypto.h"
|
||||
#include "chap.h"
|
||||
|
||||
void chap_md5(u8 id, const u8 *secret, size_t secret_len, const u8 *challenge,
|
||||
int chap_md5(u8 id, const u8 *secret, size_t secret_len, const u8 *challenge,
|
||||
size_t challenge_len, u8 *response)
|
||||
{
|
||||
const u8 *addr[3];
|
||||
|
@ -31,5 +31,5 @@ void chap_md5(u8 id, const u8 *secret, size_t secret_len, const u8 *challenge,
|
|||
len[1] = secret_len;
|
||||
addr[2] = challenge;
|
||||
len[2] = challenge_len;
|
||||
md5_vector(3, addr, len, response);
|
||||
return md5_vector(3, addr, len, response);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* CHAP-MD5 (RFC 1994)
|
||||
* Copyright (c) 2007, Jouni Malinen <j@w1.fi>
|
||||
* Copyright (c) 2007-2009, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
|
@ -17,7 +17,7 @@
|
|||
|
||||
#define CHAP_MD5_LEN 16
|
||||
|
||||
void chap_md5(u8 id, const u8 *secret, size_t secret_len, const u8 *challenge,
|
||||
size_t challenge_len, u8 *response);
|
||||
int chap_md5(u8 id, const u8 *secret, size_t secret_len, const u8 *challenge,
|
||||
size_t challenge_len, u8 *response);
|
||||
|
||||
#endif /* CHAP_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue