[Development] client: Add dialog window to accept/save invalid X509
certificates. (Guillaume Destuynder)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4198 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/unix/vncviewer/CConn.cxx b/unix/vncviewer/CConn.cxx
index 1a75a11..8a64787 100644
--- a/unix/vncviewer/CConn.cxx
+++ b/unix/vncviewer/CConn.cxx
@@ -75,7 +75,10 @@
menuKeysym = XStringToKeysym(menuKeyStr.buf);
setShared(shared);
- CSecurity::upg = this; /* Security instance is created in CConnection costructor. */
+ CSecurity::upg = this; /* Security instance is created in CConnection constructor. */
+#ifdef HAVE_GNUTLS
+ CSecurityTLS::msg = this;
+#endif
CharArray encStr(preferredEncoding.getData());
int encNum = encodingNum(encStr.buf);
@@ -125,6 +128,15 @@
delete sock;
}
+bool CConn::showMsgBox(int flags, const char* title, const char* text)
+{
+ CharArray titleText(strlen(title) + 12);
+ sprintf(titleText.buf, "VNC Viewer: %s", title);
+
+ TXMsgBox msgBox(dpy,text,flags,titleText.buf);
+ return msgBox.show();
+}
+
// deleteWindow() is called when the user closes the desktop or menu windows.
void CConn::deleteWindow(TXWindow* w) {
@@ -232,7 +244,6 @@
*password = strDup(dlg.passwdEntry.getText());
}
-
// CConnection callback methods
// serverInit() is called when the serverInit message has been received. At