[PATCH 3/2] Disable certificate verification if there is no certificate
Sebastian Spaeth
Sebastian at SSpaeth.de
Tue Aug 16 09:48:37 BST 2011
imaplib2 always attempts to verify a certificate if a verification
callback function is passed in, even the certificate is None
specified. Disable the verification excplictly by setting the
verification function to None in that case.
Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
---
offlineimap/imapserver.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/offlineimap/imapserver.py b/offlineimap/imapserver.py
index 1485b0a..879616f 100644
--- a/offlineimap/imapserver.py
+++ b/offlineimap/imapserver.py
@@ -67,6 +67,8 @@ class IMAPServer:
self.sslclientcert = repos.getsslclientcert()
self.sslclientkey = repos.getsslclientkey()
self.sslcacertfile = repos.getsslcacertfile()
+ if self.sslcacertfile is None:
+ self.verifycert = None # disable cert verification
self.delim = None
self.root = None
self.maxconnections = repos.getmaxconnections()
--
1.7.4.1
More information about the OfflineIMAP-project
mailing list