1 diff -uNdr mod_auth_pgsql-2.0.2b1.old/mod_auth_pgsql.c mod_auth_pgsql-2.0.2b1/mod_auth_pgsql.c
2 --- mod_auth_pgsql-2.0.2b1.old/mod_auth_pgsql.c 2003-10-06 10:45:59.000000000 +0200
3 +++ mod_auth_pgsql-2.0.2b1/mod_auth_pgsql.c 2004-10-30 21:22:24.000000000 +0200
8 -#include "apr_compat.h"
10 #include "apr_strings.h"
11 #include "apr_buckets.h"
13 char *auth_pg_md5(char *pw)
16 - unsigned char digest[MD5_DIGESTSIZE];
17 - static unsigned char md5hash[MD5_DIGESTSIZE * 2 + 1];
18 + unsigned char digest[APR_MD5_DIGESTSIZE];
19 + static unsigned char md5hash[APR_MD5_DIGESTSIZE * 2 + 1];
22 apr_md5(digest, (const unsigned char *) pw, strlen(pw));
24 - for (i = 0; i < MD5_DIGESTSIZE; i++)
25 + for (i = 0; i < APR_MD5_DIGESTSIZE; i++)
26 apr_snprintf((char *) &md5hash[i + i], 3, "%02x", digest[i]);
28 - md5hash[MD5_DIGESTSIZE * 2] = '\0';
29 + md5hash[APR_MD5_DIGESTSIZE * 2] = '\0';
30 return (char *) md5hash;
37 - if (!(result = (char *) ap_palloc(r->pool, strlen(val) + 1))) {
38 + if (!(result = (char *) apr_palloc(r->pool, strlen(val) + 1))) {
39 apr_snprintf(pg_errstr, MAX_STRING_LEN,
40 "Could not get memory for Postgres query.");