From e0dbc73796214e6fb545c1a8329fecb035cc31f6 Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Sat, 5 Jul 2025 16:16:06 -0400 Subject: [PATCH] dbgmd5 tools start to work --- tools/Makefile | 8 +++++++- tools/digmd5.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/tools/Makefile b/tools/Makefile index 42d8a44..7f11cae 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -41,10 +41,16 @@ LIBS = $(LIBMAIL) \ -lssl \ #-------------------------------------------------------------------- +#testing area +dbgmd5 : debug + gdb \ + --args \ + ./digmd5 secret bigre +#-------------------------------------------------------------------- #Dependances #-------------------------------------------------------------------- digmd5 : toremake digmd5.o - @ $(LD) $(LDFLAGS) -o ../bin/$@ $@.o $(LIBS) + @ $(LD) $(LDFLAGS) -o ../tools/$@ $@.o $(LIBS) digmd5.o: digmd5.c \ ../lib/unidig.h \ diff --git a/tools/digmd5.c b/tools/digmd5.c index a6d6b75..f2d3a5b 100644 --- a/tools/digmd5.c +++ b/tools/digmd5.c @@ -24,8 +24,35 @@ */ /********************************************************/ /* */ +/* Procedure to check the DIGEST response */ /* */ /********************************************************/ +static int chkresponse(int argc,char *argv[]) + +{ +#define OPEP "digmd5.c:chkresponse," + +int status; +int phase; +_Bool proceed; + +status=-1; +phase=0; +proceed=true; +while (proceed==true) { + switch (phase) { + case 0 : // + (void) rou_alert(0,"%s, argv[1]=<%s>",OPEP,argv[1]); + break; + default : //SAFE Guard + proceed=false; + break; + } + phase++; + } +return status; +#undef OPEP +} /* */ @@ -70,6 +97,7 @@ while (proceed==true) { foreground=true; break; case 3 : //doing main task + (void) chkresponse(params->argc,params->argv); break; default : //end of task proceed=false; -- 2.47.3