diff options
author | Kozlov Dmitry <dima@server> | 2010-10-04 19:05:14 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2010-10-04 19:05:14 +0400 |
commit | fd0c4204091c9100dbf627bd4f8f0e7286f6e240 (patch) | |
tree | 3d60e609a6295a7c8931d2e7c05d056a5b1fc444 /accel-pptpd/radius | |
parent | 538479c6b708ebe973f65ac15e202a8d4ddead6a (diff) | |
download | accel-ppp-xebd-fd0c4204091c9100dbf627bd4f8f0e7286f6e240.tar.gz accel-ppp-xebd-fd0c4204091c9100dbf627bd4f8f0e7286f6e240.zip |
bug fixes
Diffstat (limited to 'accel-pptpd/radius')
-rw-r--r-- | accel-pptpd/radius/auth.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/accel-pptpd/radius/auth.c b/accel-pptpd/radius/auth.c index 10fdd45..3be5825 100644 --- a/accel-pptpd/radius/auth.c +++ b/accel-pptpd/radius/auth.c @@ -17,7 +17,8 @@ static int decrypt_chap_mppe_keys(struct rad_req_t *req, struct rad_attr_t *attr { MD5_CTX md5_ctx; SHA_CTX sha1_ctx; - uint8_t md5[16]; + uint8_t md5[MD5_DIGEST_LENGTH]; + uint8_t sha1[SHA_DIGEST_LENGTH]; uint8_t plain[32]; int i; @@ -48,7 +49,9 @@ static int decrypt_chap_mppe_keys(struct rad_req_t *req, struct rad_attr_t *attr SHA1_Update(&sha1_ctx, plain + 8, 16); SHA1_Update(&sha1_ctx, plain + 8, 16); SHA1_Update(&sha1_ctx, challenge, 8); - SHA1_Final(key, &sha1_ctx); + SHA1_Final(sha1, &sha1_ctx); + + memcpy(key, sha1, 16); return 0; } |