Fixed the handling of TLS/SSL sockets, again.

Monotone-Parent: 09f0f8877795f3a345aa7c98083aa8c1a62ad06f
Monotone-Revision: 3041774927e7490f413c502580f789b26a0e693d

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2010-09-03T12:21:48
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Ludovic Marcotte
2010-09-03 12:21:48 +00:00
parent 716d156847
commit 8328374042
2 changed files with 12 additions and 6 deletions
+3 -2
View File
@@ -531,14 +531,15 @@
url = [NSURL URLWithString: imapServer];
scheme = [url scheme];
port = [url port];
port = ([url port] ? [url port] : @"143");
encryption = @"none";
if ([url query] && [[url query] caseInsensitiveCompare: @"tls=YES"] == NSOrderedSame)
encryption = @"tls";
if ([scheme caseInsensitiveCompare: @"imaps"] == NSOrderedSame &&
if (scheme &&
[scheme caseInsensitiveCompare: @"imaps"] == NSOrderedSame &&
![encryption isEqualToString: @"tls"])
{
encryption = @"ssl";