cvs commit: jakarta-tomcat-connectors/jk/native/common jk_md5.c
mturk 2005/04/10 23:58:30 Modified:jk/native/common jk_md5.c Log: Fix compile time warning about no previous prototype.. Revision ChangesPath 1.12 +2 -2 jakarta-tomcat-connectors/jk/native/common/jk_md5.c Index: jk_md5.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_md5.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- jk_md5.c 8 Oct 2004 07:50:39 - 1.11 +++ jk_md5.c 11 Apr 2005 06:58:30 - 1.12 @@ -243,7 +243,7 @@ /* MD5 finalization. Ends an MD5 message-digest operation, writing the the message digest and zeroizing the context. */ -void JK_METHOD jk_MD5Final(unsigned char digest[16], JK_MD5_CTX * context) +static void JK_METHOD jk_MD5Final(unsigned char digest[16], JK_MD5_CTX * context) { unsigned char bits[8]; size_t idx, padLen; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native/common jk_md5.c
mturk 2004/10/08 00:22:58 Modified:jk/native/common jk_md5.c Log: Untabify the source code Revision ChangesPath 1.10 +119 -135 jakarta-tomcat-connectors/jk/native/common/jk_md5.c Index: jk_md5.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_md5.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- jk_md5.c 24 Feb 2004 08:45:48 - 1.9 +++ jk_md5.c 8 Oct 2004 07:22:58 - 1.10 @@ -119,10 +119,10 @@ #define S44 21 static void MD5Transform(JK_UINT4 state[4], const unsigned char block[64]); -static void Encode(unsigned char *output, const JK_UINT4 *input, unsigned int len); -static void Decode(JK_UINT4 *output, const unsigned char *input, unsigned int len); +static void Encode(unsigned char *output, const JK_UINT4 *input, size_t len); +static void Decode(JK_UINT4 *output, const unsigned char *input, size_t len); static void jk_MD5Init(JK_MD5_CTX *context); -static void jk_MD5Update(JK_MD5_CTX *context, const unsigned char *input, unsigned int inputLen); +static void jk_MD5Update(JK_MD5_CTX *context, const unsigned char *input, size_t inputLen); /*static void jk_MD5Final(unsigned char digest[JK_MD5_DIGESTSIZE], JK_MD5_CTX *context);*/ static unsigned char PADDING[64] = @@ -184,17 +184,17 @@ context. */ static void jk_MD5Update(JK_MD5_CTX *context, const unsigned char *input, - unsigned int inputLen) + size_t inputLen) { -unsigned int i, idx, partLen; +size_t i, idx, partLen; /* Compute number of bytes mod 64 */ -idx = (unsigned int) ((context-count[0] 3) 0x3F); +idx = (size_t) ((context-count[0] 3) 0x3F); /* Update number of bits */ if ((context-count[0] += ((JK_UINT4) inputLen 3)) - ((JK_UINT4) inputLen 3)) { - context-count[1]++; + ((JK_UINT4) inputLen 3)) { +context-count[1]++; } context-count[1] += (JK_UINT4) inputLen 29; @@ -203,36 +203,36 @@ /* Transform as many times as possible. */ #ifndef CHARSET_EBCDIC if (inputLen = partLen) { - memcpy(context-buffer[idx], input, partLen); - MD5Transform(context-state, context-buffer); +memcpy(context-buffer[idx], input, partLen); +MD5Transform(context-state, context-buffer); - for (i = partLen; i + 63 inputLen; i += 64) { - MD5Transform(context-state, input[i]); - } +for (i = partLen; i + 63 inputLen; i += 64) { +MD5Transform(context-state, input[i]); +} - idx = 0; +idx = 0; } else { - i = 0; +i = 0; } /* Buffer remaining input */ memcpy(context-buffer[idx], input[i], inputLen - i); #else /*CHARSET_EBCDIC*/ if (inputLen = partLen) { - ebcdic2ascii(context-buffer[idx], input, partLen); - MD5Transform(context-state, context-buffer); +ebcdic2ascii(context-buffer[idx], input, partLen); +MD5Transform(context-state, context-buffer); - for (i = partLen; i + 63 inputLen; i += 64) { - unsigned char inp_tmp[64]; - ebcdic2ascii(inp_tmp, input[i], 64); - MD5Transform(context-state, inp_tmp); - } +for (i = partLen; i + 63 inputLen; i += 64) { +unsigned char inp_tmp[64]; +ebcdic2ascii(inp_tmp, input[i], 64); +MD5Transform(context-state, inp_tmp); +} - idx = 0; +idx = 0; } else { - i = 0; +i = 0; } /* Buffer remaining input */ @@ -246,7 +246,7 @@ void JK_METHOD jk_MD5Final(unsigned char digest[16], JK_MD5_CTX *context) { unsigned char bits[8]; -unsigned int idx, padLen; +size_t idx, padLen; /* Save number of bits */ @@ -268,7 +268,7 @@ #endif /*CHARSET_EBCDIC*/ /* Pad out to 56 mod 64. */ -idx = (unsigned int) ((context-count[0] 3) 0x3f); +idx = (size_t) ((context-count[0] 3) 0x3f); padLen = (idx 56) ? (56 - idx) : (120 - idx); jk_MD5Update(context, (const unsigned char *)PADDING, padLen); @@ -290,76 +290,76 @@ Decode(x, block, 64); /* Round 1 */ -FF(a, b, c, d, x[0], S11, 0xd76aa478); /* 1 */ -FF(d, a, b, c, x[1], S12, 0xe8c7b756); /* 2 */ -FF(c, d, a, b, x[2], S13, 0x242070db); /* 3 */ -FF(b, c, d, a, x[3], S14, 0xc1bdceee); /* 4 */ -FF(a, b, c, d, x[4], S11, 0xf57c0faf); /* 5 */ -FF(d, a, b, c, x[5], S12, 0x4787c62a); /* 6 */ -FF(c, d, a, b, x[6], S13, 0xa8304613); /* 7 */ -FF(b, c, d, a, x[7], S14, 0xfd469501); /* 8 */ -FF(a, b, c, d, x[8], S11, 0x698098d8); /* 9 */ -FF(d, a, b, c, x[9], S12, 0x8b44f7af); /* 10 */ -FF(c, d, a, b, x[10], S13, 0x5bb1); /*
cvs commit: jakarta-tomcat-connectors/jk/native/common jk_md5.c
mmanders02/04/11 14:50:03 Modified:jk/native/common jk_md5.c Log: Updated to build for NetWare. Revision ChangesPath 1.7 +5 -5 jakarta-tomcat-connectors/jk/native/common/jk_md5.c Index: jk_md5.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_md5.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- jk_md5.c 31 Oct 2001 14:03:22 - 1.6 +++ jk_md5.c 11 Apr 2002 21:50:03 - 1.7 @@ -103,7 +103,7 @@ /*** * Description: MD5 encoding wrapper * * Author: Henri Gomez [EMAIL PROTECTED] * - * Version: $Revision: 1.6 $ * + * Version: $Revision: 1.7 $ * ***/ /* @@ -497,13 +497,13 @@ char buf[JK_MD5_DIGESTSIZE + 1]; ap_MD5Init(ctx); -ap_MD5Update(ctx, org, strlen(org)); +ap_MD5Update(ctx, org, strlen((const char *)org)); if (org2 != NULL) - ap_MD5Update(ctx, org2, strlen(org2)); + ap_MD5Update(ctx, org2, strlen((const char *)org2)); -ap_MD5Final(buf, ctx); - return (jk_hextocstr(buf, dst, JK_MD5_DIGESTSIZE)); +ap_MD5Final((unsigned char *)buf, ctx); + return (jk_hextocstr((unsigned char *)buf, dst, JK_MD5_DIGESTSIZE)); } #endif /* USE_APACHE_MD5 */ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/jk/native/common jk_md5.c
hgomez 01/06/19 08:55:08 Modified:jk/native/common jk_md5.c Log: Bug fixes, bad buffer used ! Revision ChangesPath 1.5 +2 -2 jakarta-tomcat-connectors/jk/native/common/jk_md5.c Index: jk_md5.c === RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_md5.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- jk_md5.c 2001/06/14 19:43:58 1.4 +++ jk_md5.c 2001/06/19 15:55:04 1.5 @@ -103,7 +103,7 @@ /*** * Description: MD5 encoding wrapper * * Author: Henri Gomez [EMAIL PROTECTED] * - * Version: $Revision: 1.4 $ * + * Version: $Revision: 1.5 $ * ***/ /* @@ -502,7 +502,7 @@ if (org2 != NULL) ap_MD5Update(ctx, org2, strlen(org2)); -ap_MD5Final(dst, ctx); +ap_MD5Final(buf, ctx); return (jk_hextocstr(buf, dst, JK_MD5_DIGESTSIZE)); }
Re: cvs commit: jakarta-tomcat-connectors/jk/native/common jk_md5.c
On Tue, Jun 19, 2001 at 03:55:09PM -, [EMAIL PROTECTED] wrote: hgomez 01/06/19 08:55:08 Modified:jk/native/common jk_md5.c Log: Bug fixes, bad buffer used ! Revision ChangesPath 1.5 +2 -2 jakarta-tomcat-connectors/jk/native/common/jk_md5.c [...] ISTR that j-t-c/jk/native already depends on APR. Instead of duplicating efforts, may I suggest we reuse the md5 functionality of APR (see apr_md5.h)? -aaron
Re: cvs commit: jakarta-tomcat-connectors/jk/native/common jk_md5 .c
ISTR that j-t-c/jk/native already depends on APR. Instead of duplicating efforts, may I suggest we reuse the md5 functionality of APR (see apr_md5.h)? mod_jk didn't use APR. webapp use APR. It's not a duplicate effort since I use allready code present in Apache (if linked with Apache) or code from Apache (if I'm using IIS/iPlanet/Domino). - Henri Gomez ___[_] EMAIL : [EMAIL PROTECTED](. .) PGP KEY : 697ECEDD...oOOo..(_)..oOOo... PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6