diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/md5/md5test.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/lib/libcrypto/md5/md5test.c b/src/lib/libcrypto/md5/md5test.c index 74b84bc67f..a192a62bb3 100644 --- a/src/lib/libcrypto/md5/md5test.c +++ b/src/lib/libcrypto/md5/md5test.c | |||
| @@ -59,7 +59,15 @@ | |||
| 59 | #include <stdio.h> | 59 | #include <stdio.h> |
| 60 | #include <string.h> | 60 | #include <string.h> |
| 61 | #include <stdlib.h> | 61 | #include <stdlib.h> |
| 62 | #include "md5.h" | 62 | |
| 63 | #ifdef NO_MD5 | ||
| 64 | int main(int argc, char *argv[]) | ||
| 65 | { | ||
| 66 | printf("No MD5 support\n"); | ||
| 67 | return(0); | ||
| 68 | } | ||
| 69 | #else | ||
| 70 | #include <openssl/md5.h> | ||
| 63 | 71 | ||
| 64 | char *test[]={ | 72 | char *test[]={ |
| 65 | "", | 73 | "", |
| @@ -82,15 +90,8 @@ char *ret[]={ | |||
| 82 | "57edf4a22be3c955ac49da2e2107b67a", | 90 | "57edf4a22be3c955ac49da2e2107b67a", |
| 83 | }; | 91 | }; |
| 84 | 92 | ||
| 85 | #ifndef NOPROTO | ||
| 86 | static char *pt(unsigned char *md); | 93 | static char *pt(unsigned char *md); |
| 87 | #else | 94 | int main(int argc, char *argv[]) |
| 88 | static char *pt(); | ||
| 89 | #endif | ||
| 90 | |||
| 91 | int main(argc,argv) | ||
| 92 | int argc; | ||
| 93 | char *argv[]; | ||
| 94 | { | 95 | { |
| 95 | int i,err=0; | 96 | int i,err=0; |
| 96 | unsigned char **P,**R; | 97 | unsigned char **P,**R; |
| @@ -118,8 +119,7 @@ char *argv[]; | |||
| 118 | return(0); | 119 | return(0); |
| 119 | } | 120 | } |
| 120 | 121 | ||
| 121 | static char *pt(md) | 122 | static char *pt(unsigned char *md) |
| 122 | unsigned char *md; | ||
| 123 | { | 123 | { |
| 124 | int i; | 124 | int i; |
| 125 | static char buf[80]; | 125 | static char buf[80]; |
| @@ -128,3 +128,4 @@ unsigned char *md; | |||
| 128 | sprintf(&(buf[i*2]),"%02x",md[i]); | 128 | sprintf(&(buf[i*2]),"%02x",md[i]); |
| 129 | return(buf); | 129 | return(buf); |
| 130 | } | 130 | } |
| 131 | #endif | ||
