X-Git-Url: http://git.sameswireless.fr/l2tpns.git/blobdiff_plain/3b8df1d7d8e8e73c3ed2705f39723e54ccf59b68..e7c9a1993778e9ac375d7f956dda7c3c802a83a5:/test/radius.c?ds=inline diff --git a/test/radius.c b/test/radius.c index 2408310..e31ce60 100644 --- a/test/radius.c +++ b/test/radius.c @@ -136,7 +136,7 @@ int main(int argc, char *argv[]) int instances = 1; int fake = 0; int bad = 0; - int limit = 0; + int limit = 100000; int o; while ((o = getopt(argc, argv, "i:n:f:b:l:")) != -1) @@ -394,16 +394,16 @@ int main(int argc, char *argv[]) for (int j = 0; j < pw_len; j += 16) { MD5_CTX ctx; - MD5Init(&ctx); - MD5Update(&ctx, secret, strlen(secret)); + MD5_Init(&ctx); + MD5_Update(&ctx, secret, strlen(secret)); if (j) - MD5Update(&ctx, pass + j - 16, 16); + MD5_Update(&ctx, pass + j - 16, 16); else /* authenticator */ - MD5Update(&ctx, u->request + 4, 16); + MD5_Update(&ctx, u->request + 4, 16); - char digest[16]; - MD5Final(digest, &ctx); + uint8_t digest[16]; + MD5_Final(digest, &ctx); for (int k = 0; k < 16; k++) pass[j + k] ^= digest[k];