Use FSF md5 functions.
Showing
1 changed file
with
8 additions
and
8 deletions
... | @@ -31,7 +31,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ... | @@ -31,7 +31,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
31 | 31 | ||
32 | #include <stdlib.h> | 32 | #include <stdlib.h> |
33 | #include <string.h> | 33 | #include <string.h> |
34 | #include <md5-rsa.h> | 34 | #include <md5.h> |
35 | #include <ctype.h> | 35 | #include <ctype.h> |
36 | #ifdef HAVE_STRINGS_H | 36 | #ifdef HAVE_STRINGS_H |
37 | # include <strings.h> | 37 | # include <strings.h> |
... | @@ -108,7 +108,7 @@ int script_require(sieve_script_t *s, char *req) | ... | @@ -108,7 +108,7 @@ int script_require(sieve_script_t *s, char *req) |
108 | } | 108 | } |
109 | 109 | ||
110 | /* given an interpretor and a script, produce an executable script */ | 110 | /* given an interpretor and a script, produce an executable script */ |
111 | int sieve_script_parse(sieve_interp_t *interp, FILE *script, | 111 | int sieve_script_parse(sieve_interp_t *interp, FILE *script, |
112 | void *script_context, sieve_script_t **ret) | 112 | void *script_context, sieve_script_t **ret) |
113 | { | 113 | { |
114 | sieve_script_t *s; | 114 | sieve_script_t *s; |
... | @@ -811,14 +811,14 @@ const char * sieve_errname (int e) | ... | @@ -811,14 +811,14 @@ const char * sieve_errname (int e) |
811 | 811 | ||
812 | static int makehash(unsigned char hash[HASHSIZE], char *s1, char *s2) | 812 | static int makehash(unsigned char hash[HASHSIZE], char *s1, char *s2) |
813 | { | 813 | { |
814 | MD5_CTX ctx; | 814 | struct md5_ctx ctx; |
815 | 815 | ||
816 | MD5Init(&ctx); | 816 | md5_init_ctx (&ctx); |
817 | MD5Update(&ctx, (unsigned char*) s1, strlen(s1)); | 817 | md5_process_bytes (s1, strlen(s1), &ctx); |
818 | MD5Update(&ctx, (unsigned char*) s2, strlen(s2)); | 818 | md5_process_bytes (s2, strlen(s2), &ctx); |
819 | MD5Final(hash, &ctx); | 819 | md5_finish_ctx (&ctx, hash); |
820 | 820 | ||
821 | return SIEVE_OK; | 821 | return SIEVE_OK; |
822 | } | 822 | } |
823 | 823 | ||
824 | /* execute a script on a message, producing side effects via callbacks. | 824 | /* execute a script on a message, producing side effects via callbacks. | ... | ... |
-
Please register or sign in to post a comment