From: Jean-Marc Pigeon (Delson) Date: Sun, 6 Jul 2025 19:29:30 +0000 (-0400) Subject: Fix probleme on realm contents (no '-' within realm?) X-Git-Tag: tag-0.12~17 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=c39443173d57a3971d76baaded0d4df4cdab9d5b;p=jmp%2Fmailleur Fix probleme on realm contents (no '-' within realm?) --- diff --git a/lib/lvleml.c b/lib/lvleml.c index 03f7d30..b0502cf 100644 --- a/lib/lvleml.c +++ b/lib/lvleml.c @@ -493,6 +493,7 @@ while (proceed==true) { (void) rou_alert(0,"%s JMPDBG phase='%d'",OPEP,phase); switch (phase) { case 0 : { //Building the challenge sequence + char *nchal; #define FMT "realm=\"%s\",nonce=\"%s\",qop=\"auth\",algorithm=md5-sess,charset=utf-8" char *nonce; @@ -501,6 +502,10 @@ while (proceed==true) { nonce=strdup("abcdef"); (void) snprintf(challenge,sizeof(challenge),FMT,contact->locname,nonce); nonce=rou_freestr(nonce); + nchal=dig_getchallenge(); + (void) rou_alert(0,"good chal=<%s>",challenge); + (void) rou_alert(0,"bad chal=<%s>",nchal); + (void) strcpy(challenge,nchal); } break; case 1 : { //sending challenge to remote @@ -524,6 +529,7 @@ while (proceed==true) { if (strlen(answer)==0) phase=999; //no need to go further } + break; case 3 : //Parsing the answer if ((resp=dig_parseresp(answer))==(RSPTYP *)0) phase=999; //Unable to parse answer diff --git a/lib/unidig.c b/lib/unidig.c index e93f51b..4b730ba 100644 --- a/lib/unidig.c +++ b/lib/unidig.c @@ -85,6 +85,7 @@ if (strlen(entry)>0) { resp->qop=strdup(ptr); break; case 6 : //realm + (void) rou_alert(0,"REALM=<%s>",ptr); resp->realm=rou_freestr(resp->realm); resp->realm=strdup(ptr); break; diff --git a/lib/unidig.h b/lib/unidig.h index cecc3c1..ba1e40e 100644 --- a/lib/unidig.h +++ b/lib/unidig.h @@ -8,7 +8,7 @@ #ifndef UNIDIG #define UNIDIG -#define REALM APPNAME"-email" +#define REALM APPNAME".email" typedef struct { //DIGEST-MD5 challange response structure char *username; //username requesting authentication