Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikkel Krautz <mikkel@krautz.dk>2017-08-06 23:13:01 +0300
committerMikkel Krautz <mikkel@krautz.dk>2017-08-06 23:13:01 +0300
commit7d83448d09fd8090139cc3a398cc39b18ca7bf0b (patch)
tree2287fbce865d74ba35947a7c11fa19e6834e9b21 /src/FFDHE.cpp
parent1178f64509cc66cd2f1c305a3d25168ed938fe12 (diff)
FFDHE: add NamedGroups method for getting a list of supported named groups.
Also updates TestFFDHE to exercise the new method (and, in doing so, refactors the tests a bit). The core check logic from exercise() is moved into a tryFFDHELookupByName function, which is now used by both the exercise() test, as well as the namedGroupsMethod() test that is added by this commit.
Diffstat (limited to 'src/FFDHE.cpp')
-rw-r--r--src/FFDHE.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/FFDHE.cpp b/src/FFDHE.cpp
index 15f91b13c..eeb726cfc 100644
--- a/src/FFDHE.cpp
+++ b/src/FFDHE.cpp
@@ -8,6 +8,16 @@
#include "FFDHE.h"
#include "FFDHETable.h"
+QStringList FFDHE::NamedGroups() {
+ QStringList ng;
+ ng << QLatin1String("ffdhe2048");
+ ng << QLatin1String("ffdhe3072");
+ ng << QLatin1String("ffdhe4096");
+ ng << QLatin1String("ffdhe6144");
+ ng << QLatin1String("ffdhe8192");
+ return ng;
+}
+
QByteArray FFDHE::PEMForNamedGroup(QString name) {
name = name.toLower();