This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch bugfix/osx
in repository x2goclient.

commit 1f6fcbea44618b7d33fabb48181517130a2f7606
Author: Mihai Moldovan <io...@ionic.de>
Date:   Thu Sep 22 04:08:45 2016 +0200

    src/onmainwindow.cpp: add support for explicitly setting the private key 
bit size based on type and use values (currently) regarded as secure to 
generateHostKey ().
---
 debian/changelog     |    3 +++
 src/onmainwindow.cpp |    9 +++++++++
 2 files changed, 12 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 7045b58..efdcdce 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -378,6 +378,9 @@ x2goclient (4.0.5.3-0x2go1) UNRELEASED; urgency=medium
     - src/{unixhelper.cpp,x2goclient.cpp}: fix errno usage - save before use.
     - src/onmainwindow.cpp: document createRSAKey () because what it does is
       completely non-obvious.
+    - src/onmainwindow.cpp: add support for explicitly setting the private key
+      bit size based on type and use values (currently) regarded as secure to
+      generateHostKey ().
 
   [ Bernard Cafarelli ]
   * New upstream version (4.0.5.3):
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index 07c8b18..0509dd2 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -10320,26 +10320,33 @@ void 
ONMainWindow::generateHostKey(ONMainWindow::key_types key_type)
 {
     ONMainWindow::key_types sanitized_key_type = UNKNOWN_KEY_TYPE;
     QString stringified_key_type = "";
+    std::size_t key_bits = 0;
     switch (key_type) {
         case RSA_KEY_TYPE:
                                sanitized_key_type = key_type;
                                stringified_key_type = "rsa";
+                               key_bits = 4096;
                                break;
         case DSA_KEY_TYPE:
                                sanitized_key_type = key_type;
                                stringified_key_type = "dsa";
+                               key_bits = 1024;
                                break;
         case ECDSA_KEY_TYPE:
                                sanitized_key_type = key_type;
                                stringified_key_type = "ecdsa";
+                               key_bits = 384;
                                break;
         case ED25519_KEY_TYPE:
                                sanitized_key_type = key_type;
                                stringified_key_type = "ed25519";
+                               /* Fixed key length, flag will be unused. */
+                               key_bits = 0;
                                break;
         default:
                                sanitized_key_type = UNKNOWN_KEY_TYPE;
                                stringified_key_type = "unknown";
+                               key_bits = 0;
     }
 
     if (sanitized_key_type == UNKNOWN_KEY_TYPE) {
@@ -10366,6 +10373,8 @@ void 
ONMainWindow::generateHostKey(ONMainWindow::key_types key_type)
         QStringList args;
         args << "-t"
              << stringified_key_type
+             << "-b"
+             << QString::number (key_bits)
              << "-N"
              << ""
              << "-C"

--
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

Reply via email to