Title: [commits] (heikki) [11333] Bug 6275, IMAP and POP over SSL caused perpetual wrong host
Revision
11333
Author
heikki
Date
2006-08-04 15:55:20 -0700 (Fri, 04 Aug 2006)

Log Message

Bug 6275, IMAP and POP over SSL caused perpetual wrong host
error dialog because our error string comparison was not taking
into account that we customize the error string in Chandler and
no longer use the default provided by M2Crypto, r=grant.

Modified Paths

Diff

Modified: trunk/chandler/parcels/osaf/framework/certstore/ssl.py (11332 => 11333)

--- trunk/chandler/parcels/osaf/framework/certstore/ssl.py	2006-08-04 22:05:29 UTC (rev 11332)
+++ trunk/chandler/parcels/osaf/framework/certstore/ssl.py	2006-08-04 22:55:20 UTC (rev 11333)
@@ -52,6 +52,7 @@
 
 from application import schema, Utility
 from osaf.framework.certstore import constants, utils
+from osaf import messages
 
 __all__ = ['loadCertificatesToContext', 'SSLContextError', 'getContext',
            'connectSSL', 'connectTCP', 'unknown_issuer',
@@ -268,8 +269,9 @@
             e.pem = peerX509.as_pem()
     
             acceptedErrList = trusted_until_shutdown_invalid_site_certs.get(e.pem)
-            if acceptedErrList is not None and str(e) in acceptedErrList:
-                log.debug('Ignoring post connection error %s' %str(e))
+            err = messages.SSL_HOST_MISMATCH % {'expectedHost': e.expectedHost, 'actualHost': e.actualHost}
+            if acceptedErrList is not None and err in acceptedErrList:
+                log.debug('Ignoring post connection error %s' % err)
                 return 1
     
             raise e




_______________________________________________
Commits mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/commits

Reply via email to