CERT_NONE + gmail = no certificate received?
Anonymous
swell.k at gmail.com
Mon Jan 17 14:03:13 GMT 2011
Anonymous <swell.k at gmail.com> writes:
[...]
> - if not cert:
> + if not cert and not type(cert) is dict:
> return ('no certificate received')
> + else:
> + return
> dnsname = hostname.lower()
> for s in cert.get('subject', []):
> key, value = s[0]
Oops, it makes below code unreachable.
%%
diff --git a/offlineimap/imaplibutil.py b/offlineimap/imaplibutil.py
index ba6a5bb..71cefec 100644
--- a/offlineimap/imaplibutil.py
+++ b/offlineimap/imaplibutil.py
@@ -153,7 +153,10 @@ class WrappedIMAP4_SSL(IMAP4_SSL):
Returns error message if any problems are found and None on success.
'''
if not cert:
- return ('no certificate received')
+ if type(cert) is dict:
+ return
+ else:
+ return ('no certificate received')
dnsname = hostname.lower()
for s in cert.get('subject', []):
key, value = s[0]
%%
More information about the OfflineIMAP-project
mailing list