[Xfce4-commits] <postler:master> Add a 'certificate' field to specify a server certificate
Christian Dywan
noreply at xfce.org
Mon Jun 14 23:50:03 CEST 2010
Updating branch refs/heads/master
to a32f0bc93080570a6b8b7132c3455cc816849fb6 (commit)
from 3934f0ebb5bb655ee5ff579faa415ec768d2ebc7 (commit)
commit a32f0bc93080570a6b8b7132c3455cc816849fb6
Author: Christian Dywan <christian at twotoasts.de>
Date: Sun Jun 13 23:44:10 2010 +0200
Add a 'certificate' field to specify a server certificate
postler/postler-accounts.vala | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/postler/postler-accounts.vala b/postler/postler-accounts.vala
index 9335017..2bee8a2 100644
--- a/postler/postler-accounts.vala
+++ b/postler/postler-accounts.vala
@@ -26,6 +26,7 @@ namespace Postler {
public string username;
public string password;
public string path;
+ public string certificate;
public string sync;
}
}
@@ -111,6 +112,8 @@ public class Postler.Accounts : GLib.Object {
info.password = keyfile.get_string (group, "password");
if (keyfile.has_key (group, "receive"))
info.receive = keyfile.get_string (group, "receive");
+ if (keyfile.has_key (group, "certificate"))
+ info.certificate = keyfile.get_string (group, "certificate");
if (keyfile.has_key (group, "sync"))
info.sync = keyfile.get_string (group, "sync");
}
@@ -187,6 +190,9 @@ public class Postler.Accounts : GLib.Object {
throw new GLib.FileError.FAILED (_("Username is missing"));
if (info.password == null)
throw new GLib.FileError.FAILED (_("Password is missing"));
+ string certificate = info.certificate;
+ if (certificate != null && !Path.is_absolute (certificate))
+ certificate = info.path + "/" + certificate;
switch (info.type) {
case AccountType.IMAP:
@@ -201,6 +207,7 @@ public class Postler.Accounts : GLib.Object {
Pass %s
UseIMAPS yes
CertificateFile %s
+ %s %s
MaildirStore local
Path %s/
@@ -216,6 +223,8 @@ public class Postler.Accounts : GLib.Object {
info.username,
info.password,
certificate_file,
+ certificate != null ? "CertificateFile" : "",
+ certificate != null ? certificate : "",
info.path,
info.path
);
More information about the Xfce4-commits
mailing list