Skip to content

Conversation

@SpecLad
Copy link
Contributor

@SpecLad SpecLad commented Jun 12, 2025

The new baseline is OpenSSL 1.1.1 or LibreSSL 2.8.0. I chose the former because it's the version available in Rocky Linux 8 (and presumably RHEL 8), which is still under support. The latter is just because it's been released around the same time.

By doing this, we can drop every preprocessor conditional that depends on OPENSSL_VERSION_NUMBER and almost every one that depends on LIBRESSL_VERSION_NUMBER.

In addition, we can now make the following simplifications:

  • Drop support for SSLv2, since neither library supports it anymore. For backwards compatibility, the protocol name is still allowed in the config, but does nothing.

  • Remove the setting of the SSL_OP_SINGLE_{EC,}DH_USE options, since they're now permanently enabled in both libraries.

  • Remove the OPENSSL_init_ssl call, which is now unnecessary.

  • Remove the manual seeding code, since both libraries now handle seeding automatically. In LibreSSL, RAND_load_file doesn't even do anything.

This partly implements #321.

The new baseline is OpenSSL 1.1.1 or LibreSSL 2.8.0. I chose the former
because it's the version available in Rocky Linux 8 (and presumably RHEL 8),
which is still under support. The latter is just because it's been released
around the same time.

By doing this, we can drop every preprocessor conditional that depends on
`OPENSSL_VERSION_NUMBER` and almost every one that depends on
`LIBRESSL_VERSION_NUMBER`.

In addition, we can now make the following simplifications:

* Drop support for SSLv2, since neither library supports it anymore.
  For backwards compatibility, the protocol name is still allowed in the
  config, but does nothing.

* Remove the setting of the `SSL_OP_SINGLE_{EC,}DH_USE` options, since
  they're now permanently enabled in both libraries.

* Remove the `OPENSSL_init_ssl` call, which is now unnecessary.

* Remove the manual seeding code, since both libraries now handle seeding
  automatically. In LibreSSL, `RAND_load_file` doesn't even do anything.
@Julien-Elie
Copy link
Contributor

Thanks for the cleaning. I'll have a deeper look at it next week, and integrate it into INN.
Indeed, manual seeding doesn't seem necessary in modern OpenSSL and LibreSSL implementations.

Note that Solaris 10 and 11.3 still have OpenSSL 1.0.2 but will soon be unsupported Solaris versions (January 2027).

@Julien-Elie
Copy link
Contributor

Many thanks again for your very careful patch. I see you removed the useless #ifdef checks on constants that are always defined in OpenSSL 1.1.1 and LibreSSL 2.8.0.

Patch proof-read. Build tested OK with OpenSSL 1.1.1 and 3.5.0 as well as LibreSSL 2.8.0 and 4.1.0.

@Julien-Elie Julien-Elie self-assigned this Jun 24, 2025
@Julien-Elie Julien-Elie added cleanup Various cleanup of code or programs C: nnrpd Related to nnrpd P: low Low priority labels Jun 24, 2025
@Julien-Elie Julien-Elie added this to the 2.8.0 milestone Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C: nnrpd Related to nnrpd cleanup Various cleanup of code or programs P: low Low priority

Development

Successfully merging this pull request may close these issues.

2 participants