while (proceed==true) {
switch (phase) {
case 0 : //extracting data
- (void) rou_alert(1,"cleartext=<%s>",cleartext);
+ (void) rou_alert(0,"cleartext=<%s>",cleartext);
resp=dig_parseresp(cleartext);
break;
- case 1 : //checking
- /*
- if (dig_checkresp(resp,argv[0])==true)
- status=0;
- */
+ case 1 : { //checking
+ char *HA0;
+
+ if ((HA0=dig_hashresp(resp,"AUTHENTICATE",argv[0]))!=(char *)0) {
+ if (strcmp(HA0,resp->response)==0) {
+ (void) rou_alert(0,"Expected=<%s>",resp->response);
+ (void) rou_alert(0,"Computed=<%s>",HA0);
+ status=0;
+ }
+ HA0=rou_freestr(HA0);
+ }
+ }
break;
case 2 : //free memory
resp=dig_freeresp(resp);