fixed md5 on 64bit platforms

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@856 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.8
Jan Kneschke 2005-11-17 14:39:07 +00:00
parent 60ccbd89f7
commit 62d8d1ef53
10 changed files with 20 additions and 50 deletions

View File

@ -220,7 +220,7 @@ mod_accesslog_la_LIBADD = $(common_libadd)
hdr = server.h buffer.h network.h log.h keyvalue.h \
response.h request.h fastcgi.h chunk.h \
settings.h http_chunk.h http_auth_digest.h \
md5.h md5_global.h http_auth.h stream.h \
md5.h http_auth.h stream.h \
fdevent.h connections.h base.h stat_cache.h \
plugin.h mod_auth.h \
etag.h joblist.h array.h crc32.h \

View File

@ -34,7 +34,6 @@
#ifdef USE_OPENSSL
# include <openssl/md5.h>
#else
# include "md5_global.h"
# include "md5.h"
#endif

View File

@ -4,7 +4,6 @@
#include "buffer.h"
#ifndef USE_OPENSSL
# include "md5_global.h"
# include "md5.h"
#endif

View File

@ -30,7 +30,6 @@ documentation and/or software.
#ifndef USE_OPENSSL
#include <string.h>
#include "md5_global.h"
#include "md5.h"
/* Constants for MD5Transform routine.
@ -53,21 +52,19 @@ documentation and/or software.
#define S43 15
#define S44 21
static void MD5Transform PROTO_LIST ((UINT4 [4], unsigned char [64]));
static void Encode PROTO_LIST
((unsigned char *, UINT4 *, unsigned int));
static void Decode PROTO_LIST
((UINT4 *, unsigned char *, unsigned int));
static void MD5Transform (UINT4 [4], unsigned char [64]);
static void Encode (unsigned char *, UINT4 *, unsigned int);
static void Decode (UINT4 *, unsigned char *, unsigned int);
#ifdef HAVE_MEMCPY
#define MD5_memcpy(output, input, len) memcpy((output), (input), (len))
#else
static void MD5_memcpy PROTO_LIST ((POINTER, POINTER, unsigned int));
static void MD5_memcpy (POINTER, POINTER, unsigned int);
#endif
#ifdef HAVE_MEMSET
#define MD5_memset(output, value, len) memset((output), (value), (len))
#else
static void MD5_memset PROTO_LIST ((POINTER, int, unsigned int));
static void MD5_memset (POINTER, int, unsigned int);
#endif
static unsigned char PADDING[64] = {

View File

@ -22,6 +22,17 @@ without express or implied warranty of any kind.
These notices must be retained in any copies of any part of this
documentation and/or software.
*/
#include <limits.h>
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#define UINT4 uint32_t
#define UINT2 uint16_t
#define POINTER unsigned char *
/* MD5 context. */
typedef struct {
@ -30,8 +41,7 @@ typedef struct {
unsigned char buffer[64]; /* input buffer */
} MD5_CTX;
void MD5_Init PROTO_LIST ((MD5_CTX *));
void MD5_Update PROTO_LIST
((MD5_CTX *, unsigned char *, unsigned int));
void MD5_Final PROTO_LIST ((unsigned char [16], MD5_CTX *));
void MD5_Init (MD5_CTX *);
void MD5_Update (MD5_CTX *, unsigned char *, unsigned int);
void MD5_Final (unsigned char [16], MD5_CTX *);

View File

@ -1,31 +0,0 @@
/* GLOBAL.H - RSAREF types and constants
*/
/* PROTOTYPES should be set to one if and only if the compiler supports
function argument prototyping.
The following makes PROTOTYPES default to 0 if it has not already
been defined with C compiler flags.
*/
#ifndef PROTOTYPES
#define PROTOTYPES 0
#endif
/* POINTER defines a generic pointer type */
typedef unsigned char *POINTER;
/* UINT2 defines a two byte word */
typedef unsigned short int UINT2;
/* UINT4 defines a four byte word */
typedef unsigned long int UINT4;
/* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
returns an empty list.
*/
#if PROTOTYPES
#define PROTO_LIST(list) list
#else
#define PROTO_LIST(list) ()
#endif

View File

@ -20,7 +20,6 @@
#ifdef USE_OPENSSL
# include <openssl/md5.h>
#else
# include "md5_global.h"
# include "md5.h"
#endif

View File

@ -13,7 +13,6 @@
#ifdef USE_OPENSSL
# include <openssl/md5.h>
#else
# include "md5_global.h"
# include "md5.h"
#endif

View File

@ -15,7 +15,6 @@
#ifdef USE_OPENSSL
# include <openssl/md5.h>
#else
# include "md5_global.h"
# include "md5.h"
#endif

View File

@ -11,7 +11,6 @@
#ifdef USE_OPENSSL
# include <openssl/md5.h>
#else
# include "md5_global.h"
# include "md5.h"
#endif