This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient.
commit 49bffc77ec1f080d310a22dd3a44678f310c2a9d 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 b84ae08..1f6839b 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. [ Bernard Cafarelli ] * New upstream version (4.0.5.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 653db50..36abf7e 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -10246,6 +10246,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 eb8cb1c..476d4a9 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