]> SAFE projects GIT repository - jmp/mailleur/commitdiff
cipher information proprly inserted within email header
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Mon, 26 May 2025 14:27:15 +0000 (10:27 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Mon, 26 May 2025 14:27:15 +0000 (10:27 -0400)
lib/devsoc.c
lib/devsoc.h
lib/lvleml.c
lib/unitls.c

index bb71daab502837aca3af82add9a878b9c0d4e42e..6757dd34fec6a3a62f9f2df924a17a1a1b92be38 100644 (file)
@@ -1508,6 +1508,26 @@ return iscrypted;
 */
 /********************************************************/
 /*                                                     */
+/*      Procedure to return all cipher information      */
+/*                                                     */
+/********************************************************/
+PUBLIC const char *soc_getcipherid(SOCPTR *socptr)
+
+{
+const char *cipherid;
+SOCTYP *soc;
+
+cipherid=(const char *)0;
+soc=(SOCTYP *)socptr;
+if (soc!=(SOCTYP *)0)
+  cipherid=tls_getcipherid(soc->tls);
+return cipherid;
+}
+/*
+^L
+*/
+/********************************************************/
+/*                                                     */
 /*      Procedure to get the cipher name used in cypted */
 /*      mode.                                           */
 /*                                                     */
index c8aad3723e46d95157c9393eec8f32d42f54fa63..b0ffad5c1f51ecf74417d1e8e6e104ba65ce04bb 100644 (file)
@@ -97,6 +97,9 @@ extern _Bool soc_iscrypted(SOCPTR *socptr);
 //return the cipher mame used on the crypted link
 extern const char *soc_get_cipher_name(SOCPTR *socptr);
 
+//return all cipher information
+extern const char *soc_getcipherid(SOCPTR *socptr);
+
 //return line socket mode (cleartext, crypted)
 extern const char *soc_getstrmode(SOCPTR *socptr);
 
index b9a6d5df7452bd48ea357668952af0e035725fbe..010403d264f7bbd08718623e7abb2902371e87f3 100644 (file)
@@ -200,8 +200,8 @@ proceed=true;
 while (proceed==true) {
   switch (phase) {
     case 0      :       //Inserting the remote information
-      (void) fprintf(data,"Received: from %s ([%s])\n",
-                           contact->peername,contact->peerip);
+      (void) fprintf(data,"Received: from %s (IP=[%s], originator=<%s>)\n",
+                           contact->peername,contact->peerip,contact->mailfrom);
       break;
     case 1      :       //Inserting the Receive information
       (void) fprintf(data,"\tby %s ([%s:%s]/%s-%s) with ESMTP\n",
@@ -210,7 +210,7 @@ while (proceed==true) {
       break;
     case 2      :       //Inserting TLS information
       if (soc_iscrypted(contact->socptr)==true) {
-        (void) fprintf(data,"\t(JMPDBG crypted)\n");
+        (void) fprintf(data,"\t(%s)\n",soc_getcipherid(contact->socptr));
         }
       break;
     case 3      :       //Inserting ID information
@@ -732,7 +732,6 @@ while (proceed==true) {
     break;              //no need to go further
 
     }
-  (void) rou_alert(0,"%s JMPDBG got <%s>",OPEP,line);
   (void) log_fprintlog(contact->logptr,false,"%s",line);
   code=eml_getcode(line);
   switch (code) {
index f4d2e93f0949ea1ac2a325b5f8fa2503bf0e0afb..a2992df87a7b4e8c0c698ff92c5fdbbb5b1719d3 100644 (file)
@@ -422,7 +422,6 @@ while (proceed==true) {
       cipherid=(char *)calloc(1,MXID);
       (void) snprintf(cipherid,MXID,"version=%s cipher=%s bits=%d verify=%s",
                                      version,name,bits,verif);
-      (void) rou_alert(0,"%s cipherid=<%s>",OPEP,cipherid);
       break;
     default     :       //SAFE Guard
       proceed=false;