]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Starting to implement CRAM-MD5 function
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Wed, 2 Jul 2025 23:22:15 +0000 (19:22 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Wed, 2 Jul 2025 23:22:15 +0000 (19:22 -0400)
Makefile
lib/lvleml.c

index 6e7b9b252c29e7d30a1e6b563b5cd051d9fcf948..5bd0a0073524d7c53d101709cf4e0371c2d3b6ce 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -145,10 +145,10 @@ tlsref:
                        -starttls smtp                  \
                        -connect courriel.colba.net:587
 
+#                      -connect mx2.free.fr:25
 #                      -connect mailprod1.safe.ca:587
 #                      -connect courriel.colba.net:25
 #                      -connect courriel.colba.net:587
-#                      -connect smtp.google.com:25
 #                      -connect $(TESTSRV):$(TESTPORT) 
 
 #--------------------------------------------------------------------
index 66f0361bc8396478b8c8a4c7ee0145a7caaf757b..8cdfc4b95982d16f364ca4a704eaa4f5a0e09c54 100644 (file)
@@ -341,6 +341,24 @@ return decoded;
 */
 /********************************************************/
 /*                                                      */
+/*     Procedure to manage authentication in "cram-md5"*/
+/*      mode, return a builded "decoded" string from    */
+/*      the exchange with the remote sereur             */
+/*                                                      */
+/********************************************************/
+static char *get_auth_md5(CONTYP *contact,int delay)
+
+{
+char *decoded;
+
+decoded=(char *)0;
+return decoded;
+}
+/*
+^L
+*/
+/********************************************************/
+/*                                                      */
 /*     Procedure to manage authentication in "login"   */
 /*      mode, return "decoded", NULL if not extracted   */
 /*                                                      */
@@ -464,7 +482,7 @@ static _Bool getauth(CONTYP *contact,int delay,char *buffer)
 {
 #define OPEP    "lvleml.c:getauth,"
 
-static char *vocloc[]={"plain","login",(char *)0};
+static char *vocloc[]={"plain","login","cram-md5",(char *)0};
 
 _Bool isok;
 int code;
@@ -519,6 +537,10 @@ while (proceed==true) {
           if ((decoded=get_auth_login(contact,delay))==(char *)0)
             phase=999;
           break;
+        case 2          :       //AUTH CRAM-MD5
+          if ((decoded=get_auth_md5(contact,delay))==(char *)0)
+            phase=999;
+          break;
         default         :       //not yet implemented
           (void) transmit(contact,true,"%d 5.7.3 Unknown auth mode",FAILED);
           (void) rou_alert(0,"%s auth type <%d> not yet implemented",OPEP);
@@ -971,7 +993,7 @@ static char *ehlostr[]= {
         "-STARTTLS",
         "-8BITMIME",
         "-ENHANCEDSTATUSCODES",
-        " AUTH PLAIN LOGIN",
+        " AUTH PLAIN LOGIN CRAM-MD5",
         (char *)0
         };