Commit Graph

18 Commits

Author SHA1 Message Date
Robert Adam
249d2c6298 MAINT: Update copyright headers to 2023 2023-01-08 15:54:35 +01:00
Robert Adam
d100ff1467 MAINT: Update copyright to 2022 2022-01-04 20:17:33 +01:00
Terry Geng
f4cea62ed9 BUILD(crypto): Migrate to OpenSSL 3.0-compatible API
OpenSSL 3.0 deprecated several low-level APIs and the usage of them
caused errors/warnings that prevent the binary from being built against
OpenSSL 3.0.
Some primitive efforts have been made in #5317 but were incomplete.
This commit follows https://www.openssl.org/docs/man3.0/man7/migration_guide.html,
https://code.woboq.org/qt6/qtopcua/src/opcua/x509/qopcuakeypair_openssl.cpp.html,
and clears all errors/warnings related to the usage of deprecated APIs.

Fixes #5277
Fixes #4266
2021-12-06 19:47:00 -05:00
Robert Adam
dd50b01ff3 FIX(client): Use Utf8 for name field in certificat
Otherwise names using non-ASCII characters won't be handled properly.

Fixes #4871

Co-Authored-By: Davide Beatrici <git@davidebeatrici.dev>
2021-03-17 20:46:30 +01:00
Robert Adam
dda161138b REFAC: Make sure all macros are #undef'd again
If they are not there is the potential of name clashes when performing a
unity build.

See: https://stackoverflow.com/questions/847974/the-benefits-disadvantages-of-unity-builds
2021-03-06 18:57:22 +01:00
Robert Adam
59ae429972 MAINT: Update copyright notice to 2021
This was done by running scripts/updateLicenseHeaders.py and then
manually editing the LICENSE file.
2021-03-02 10:15:01 +01:00
Robert
af7dac72f4 FORMAT: Run clang-format 10 on all C/CXX source-files 2020-09-11 18:29:33 +02:00
Popkornium18
f966b3ef37 REFAC(shared): replace NULL with nullptr
This changes all occurances of NULL in the src source
dir to nullptr. Additionally explicit comparisons with NULL were
removed.
2020-07-02 12:19:16 +02:00
Davide Beatrici
4e67a2fafb Auto-update LICENSE.header in source files 2020-01-07 03:09:22 +01:00
Davide Beatrici
15831dbca8 Add missing includes for "no-pch" build
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>").
2019-09-12 22:08:39 +02:00
Davide Beatrici
5a07244a44 Don't include PCH headers directly
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."
2019-09-12 00:13:35 +02:00
Davide Beatrici
b427333257 Auto-update LICENSE.header in source files 2019-01-25 04:56:19 +01:00
Mikkel Krautz
519d04bb3a SelfSignedCertificate: only add email SAN to client certs if the passed-in email is non-empty.
This commit ensures that we only add the email subject alt name (SAN) if the passed-in
email is non-empty.

It turns out that the call to X509V3_EXT_conf_nid() in add_ext() will fail
if the SAN value is formatted incorrectly. In our case, we passed "email:"
as the value, and X509V3_EXT_conf_nid() would return NULL.

To fix this, we now check whether the email we've been given is empty or not.
If it's empty, we don't add the SAN. If it's there, we do.
2018-01-27 13:05:47 +01:00
Mikkel Krautz
7dd6ec6d26 SelfSignedCertificate: add missing 'goto out's.
In these two places, we forgot to call invoke 'goto out'
to return early, after setting ok to false.
2018-01-27 13:04:08 +01:00
davidebeatrici
d47f2e342c SelfSignedCertificate: Fix automatic certificate generator, by specifying the certificate type with an enum
Previously, the generator was choosing the certificate type (server or client) basing on the presence of the name and email, which is not ideal.

Fixes #3284.
2018-01-25 00:55:31 +01:00
Mikkel Krautz
f6ba3a52bf Auto-update LICENSE.header in source files. 2018-01-01 23:05:37 +01:00
Mikkel Krautz
b5c17b8524 SelfSignedCertificate: add missing newline to SelfSignedCertificate.cpp.
Apparently, the GCC used on the CentOS 5/Ermine builder treats this as
a fatal error when warnings-as-errors is turned on.

Oddly enough, none of the others do.
2017-07-15 12:32:58 +02:00
Mikkel Krautz
a69668aed1 SelfSignedCertificate: new class for creation of self-signed certificates.
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.)
2017-07-14 10:58:17 +02:00