diff options
author | markus <> | 2002-09-03 22:05:59 +0000 |
---|---|---|
committer | markus <> | 2002-09-03 22:05:59 +0000 |
commit | 9482ba4a58b16aebf5b63997d4f5c683914c694f (patch) | |
tree | 5832f9ffd55cceb354b32588afb660444ec4f444 /src/lib/libssl/test/md4test.c | |
parent | e4fd57152b3c9ab190f2b7a12404e78bdbbefb77 (diff) | |
download | openbsd-9482ba4a58b16aebf5b63997d4f5c683914c694f.tar.gz openbsd-9482ba4a58b16aebf5b63997d4f5c683914c694f.tar.bz2 openbsd-9482ba4a58b16aebf5b63997d4f5c683914c694f.zip |
sync tests with 0.9.7-beta1
Diffstat (limited to 'src/lib/libssl/test/md4test.c')
-rw-r--r-- | src/lib/libssl/test/md4test.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/libssl/test/md4test.c b/src/lib/libssl/test/md4test.c index 97e6e21efd..e0fdc42282 100644 --- a/src/lib/libssl/test/md4test.c +++ b/src/lib/libssl/test/md4test.c | |||
@@ -60,13 +60,14 @@ | |||
60 | #include <string.h> | 60 | #include <string.h> |
61 | #include <stdlib.h> | 61 | #include <stdlib.h> |
62 | 62 | ||
63 | #ifdef NO_MD4 | 63 | #ifdef OPENSSL_NO_MD4 |
64 | int main(int argc, char *argv[]) | 64 | int main(int argc, char *argv[]) |
65 | { | 65 | { |
66 | printf("No MD4 support\n"); | 66 | printf("No MD4 support\n"); |
67 | return(0); | 67 | return(0); |
68 | } | 68 | } |
69 | #else | 69 | #else |
70 | #include <openssl/evp.h> | ||
70 | #include <openssl/md4.h> | 71 | #include <openssl/md4.h> |
71 | 72 | ||
72 | static char *test[]={ | 73 | static char *test[]={ |
@@ -96,13 +97,15 @@ int main(int argc, char *argv[]) | |||
96 | int i,err=0; | 97 | int i,err=0; |
97 | unsigned char **P,**R; | 98 | unsigned char **P,**R; |
98 | char *p; | 99 | char *p; |
100 | unsigned char md[MD4_DIGEST_LENGTH]; | ||
99 | 101 | ||
100 | P=(unsigned char **)test; | 102 | P=(unsigned char **)test; |
101 | R=(unsigned char **)ret; | 103 | R=(unsigned char **)ret; |
102 | i=1; | 104 | i=1; |
103 | while (*P != NULL) | 105 | while (*P != NULL) |
104 | { | 106 | { |
105 | p=pt(MD4(&(P[0][0]),(unsigned long)strlen((char *)*P),NULL)); | 107 | EVP_Digest(&(P[0][0]),(unsigned long)strlen((char *)*P),md,NULL,EVP_md4(), NULL); |
108 | p=pt(md); | ||
106 | if (strcmp(p,(char *)*R) != 0) | 109 | if (strcmp(p,(char *)*R) != 0) |
107 | { | 110 | { |
108 | printf("error calculating MD4 on '%s'\n",*P); | 111 | printf("error calculating MD4 on '%s'\n",*P); |