]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Put back a digmd5.c functional tools
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Mon, 7 Jul 2025 09:01:30 +0000 (05:01 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Mon, 7 Jul 2025 09:01:30 +0000 (05:01 -0400)
Makefile.dist
lib/lvleml.c
tools/Makefile
tools/digmd5.c
tools/toremake [deleted file]

index e937c4b39131e5408ff54c0a9ac790465ef9e828..2c58bce2b4a49fb346b88aee56cd963b926a4dc8 100644 (file)
@@ -34,10 +34,10 @@ tarfile     : clean
                $(APLV)/bin                                     \
                $(APLV)/lib                                     \
                $(APLV)/linux                                   \
-               $(APLV)/nodb                                    \
                $(APLV)/shell                                   \
                $(APLV)/sysconfig                               \
                $(APLV)/support                                 \
+               $(APLV)/tools                                   \
                $(APLV)
          @ date > $(APLV)/$(APLV).build_date
          @ cp -a Makefile*     $(APLV)/
@@ -54,6 +54,9 @@ tarfile       : clean
          @ cp -a                                               \
                shell/getsysos.sh                               \
                $(APLV)/shell/
+         @ cp -a                                               \
+               tools/                                          \
+               $(APLV)/
          @ cp -a support/*.sh                                  \
                $(APLV)/support
          @ cp -a sysconfig/*                                   \
index 881e30a6ce86122e1056c89cfcd705f382e94c63..d2921becac0274ae0f3f29be11cec4453ad7ed40 100644 (file)
@@ -366,8 +366,8 @@ static char *get_auth_cram_md5(CONTYP *contact,int delay)
 char *decoded;
 char challenge[300];
 char answer[300];
-char name[100];
-char passwd[100];
+char name[300];
+char passwd[300];
 int phase;
 _Bool proceed;
 
index da59d8b01d73481c41da873fc328a573924d616b..e4c153602f705716f5843b2233a0db312842740d 100644 (file)
@@ -14,7 +14,7 @@ exe   :
 
 
 clean  :
-          - rm -fr *.o $(EXE)
+          - rm -fr *.o $(EXE) toremake
           - rm -fr ../bin/*
 
 #--------------------------------------------------------------------
index 7cf81f8dd3ea6c44f54781c85b7b99d49384d74e..cb915acdebe1666b31d81e291e30c3c2785cb597 100644 (file)
@@ -46,14 +46,21 @@ proceed=(cleartext!=(char *)0);
 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);
diff --git a/tools/toremake b/tools/toremake
deleted file mode 100644 (file)
index e69de29..0000000