mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-09 21:33:12 +02:00
Fix ecdh-curve X25519 missing when using the defaults.
In config.h we had a: #if OPENSSL_VERSION_NUMBER >= 0x10100000L #define UNREALIRCD_DEFAULT_ECDH_CURVES "X25519:secp521r1:secp384r1:prime256v1" #else #define UNREALIRCD_DEFAULT_ECDH_CURVES "secp521r1:secp384r1:prime256v1" #endif ...which is fine in theory, but openssl headers are not included at that point, so OPENSSL_VERSION_NUMBER was not defined. From now on, we have: #define UNREALIRCD_DEFAULT_ECDH_CURVES_PRIMARY "X25519:secp521r1:secp384r1:prime256v1" #define UNREALIRCD_DEFAULT_ECDH_CURVES_SECONDARY "secp521r1:secp384r1:prime256v1" ...and we try them in that order. If both fail, we exit with an error (like before). This because X25519 is not available in OpenSSL before 1.1.0 (so really old) and may also not be available when running in FIPS mode.
This commit is contained in:
@@ -1792,9 +1792,6 @@ void config_setdefaultsettings(Configuration *i)
|
||||
safe_strdup(i->tls_options->ciphers, UNREALIRCD_DEFAULT_CIPHERS);
|
||||
safe_strdup(i->tls_options->ciphersuites, UNREALIRCD_DEFAULT_CIPHERSUITES);
|
||||
i->tls_options->protocols = TLS_PROTOCOL_TLSV1_2|TLS_PROTOCOL_TLSV1_3; /* TLSv1.2 & TLSv1.3 */
|
||||
#ifdef HAS_SSL_CTX_SET1_CURVES_LIST
|
||||
safe_strdup(i->tls_options->ecdh_curves, UNREALIRCD_DEFAULT_ECDH_CURVES);
|
||||
#endif
|
||||
safe_strdup(i->tls_options->outdated_protocols, "TLSv1,TLSv1.1");
|
||||
/* the following may look strange but "AES*" matches all
|
||||
* AES ciphersuites that do not have Forward Secrecy.
|
||||
|
||||
Reference in New Issue
Block a user