[vte] terminal: Warn on terminal if compiled without GNUTLS



commit a81a797b0cc75b1801fcda11f5d844962d4a0f6c
Author: Christian Persch <chpe gnome org>
Date:   Mon May 16 10:25:30 2016 +0200

    terminal: Warn on terminal if compiled without GNUTLS

 src/vte.cc |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index 14a9f7e..dcf2df1 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -8148,6 +8148,16 @@ VteTerminalPrivate::VteTerminalPrivate(VteTerminal *t) :
 
         m_padding = default_padding;
         update_view_extents();
+
+#ifndef WITH_GNUTLS
+{
+        char buf[1024];
+        auto len = g_snprintf(buf, sizeof(buf), "\e[1m\e[31m%s:\e[39m %s\e[0m\n",
+                              _("WARNING"),
+                              _("GNUTLS not enabled; data will be written to disk unencrypted!"));
+        feed(buf, len);
+ }
+#endif
 }
 
 void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]