From: Kevin Wasserman Date: Wed, 25 Mar 2015 04:33:38 +0000 (-0400) Subject: strip leading and trailing whitespace from cacert on id card load X-Git-Tag: upstream/0.7.2~5 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=moonshot-ui.git;a=commitdiff_plain;h=d260dd08a0d245dd2e2c3c500393735982f38139 strip leading and trailing whitespace from cacert on id card load --- diff --git a/src/moonshot-keyring-store.vala b/src/moonshot-keyring-store.vala index f211bd2..ab1ff1e 100644 --- a/src/moonshot-keyring-store.vala +++ b/src/moonshot-keyring-store.vala @@ -111,7 +111,7 @@ public class KeyringStore : Object, IIdentityCardStore { } else if (attribute.name == "Rules-AlwaysConfirm") { rules_always_confirm_index = i; } else if (attribute.name == "CA-Cert") { - id_card.trust_anchor.ca_cert = value; + id_card.trust_anchor.ca_cert = value.strip(); } else if (attribute.name == "Server-Cert") { id_card.trust_anchor.server_cert = value; } else if (attribute.name == "Subject") { diff --git a/src/moonshot-local-flat-file-store.vala b/src/moonshot-local-flat-file-store.vala index 0946316..8e4db0a 100644 --- a/src/moonshot-local-flat-file-store.vala +++ b/src/moonshot-local-flat-file-store.vala @@ -111,7 +111,7 @@ public class LocalFlatFileStore : Object, IIdentityCardStore { } // Trust anchor - id_card.trust_anchor.ca_cert = key_file.get_string (identity, "CA-Cert"); + id_card.trust_anchor.ca_cert = key_file.get_string (identity, "CA-Cert").strip(); id_card.trust_anchor.subject = key_file.get_string (identity, "Subject"); id_card.trust_anchor.subject_alt = key_file.get_string (identity, "SubjectAlt"); id_card.trust_anchor.server_cert = key_file.get_string (identity, "ServerCert");