This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient.
commit b8736c17e5db270ba6ba000c00be94265c406ddc Author: Mihai Moldovan <io...@ionic.de> Date: Sat Sep 24 04:07:38 2016 +0200 src/onmainwindow.{cpp,h}: add new function check_key_type (). Takes a key type and checks for validity/if it's known. --- debian/changelog | 2 ++ src/onmainwindow.cpp | 27 +++++++++++++++++++++++++++ src/onmainwindow.h | 2 ++ 3 files changed, 31 insertions(+) diff --git a/debian/changelog b/debian/changelog index 2962e12..7daa786 100644 --- a/debian/changelog +++ b/debian/changelog @@ -406,6 +406,8 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium string in generateKey (). - src/onmainwindow.cpp: terminate sshd more correctly. First via terminate (), then wait up to 5 seconds, then via kill (). + - src/onmainwindow.{cpp,h}: add new function check_key_type (). Takes a + key type and checks for validity/if it's known. -- X2Go Release Manager <git-ad...@x2go.org> Mon, 19 Sep 2016 09:07:07 +0200 diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index d4c70a8..b6c580c 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10223,6 +10223,33 @@ void ONMainWindow::generateEtcFiles() x2goDebug<<etcDir +"/sshd_config created."; } +ONMainWindow::key_types ONMainWindow::check_key_type (ONMainWindow::key_types key_type) { + ONMainWindow::key_types ret = key_type; + + switch (key_type) { + case RSA_KEY_TYPE: + break; + case DSA_KEY_TYPE: + break; + case ECDSA_KEY_TYPE: + break; + case ED25519_KEY_TYPE: + break; + default: + ret = UNKNOWN_KEY_TYPE; + } + + if (UNKNOWN_KEY_TYPE == ret) { + QMessageBox::critical (this, tr ("SSH key type selection error"), + tr ("Unknown SSH key selected.") + + "\n" + + tr ("Terminating application.")); + close (); + } + + return (ret); +} + QString ONMainWindow::generateKey(ONMainWindow::key_types key_type, bool host_key) { ONMainWindow::key_types sanitized_key_type = UNKNOWN_KEY_TYPE; diff --git a/src/onmainwindow.h b/src/onmainwindow.h index d5f1659..9919fde 100644 --- a/src/onmainwindow.h +++ b/src/onmainwindow.h @@ -1217,6 +1217,8 @@ private: QString getXDisplay(); #endif + key_types check_key_type (key_types key_type); + ////////////////plugin stuff//////////////////// #ifdef CFGPLUGIN public slots: -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git _______________________________________________ x2go-commits mailing list x2go-commits@lists.x2go.org http://lists.x2go.org/listinfo/x2go-commits