From 09d8e470d52628bfee00459ae3c906de8f629ed2 Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Wed, 11 Jun 2025 08:38:59 -0400 Subject: [PATCH] Crash about closetls fixed --- Makefile | 2 +- conf/mailleur.conf.dvl | 3 ++- lib/devsoc.c | 5 ++++- lib/subrou.c | 3 ++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index c00687c..e3cead7 100644 --- a/Makefile +++ b/Makefile @@ -210,7 +210,7 @@ go465 : -crlf \ --showcerts \ -key certs/localhost-key.pem \ - -cert certs/localhost-cert.pem \ + -cert_chain certs/localhost-chain-cert.pem \ -CAfile certs/root-safe_CA.pem \ -tls1_2 \ -connect $(TESTIP):1065 diff --git a/conf/mailleur.conf.dvl b/conf/mailleur.conf.dvl index 3e65d8e..9e7af63 100644 --- a/conf/mailleur.conf.dvl +++ b/conf/mailleur.conf.dvl @@ -11,7 +11,8 @@ #:: -> smtp:0.0.0.0:25:2 #SMTPPORTS " "::" #SMTPPORTS = ":127.127.10.25:1025:,smtps:127.127.10.25:1026:1" -SMTPPORTS = ":127.127.10.25:1025:" +#SMTPPORTS = ":127.127.10.25:1025:" +SMTPPORTS = "smtps:127.127.10.25:1065:1" #------------------------------------------------ #Defining SERVER mode Certificate data CA_ROOT_SRV = "./certs/root-safe_CA.pem" diff --git a/lib/devsoc.c b/lib/devsoc.c index 47ee946..a3ba5e5 100644 --- a/lib/devsoc.c +++ b/lib/devsoc.c @@ -1435,7 +1435,10 @@ while (proceed==true) { } break; case pro_smtps : //set secure socket - soc->tls=tls_closetls(soc->tls); + if (soc->modtls==true) { + soc->tls=tls_closetls(soc->tls); + soc->modtls=false; + } break; default : (void) rou_alert(0,"%s Protocol '%d' unset (Bug?)", diff --git a/lib/subrou.c b/lib/subrou.c index cb5777f..78d86b4 100644 --- a/lib/subrou.c +++ b/lib/subrou.c @@ -613,8 +613,9 @@ while (proceed==true) { } (void) sleep(COREDELAY); /*to avoid crash avalanche */ va_end(args); -if (doabort==true) +if (doabort==true) { (void) abort(); /*doing to do the abort */ + } (void) rou_alert(0,"Unable to dump core memory"); (void) exit(-1); //Theoriticaly unreachabe if //abort was allowed -- 2.47.3