[X2Go-Commits] [x2goclient] 219/267: 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 ().
git-admin at x2go.org
git-admin at x2go.org
Sat Dec 10 13:36:16 CET 2016
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch bugfix/osx
in repository x2goclient.
commit 524291671f17f04818281bce804fd8f014a0f7b6
Author: Mihai Moldovan <ionic at 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 5934565..ac76cfc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -382,6 +382,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 dc2036c..1f4ff6f 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -10322,26 +10322,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) {
@@ -10368,6 +10375,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
More information about the x2go-commits
mailing list