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-03-04 21:07:24 +0300
committerMikkel Krautz <mikkel@krautz.dk>2017-03-04 21:07:24 +0300
commit7925c375c209f928116003ee59f8e45c61707046 (patch)
tree07767c0dbd5484dbc4998b2610b22e211971c9f2 /src/murmur/Cert.cpp
parent09d4bd33fbdff8c2b33ff35303f3a424a99e2d44 (diff)
Cert: reset Server's SSL state in initializeCert().
This changes Server::initializeCert() to always reset the Server's SSL state before reloading it. Previously, we didn't reset the state. Not doing so *does* actually works for the case where we load the certificate and key from the per-vserver configuration in ServerDB. However, it doesn't work when reading from Meta, because the old Server::initializeCert() would only use the settings from Meta if qscCert/qskKey were null.
Diffstat (limited to 'src/murmur/Cert.cpp')
-rw-r--r--src/murmur/Cert.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/murmur/Cert.cpp b/src/murmur/Cert.cpp
index aaf02fec4..43981ea42 100644
--- a/src/murmur/Cert.cpp
+++ b/src/murmur/Cert.cpp
@@ -85,6 +85,15 @@ QSslKey Server::privateKeyFromPEM(const QByteArray &buf, const QByteArray &pass)
void Server::initializeCert() {
QByteArray crt, key, pass, dhparams;
+ // Clear all exising SSL settings
+ // for this server.
+ qscCert.clear();
+ qlIntermediates.clear();
+ qskKey.clear();
+#if defined(USE_QSSLDIFFIEHELLMANPARAMETERS)
+ qsdhpDHParams = QSslDiffieHellmanParameters();
+#endif
+
crt = getConf("certificate", QString()).toByteArray();
key = getConf("key", QString()).toByteArray();
pass = getConf("passphrase", QByteArray()).toByteArray();