Re: cvs commit: squid/helpers/basic_auth/NCSA crypt_md5.c

From: Guido Serassio <guido.serassio@dont-contact.us>
Date: Wed, 02 Jan 2008 20:51:42 +0100

Hi Henrik,

At 14:41 02/01/2008, Henrik Nordstrom wrote:
>hno 2008/01/02 06:41:59 MST
>
> Modified files:
> helpers/basic_auth/NCSA crypt_md5.c
> Log:
> Use system MD5 on FreeBSD
>
> Clean up the MD5 detection somewhat to make it work on FreeBSD.
>
> - probe for libmd
> - probe for #include <md5.h>
> - rename include/md5.h to include/squid_md5.h to finish the name transition
>

There is some problem here:
I'm no more able to build NCSA on Windows without OpenSSL.

The attached patch fix the problem, but I'm not sure if' it's correct.

Regards

Guido

-
========================================================
Guido Serassio
Acme Consulting S.r.l. - Microsoft Certified Partner
Via Lucia Savarino, 1 10098 - Rivoli (TO) - ITALY
Tel. : +39.011.9530135 Fax. : +39.011.9781115
Email: guido.serassio@acmeconsulting.it
WWW: http://www.acmeconsulting.it/

Index: helpers/basic_auth/NCSA/crypt_md5.c
===================================================================
RCS file: /cvsroot/squid/squid/helpers/basic_auth/NCSA/crypt_md5.c,v
retrieving revision 1.3.8.1
diff -u -p -r1.3.8.1 crypt_md5.c
--- helpers/basic_auth/NCSA/crypt_md5.c 2 Jan 2008 17:56:07 -0000 1.3.8.1
+++ helpers/basic_auth/NCSA/crypt_md5.c 2 Jan 2008 19:45:54 -0000
@@ -20,7 +20,7 @@
 #include "config.h"
 #include "squid_md5.h"
 
-#include "crypt_squid_md5.h"
+#include "crypt_md5.h"
 
 static unsigned char itoa64[] = /* 0 ... 63 => ascii - 64 */
     "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
@@ -43,7 +43,7 @@ static void squid_md5to64(char *s, unsig
  * If not the normal UNIX magic $1$ is used.
  */
 
-char *crypt_squid_md5(const char *pw, const char *salt)
+char *crypt_md5(const char *pw, const char *salt)
 {
     const char *magic = "$1$";
     int magiclen = 3;
@@ -171,7 +171,7 @@ char *crypt_squid_md5(const char *pw, co
 /* Created by Ramon de Carvalho <ramondecarvalho@yahoo.com.br>
    Refined by Rodrigo Rubira Branco <rodrigo@kernelhacking.com>
 */
-char *squid_md5sum(const char *s){
+char *md5sum(const char *s){
    static unsigned char digest[16];
    SQUID_MD5_CTX ctx;
    int idx;
Received on Wed Jan 02 2008 - 12:52:01 MST

This archive was generated by hypermail pre-2.1.9 : Wed Jan 30 2008 - 12:00:09 MST