summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Kolab/FreeBusy/Source.php3
-rw-r--r--lib/Kolab/FreeBusy/SourceIMAP.php10
2 files changed, 11 insertions, 2 deletions
diff --git a/lib/Kolab/FreeBusy/Source.php b/lib/Kolab/FreeBusy/Source.php
index 92a673a..5b0213f 100644
--- a/lib/Kolab/FreeBusy/Source.php
+++ b/lib/Kolab/FreeBusy/Source.php
@@ -43,6 +43,7 @@ abstract class Source
$config['url'] = $url;
switch ($config['scheme']) {
case 'file': return new SourceFile($config + $conf);
+ case 'tls':
case 'imap':
case 'imaps': return new SourceIMAP($config + $conf);
case 'http':
@@ -119,4 +120,4 @@ abstract class Source
{
return $this->cached;
}
-} \ No newline at end of file
+}
diff --git a/lib/Kolab/FreeBusy/SourceIMAP.php b/lib/Kolab/FreeBusy/SourceIMAP.php
index 6536a4b..6f116b7 100644
--- a/lib/Kolab/FreeBusy/SourceIMAP.php
+++ b/lib/Kolab/FreeBusy/SourceIMAP.php
@@ -292,7 +292,15 @@ class SourceIMAP extends Source
$imap = $rcube->get_storage();
$host = $config['host'];
$port = $config['port'] ?: ($config['scheme'] == 'imaps' ? 993 : 143);
- $ssl = $config['scheme'] == 'imaps' || $port == 993;
+
+ // detect ssl|tls method
+ if ($config['scheme'] == 'imaps' || $port == 993) {
+ $ssl = 'imaps';
+ } elseif ($config['scheme'] == 'tls') {
+ $ssl = 'tls';
+ } else {
+ $ssl = false;
+ }
// enable proxy authentication
if (!empty($config['proxy_auth'])) {