diff options
author | beck <> | 2002-05-15 02:29:21 +0000 |
---|---|---|
committer | beck <> | 2002-05-15 02:29:21 +0000 |
commit | b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9 (patch) | |
tree | fa27cf82a1250b64ed3bf5f4a18c7354d470bbcc /src/lib/libcrypto/md4/md4test.c | |
parent | e471e1ea98d673597b182ea85f29e30c97cd08b5 (diff) | |
download | openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.gz openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.bz2 openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.zip |
OpenSSL 0.9.7 stable 2002 05 08 merge
Diffstat (limited to 'src/lib/libcrypto/md4/md4test.c')
-rw-r--r-- | src/lib/libcrypto/md4/md4test.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/libcrypto/md4/md4test.c b/src/lib/libcrypto/md4/md4test.c index 97e6e21efd..e0fdc42282 100644 --- a/src/lib/libcrypto/md4/md4test.c +++ b/src/lib/libcrypto/md4/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); |