Disabling Vala code that does not compile in Centos 6.9
[moonshot-ui.git] / src / moonshot-id.vala
index 3a0f960..82ce1ac 100644 (file)
@@ -66,6 +66,12 @@ public class TrustAnchor : Object
 
         // If we're reading from store, this will be overridden (see set_datetime_added)
         _datetime_added = "";
+
+        // Work around a Portal bug that littered some credential files with this cruft.
+        string cruft = 
+"""<!-- Remove the begin and end lines from the PEM output of
+openssl to produce this format.  Alternatively, base64 encode a DER format certificate -->""";
+        _ca_cert = _ca_cert.replace(cruft, "");
     }
 
     public TrustAnchor.empty() {
@@ -117,9 +123,10 @@ public class TrustAnchor : Object
     }
 
     internal static string format_datetime_now() {
-        DateTime now = new DateTime.now_utc();
-        string dt = now.format("%b %d %T %Y %Z");
-        return dt;
+         // DateTime now = new DateTime.now_utc();
+        //         string dt = now.format("%b %d %T %Y %Z");
+        //        return dt;
+        return "Sorry; formatted date/time strings not available on Centos 6";
     }
 
     internal void update_server_fingerprint(string fingerprint) {
@@ -169,7 +176,7 @@ public class TrustAnchor : Object
         cert.chomp();
 
         uchar[] binary = Base64.decode(cert);
-        IdCard.logger.trace("get_expiration_date: encoded length=%d; decoded length=%d".printf(cert.length, binary.length));
+        IdCard.logger.trace("get_expiration_date: encoded length=%ld; decoded length=%d".printf(cert.length, binary.length));
 
         char buf[64];
         string err = (string) get_cert_valid_before(binary, binary.length, buf, 64);
@@ -400,6 +407,7 @@ public class IdCard : Object
     { 
         IdCard card = new IdCard();
         card.display_name = NO_IDENTITY;
+       card._nai = "";
         return card;
     }