Age | Commit message (Collapse) | Author |
|
|
|
For reference: https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5
|
|
This commit adds all the missing includes when the PCH header is not used.
Also, some includes are reordered and/or made consistent (e.g. "#include <QtEndian>" -> "#include <QtCore/QtEndian>").
|
|
According to Qt's documentation the PCH header doesn't need to be included.
From https://doc.qt.io/qt-5/qmake-precompiledheaders.html:
"To make your project use precompiled headers, you only need to define the PRECOMPILED_HEADER variable in your project file."
"qmake will handle the rest, to ensure the creation and use of the precompiled header file. You do not need to include the precompiled header file in HEADERS, as qmake will do this if the configuration supports precompiled headers."
|
|
|
|
|
|
Remove automatic generation of Diffie-Hellman parameters for vservers.
There were various problems with this approach.
- It was somewhat slow.
- To avoid blocking the main thread while generating the DH parameters,
the code would enter an event loop. However, this meant that other code
could still execute (for example, clients could connect to the server
before the DH params were generated).
As a replacement, we're going to be shipping the Diffie-Hellman parameters
from RFC 7919 bundled into Murmur, and we'll default to one of them.
|
|
This moves the refactored certificate generation code from
src/murmur/Cert.cpp into its own file, src/SelfSignedCertificate.cpp.
Furthermore, the code is refactored to also be able to fulfil the duties
of Mumble's code for generating self-signed certificates.
The old code in both Mumble and Murmur is updated to call the new
SelfSignedCertificate methods for generating client and server
certificates.
This fixes the ability to build Mumble with OpenSSL 1.1.
(Previously, only Murmur could be built.)
|
|
I mistakenly checked OPENSSL_VERSION (which doesn't exist), instead of
OPENSSL_VERSION_NUMBER, making the check fail.
|
|
explicit version in self-signed cert check.
This commit changes our check for whether a server is using a self-signed
certificate to check for the prefix 'Murmur Autogenerated Certificate'.
Previously, we would only check for 'Murmur Autogenerated Certificate v2'.
(The previous version, 'Murmur Autogenerated Certificate' is no longer valid,
so is not considered in this context.)
This will allow us to bump the version in the certificate, without needing
to update our code to know about these bumps.
|
|
This replaces selfSignedServerCert_SHA1_RSA_2048()'s use of
the old, deprecated RSA_generate_key() function with
RSA_generate_key_ex().
The new function is a bit more explicit, so the code is a little
longer.
The RSA factor RSA_F4 is replaced with an explicit BIGNUM of 65537.
RSA_F4 is the flag to use for 65537 when using the old RSA_generate_key()
function.
|
|
The add_ext function, like selfSignedServerCert_SHA1_RSA_2048(),
needed an overhaul with regards to error handling.
This commit implements that.
|
|
This adds much needed error handling to the
selfSignedServerCert_SHA1_RSA_2048() function.
This covers thorough checking of return values for calls
into OpenSSL API, as well as strict null checking on values
that one would expect to be non-null.
Better safe than sorry.
|
|
The control flow is going to change in this function once we add
error handling.
Prepare for that by declaring all variables at the beginning of
the function.
|
|
This commit ensures that we assign a null-valued QSslCertificate and
QSslKey on failure.
|
|
This moves the code that generates Murmur's self-signed certificate into its own
function, selfSignedServerCert_SHA1_RSA_2048.
This is done in preperation of refactoring the code to use non-deprecated OpenSSL
functionality.
|
|
These functions are only used when the QSslDiffieHellmanParameters
class is available.
This commit moves the functions into an #if
defined(USE_QSSLDIFFIEHELLMANPARAMETERS) block.
|
|
This commit gets rid of manually allocated BN_GENCB structs
in favour of objects returned from BN_GENCB_new().
Why do this? OpenSSL structs are now considered opaque. Therefore, it is
not wise for us to allocate them based on their size in the current
OpenSSL header, since its size can change in the future.
Instead, we let OpenSSL allocate the object for us using the
BN_GENCB_new() method (and corresponding BN_GENCB_free() method for
freeing the allocated object).
These functions are only available in OpenSSL 1.1. To remedy this, this
commit implements mumble_BN_GENCB_new() and mumble_BN_GENCB_free().
On OpenSSL >= 1.1, these functions use OpenSSL's own new and free
functions. On prior versions, we allocate using malloc/free.
|
|
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.
|
|
It was not implemented until Qt 5.5:
https://github.com/qt/qtbase/commit/962ea5690cb9351822c30da534ecae7aeeba667d
No trace in the Qt docs.
|
|
This flag is necessary for hot certificate reload.
We need to know which servers are using the Meta certificate/key,
since we will only be able to live-reload SSL settings via SIGUSR1
for those servers. Servers that use their own SSL certificate/key
can't be reloaded via the SIGUSR1 mechanism.
This is because servers that use their own SSL certificate/key store
them in the database. Thus, it is only possible to update those via
RPC using the updateCertificate() method.
|
|
its intermediates.
|
|
The list doesn't actually contain CA certificates, but intermediates.
So let us name it appropriately.
|
|
|
|
This adds a new method, Server::privateKeyFromPEM(), a helper
method for loading private keys.
In various places throughout the codebase, we use the same
sequence of operations for loading private keys from a PEM
bytestream.
This method moves that sequence to a single method, to avoid
the unnecessary duplication that is currently going on.
|
|
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
|
|
|
|
|
|
|
|
|
|
|
|
Changed DH_generate_parameterss_ex to DH_generate_parameters_ex
|
|
Tried to pass a QString as an argument to a variadic C-Style
function (qFatal) which would have crashed and burned at
runtime.
|
|
Fixes remaining unused function, shadow and cast warnings
in murmur code.
|
|
parmeters.
This change allows server admins to specify Diffie-Hellman
parameters for Murmur to use. This is done using the sslDHParams
option in the config file. Diffie-Hellman parameters can also be
set on a per-server basis using the sslDHParams option.
Note: the functionality implemented in this change requires the
QSslDiffieHellmanParameters class in Qt, which has not yet landed
upstream in the Qt 5 'dev' branch. This means that the functionality
discussed in this change will, for now, only work in binaries provided
by the Mumble project, or binaries that are built using our build
environments, and not binaries that link against any released versions
of Qt at present.
This change modifies the default TLS cipher suite string to add
EDH+aRSA+AESGCM, DHE-RSA-AES256-SHA and DHE-RSA-AES128-SHA.
This yields the following ciphers, in TLS/RFC notation:
TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
TLS_DHE_RSA_WITH_AES_256_CBC_SHA
TLS_DHE_RSA_WITH_AES_128_CBC_SHA
This change also allows Murmur servers to provide forward secrecy
to older clients, such as our own pre-built binaries before 1.2.9.
It also provides forward secrecy for users that use Mumble 1.2.x
versions on Linux distros, and other Unix-like systems. This is
because Mumble 1.2.x on Unix-like systems builds against Qt 4, which
limits the connection to TLS 1.0.
Before this change, Murmur was not able to negotiate an ephemeral
Diffie-Hellman key exchange for those clients. This is now possible.
|
|
Qt4's moc is not able to expand QT_VERSION_CHECK which may lead
to invalid codegen when used for backwards compatibility work.
Replaced all occurances with explicit check against numeric
version which are treated correctly. Even though bad interactions
might be rare we should no longer use this macro as long as we
want to compile with Qt 4. Also see:
http://lists.qt-project.org/pipermail/interest/2013-August/008351.html
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and bind address matches
|
|
|
|
|