aboutsummaryrefslogtreecommitdiffstats
path: root/src/radius/radius.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-01-08 14:41:47 (GMT)
committerJouni Malinen <j@w1.fi>2009-01-08 14:41:47 (GMT)
commit7d02e641574435f4ee09cba34ef48376d35c785d (patch)
tree2aabd96f2dfae77db2b74d8f591885fd39a6a3cd /src/radius/radius.c
parent1c6e69ccda916960bb03dd5b71df9ca5438bdf0f (diff)
downloadhostap-7d02e641574435f4ee09cba34ef48376d35c785d.zip
hostap-7d02e641574435f4ee09cba34ef48376d35c785d.tar.gz
hostap-7d02e641574435f4ee09cba34ef48376d35c785d.tar.bz2
Mark shared secret const in RADIUS client routines
Diffstat (limited to 'src/radius/radius.c')
-rw-r--r--src/radius/radius.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/radius/radius.c b/src/radius/radius.c
index bcd2e4b..71bbfb5 100644
--- a/src/radius/radius.c
+++ b/src/radius/radius.c
@@ -293,7 +293,8 @@ void radius_msg_dump(struct radius_msg *msg)
}
-int radius_msg_finish(struct radius_msg *msg, u8 *secret, size_t secret_len)
+int radius_msg_finish(struct radius_msg *msg, const u8 *secret,
+ size_t secret_len)
{
if (secret) {
u8 auth[MD5_MAC_LEN];
@@ -364,7 +365,7 @@ int radius_msg_finish_srv(struct radius_msg *msg, const u8 *secret,
}
-void radius_msg_finish_acct(struct radius_msg *msg, u8 *secret,
+void radius_msg_finish_acct(struct radius_msg *msg, const u8 *secret,
size_t secret_len)
{
const u8 *addr[2];
@@ -899,7 +900,7 @@ static void encrypt_ms_key(const u8 *key, size_t key_len, u16 salt,
struct radius_ms_mppe_keys *
radius_msg_get_ms_keys(struct radius_msg *msg, struct radius_msg *sent_msg,
- u8 *secret, size_t secret_len)
+ const u8 *secret, size_t secret_len)
{
u8 *key;
size_t keylen;
@@ -940,7 +941,7 @@ radius_msg_get_ms_keys(struct radius_msg *msg, struct radius_msg *sent_msg,
struct radius_ms_mppe_keys *
radius_msg_get_cisco_keys(struct radius_msg *msg, struct radius_msg *sent_msg,
- u8 *secret, size_t secret_len)
+ const u8 *secret, size_t secret_len)
{
u8 *key;
size_t keylen;
@@ -1043,8 +1044,8 @@ int radius_msg_add_mppe_keys(struct radius_msg *msg,
* in RFC 2865, Chap. 5.2 */
struct radius_attr_hdr *
radius_msg_add_attr_user_password(struct radius_msg *msg,
- u8 *data, size_t data_len,
- u8 *secret, size_t secret_len)
+ const u8 *data, size_t data_len,
+ const u8 *secret, size_t secret_len)
{
u8 buf[128];
int padlen, i;