projects
/
l2tpns.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Replace flags used for LCP/IPCP with state machine.
[l2tpns.git]
/
test
/
radius.c
diff --git
a/test/radius.c
b/test/radius.c
index
cc42db5
..
d0a8dc4
100644
(file)
--- a/
test/radius.c
+++ b/
test/radius.c
@@
-19,7
+19,7
@@
#include <fcntl.h>
#include <sys/select.h>
#include <signal.h>
#include <fcntl.h>
#include <sys/select.h>
#include <signal.h>
-#include
"../md5.h"
+#include
<openssl/md5.h>
extern char *optarg;
extern int optind;
extern char *optarg;
extern int optind;
@@
-394,16
+394,16
@@
int main(int argc, char *argv[])
for (int j = 0; j < pw_len; j += 16)
{
MD5_CTX ctx;
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)
if (j)
- MD5Update(&ctx, pass + j - 16, 16);
+ MD5
_
Update(&ctx, pass + j - 16, 16);
else
/* authenticator */
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];
for (int k = 0; k < 16; k++)
pass[j + k] ^= digest[k];