Message8046
Hi Andrew:
Your patch to mailer.py includes a call to load_cert_chain(). Should that be
sslctx.load_cert_chain()?
If so can you try this patch:
====
diff -r 6763813d9d34 roundup/mailer.py
--- a/roundup/mailer.py Tue May 14 21:27:28 2024 -0400
+++ b/roundup/mailer.py Tue May 14 21:42:08 2024 -0400
@@ -6,6 +6,7 @@
import os
import smtplib
import socket
+import ssl
import sys
import time
import traceback
@@ -312,8 +313,15 @@
# start the TLS if requested
if config["MAIL_TLS"]:
self.ehlo()
- self.starttls(config["MAIL_TLS_KEYFILE"],
- config["MAIL_TLS_CERTFILE"])
+ if sys.version_info[0:2] >= (3, 12):
+ sslctx = ssl.SSLContext()
+ if config["MAIL_TLS_CERTFILE"]:
+ sslctx.load_cert_chain(config["MAIL_TLS_CERTFILE"],
+ keyfile=config["MAIL_TLS_KEYFILE"])
+ self.starttls(context=sslctx)
+ else:
+ self.starttls(config["MAIL_TLS_KEYFILE"],
+ config["MAIL_TLS_CERTFILE"])
# ok, now do we also need to log in?
mailuser = config["MAIL_USERNAME"]
====
if I have the origin for load_cert_chain wrong, can you supply an updated
patch with the definition.
Thanks.
-- rouilj |
|
Date |
User |
Action |
Args |
2024-05-15 01:44:11 | rouilj | set | messageid: <1715737451.15.0.513632022667.issue2551350@roundup.psfhosted.org> |
2024-05-15 01:44:11 | rouilj | set | recipients:
+ rouilj, kragacles |
2024-05-15 01:44:11 | rouilj | link | issue2551350 messages |
2024-05-15 01:44:11 | rouilj | create | |
|