From 4ddff3ce7fa1d583fb35ec335c26ce1239d676f2 Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Tue, 8 Jul 2025 21:24:12 -0400 Subject: [PATCH] Teh new way to build A1 sequence seems to be working --- conf/mailleur.conf.dvl | 2 +- lib/lvleml.c | 2 +- lib/unidig.c | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/conf/mailleur.conf.dvl b/conf/mailleur.conf.dvl index ff79301..30ce830 100644 --- a/conf/mailleur.conf.dvl +++ b/conf/mailleur.conf.dvl @@ -8,7 +8,7 @@ ROOTBASE="/home/jmp/safe-mailleur/mailleur/test_area/" #defining local default domain DFLTDOMAIN="example.com" #defineing the local REALM -REALM="mailleur-email-dvl" +REALM="mailleur-email" #------------------------------------------------ #list of listening port to do SMTP protocole #format diff --git a/lib/lvleml.c b/lib/lvleml.c index 84c56a8..3cf5230 100644 --- a/lib/lvleml.c +++ b/lib/lvleml.c @@ -656,7 +656,7 @@ static void get_auth_digest_md5(CONTYP *contact,char **rmtpass) char *challenge; RSPTYP *resp; char answer[300]; -char hash[20]; +char hash[40]; int phase; _Bool proceed; diff --git a/lib/unidig.c b/lib/unidig.c index 0eed6eb..fa31f90 100644 --- a/lib/unidig.c +++ b/lib/unidig.c @@ -446,6 +446,20 @@ proceed=(resp!=(RSPTYP *)0); while (proceed==true) { switch (phase) { case 0 : //computing A1 from data-base contents + { + MD5TYP *AX; + char *HAX; + char seq[300]; + + (void) snprintf(seq,sizeof(seq),"%s:%s:%s", + "webmaster@example.com", + REALM, + "webmaster"); + AX=dig_hashmd5((unsigned char *)seq,strlen(seq)); + HAX=cnv_tohexa((char *)AX,sizeof(MD5TYP)); + (void) rou_alert(0,"%s JMPDBG CAL-HASH=<%s>",OPEP,HAX); + } + (void) rou_alert(0,"%s JMPDBG POS-HASH=<%s>",OPEP,hash); A1=dig_get_plain_md5(hash); if (A1==(MD5TYP *)0) { (void) rou_alert(0,"%s Unable to convert hash=<%s>",OPEP,hash); @@ -497,6 +511,7 @@ while (proceed==true) { } HA2=rou_freestr(HA2); HA1=rou_freestr(HA1); +(void) rou_alert(0,"JMPDBG mode=<%s> HA0=<%s>",mode,HA0); return HA0; #undef OPEP -- 2.47.3