Meta: improve error message when sslDHParams contains unknown named group.

This commit uses the new FFDHE::NamedGroups() method to improve the error
message Murmur shows when sslDHParams is set to an unknown "bundled"
group, i.e. a name that starts with @, such as @ffdhe2048.
This commit is contained in:
Mikkel Krautz 2017-08-06 22:20:43 +02:00
parent 7d83448d09
commit 7b4535cecf

View File

@ -524,7 +524,13 @@ bool MetaParams::loadSSLSettings() {
QString group = qsSSLDHParams.mid(1).trimmed();
QByteArray pem = FFDHE::PEMForNamedGroup(group);
if (pem.isEmpty()) {
qCritical("MetaParms: Diffie-Hellman parameters with name '%s' is not available in Murmur.", qPrintable(qsSSLDHParams));
QStringList names = FFDHE::NamedGroups();
QStringList atNames;
foreach (QString name, names) {
atNames << QLatin1String("@") + name;
}
QString supported = atNames.join(QLatin1String(", "));
qCritical("MetaParms: Diffie-Hellman parameters with name '%s' is not available. (Supported: %s)", qPrintable(qsSSLDHParams), qPrintable(supported));
}
dhparams = pem;
} else {