diff options
author | Kozlov Dmitry <xeb@mail.ru> | 2011-12-27 14:59:07 +0400 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2011-12-27 14:59:07 +0400 |
commit | b2f9d7066553be2b74b048fcf65417eaadb44c60 (patch) | |
tree | 1a53dfc7e5046bf1e7885481fe5683ea605b59f6 /accel-pppd/radius/auth.c | |
parent | 89d62818266b6b7f6e0f99542b0fb795f0768107 (diff) | |
download | accel-ppp-b2f9d7066553be2b74b048fcf65417eaadb44c60.tar.gz accel-ppp-b2f9d7066553be2b74b048fcf65417eaadb44c60.zip |
radius: implemented simultaneous requests limiting
Diffstat (limited to 'accel-pppd/radius/auth.c')
-rw-r--r-- | accel-pppd/radius/auth.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/accel-pppd/radius/auth.c b/accel-pppd/radius/auth.c index becddf6d..3e5d281d 100644 --- a/accel-pppd/radius/auth.c +++ b/accel-pppd/radius/auth.c @@ -30,7 +30,7 @@ static int decrypt_chap_mppe_keys(struct rad_req_t *req, struct rad_attr_t *attr memcpy(plain, attr->val.octets, 32); MD5_Init(&md5_ctx); - MD5_Update(&md5_ctx, req->serv->auth_secret, strlen(req->serv->auth_secret)); + MD5_Update(&md5_ctx, req->serv->secret, strlen(req->serv->secret)); MD5_Update(&md5_ctx, req->pack->buf + 4, 16); MD5_Final(md5, &md5_ctx); @@ -38,7 +38,7 @@ static int decrypt_chap_mppe_keys(struct rad_req_t *req, struct rad_attr_t *attr plain[i] ^= md5[i]; MD5_Init(&md5_ctx); - MD5_Update(&md5_ctx, req->serv->auth_secret, strlen(req->serv->auth_secret)); + MD5_Update(&md5_ctx, req->serv->secret, strlen(req->serv->secret)); MD5_Update(&md5_ctx, attr->val.octets, 16); MD5_Final(md5, &md5_ctx); @@ -74,7 +74,7 @@ static int decrypt_mppe_key(struct rad_req_t *req, struct rad_attr_t *attr, uint } MD5_Init(&md5_ctx); - MD5_Update(&md5_ctx, req->serv->auth_secret, strlen(req->serv->auth_secret)); + MD5_Update(&md5_ctx, req->serv->secret, strlen(req->serv->secret)); MD5_Update(&md5_ctx, req->pack->buf + 4, 16); MD5_Update(&md5_ctx, attr->val.octets, 2); MD5_Final(md5, &md5_ctx); @@ -90,7 +90,7 @@ static int decrypt_mppe_key(struct rad_req_t *req, struct rad_attr_t *attr, uint } MD5_Init(&md5_ctx); - MD5_Update(&md5_ctx, req->serv->auth_secret, strlen(req->serv->auth_secret)); + MD5_Update(&md5_ctx, req->serv->secret, strlen(req->serv->secret)); MD5_Update(&md5_ctx, attr->val.octets + 2, 16); MD5_Final(md5, &md5_ctx); @@ -229,7 +229,7 @@ int rad_auth_pap(struct radius_pd_t *rpd, const char *username, va_list args) if (!req) return PWDB_DENIED; - epasswd = encrypt_password(passwd, req->serv->auth_secret, req->RA, &epasswd_len); + epasswd = encrypt_password(passwd, req->serv->secret, req->RA, &epasswd_len); if (!epasswd) goto out; |