httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@decus.org (Rodent of Unusual Size)
Subject [PATCH] renaming md5* to ap_md5*
Date Tue, 02 Sep 1997 12:06:49 GMT
    As Dean mentioned, at least two reports have come in recently
    complaining about collisions in the md5* names.  Here's a patch to
    rename ours to ap_md5*.

    #ken    P-)}

Index: main/http_core.c
===================================================================
RCS file: /export/home/cvs/apachen/src/main/http_core.c,v
retrieving revision 1.117
diff -u -r1.117 http_core.c
--- http_core.c	1997/09/01 01:47:00	1.117
+++ http_core.c	1997/09/02 12:04:14
@@ -1656,7 +1656,7 @@
 #endif
 
 	if (d->content_md5 & 1) {
-	    table_set (r->headers_out, "Content-MD5", md5digest(r->pool, f));
+	    table_set (r->headers_out, "Content-MD5", ap_md5digest(r->pool, f));
 	}
 
 	rangestatus = set_byterange(r);
@@ -1690,7 +1690,7 @@
 	    MD5Init(&context);
 	    MD5Update(&context, (void *)mm, r->finfo.st_size);
 	    table_set (r->headers_out, "Content-MD5",
-		md5contextTo64(r->pool, &context));
+		ap_md5contextTo64(r->pool, &context));
 	}
 
 	rangestatus = set_byterange(r);
Index: main/util_md5.c
===================================================================
RCS file: /export/home/cvs/apachen/src/main/util_md5.c,v
retrieving revision 1.8
diff -u -r1.8 util_md5.c
--- util_md5.c	1997/07/15 21:39:59	1.8
+++ util_md5.c	1997/09/02 12:04:17
@@ -82,7 +82,7 @@
 #include "httpd.h"
 #include "util_md5.h"
 
-API_EXPORT(char *) md5 (pool *p, unsigned char *string)
+API_EXPORT(char *) ap_md5 (pool *p, unsigned char *string)
 {
     MD5_CTX my_md5;
     unsigned char hash[16];
@@ -149,7 +149,7 @@
 static char basis_64[] =
    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
 
-API_EXPORT(char *) md5contextTo64(pool *a, MD5_CTX *context)
+API_EXPORT(char *) ap_md5contextTo64(pool *a, MD5_CTX *context)
 {
     unsigned char digest[18];
     char *encodedDigest;
@@ -174,7 +174,7 @@
     return encodedDigest;
 }
 
-API_EXPORT(char *) md5digest(pool *p, FILE *infile)
+API_EXPORT(char *) ap_md5digest(pool *p, FILE *infile)
 {
     MD5_CTX context;
     unsigned char buf[1000];
@@ -187,6 +187,6 @@
         MD5Update(&context, buf, nbytes);
     }
     rewind(infile);
-    return md5contextTo64(p, &context);
+    return ap_md5contextTo64(p, &context);
 }
 
Index: main/util_md5.h
===================================================================
RCS file: /export/home/cvs/apachen/src/main/util_md5.h,v
retrieving revision 1.6
diff -u -r1.6 util_md5.h
--- util_md5.h	1997/07/15 21:39:59	1.6
+++ util_md5.h	1997/09/02 12:04:20
@@ -52,7 +52,7 @@
 
 #include "md5.h"
 
-API_EXPORT(char *) md5(pool *a, unsigned char *string);
-API_EXPORT(char *) md5contextTo64(pool *p, MD5_CTX *context);
-API_EXPORT(char *) md5digest(pool *p, FILE *infile);
+API_EXPORT(char *) ap_md5(pool *a, unsigned char *string);
+API_EXPORT(char *) ap_md5contextTo64(pool *p, MD5_CTX *context);
+API_EXPORT(char *) ap_md5digest(pool *p, FILE *infile);
 
Index: modules/standard/mod_digest.c
===================================================================
RCS file: /export/home/cvs/apachen/src/modules/standard/mod_digest.c,v
retrieving revision 1.21
diff -u -r1.21 mod_digest.c
--- mod_digest.c	1997/08/31 23:05:33	1.21
+++ mod_digest.c	1997/09/02 12:04:22
@@ -241,10 +241,10 @@
 /* The actual MD5 code... whee */
 
 char *find_digest(request_rec *r, digest_header_rec *h, char *a1) {
-  return md5(r->pool,
-	     (unsigned char *)pstrcat(r->pool, a1, ":", h->nonce, ":", 
-			  md5(r->pool,
-			      (unsigned char *)pstrcat(r->pool,r->method,":",
+  return ap_md5(r->pool,
+	        (unsigned char *)pstrcat(r->pool, a1, ":", h->nonce, ":", 
+			  ap_md5(r->pool,
+			         (unsigned char *)pstrcat(r->pool,r->method,":",
 						       h->requested_uri,NULL)),
 				      NULL));
 }

Mime
View raw message