/* the exchange with the remote sereur */
/* */
/********************************************************/
-static _Bool get_auth_cram_md5(CONTYP *contact,char **rmtpass)
+static void get_auth_cram_md5(CONTYP *contact,char **rmtpass)
{
#define OPEP "lvleml.c:get_auth_cram_md5,"
-_Bool goodpass;
char challenge[300];
char answer[300];
char name[300];
int phase;
_Bool proceed;
-goodpass=false;
(void) memset(challenge,'\000',sizeof(challenge));
(void) memset(answer,'\000',sizeof(answer));
(void) memset(name,'\000',sizeof(name));
case 4 : { //extracting user information
USRTYP *usr;
+ contact->authname=rou_freestr(contact->authname);
+ contact->authname=strdup(name);
if (sql_mngusr(contact->sqlptr,sql_select,name,&usr)==true) {
(void) snprintf(passwd,sizeof(passwd),"%s",usr->passwd);
usr=sql_freeusr(usr);
hexa=cnv_tohexa(local,strlen(local));
//(void) rou_alert(0,"%s anwr=<%s>",OPEP,answer);
//(void) rou_alert(0,"%s hexa=<%s>",OPEP,hexa);
- goodpass=(strcmp(hexa,answer)==0);
+ contact->authenticated=(strcmp(hexa,answer)==0);
hexa=rou_freestr(hexa);
local=rou_freestr(local);
}
}
phase++;
}
-return goodpass;
#undef OPEP
}