Commit d9265da2 d9265da2fb40da26e6d775c6439828ecfeec1da6 by Sergey Poznyakoff

Use FSF md5 functions.

1 parent 768751ba
......@@ -31,7 +31,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <stdlib.h>
#include <string.h>
#include <md5-rsa.h>
#include <md5.h>
#include <ctype.h>
#ifdef HAVE_STRINGS_H
# include <strings.h>
......@@ -811,12 +811,12 @@ const char * sieve_errname (int e)
static int makehash(unsigned char hash[HASHSIZE], char *s1, char *s2)
{
MD5_CTX ctx;
struct md5_ctx ctx;
MD5Init(&ctx);
MD5Update(&ctx, (unsigned char*) s1, strlen(s1));
MD5Update(&ctx, (unsigned char*) s2, strlen(s2));
MD5Final(hash, &ctx);
md5_init_ctx (&ctx);
md5_process_bytes (s1, strlen(s1), &ctx);
md5_process_bytes (s2, strlen(s2), &ctx);
md5_finish_ctx (&ctx, hash);
return SIEVE_OK;
}
......