Skip to content

Commit 0830973

Browse files
SpecLadJulien-Elie
authored andcommitted
Drop old OpenSSL and LibreSSL version support
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. close #325 see #321
1 parent f77a528 commit 0830973

File tree

6 files changed

+42
-361
lines changed

6 files changed

+42
-361
lines changed

doc/pod/inn.conf.pod

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,9 +1325,7 @@ The name of the elliptic curve to use for ephemeral key exchanges.
13251325
To see the list of curves supported by OpenSSL, use C<openssl ecparam
13261326
-list_curves>.
13271327

1328-
The default is unset, which means an appropriate curve is auto-selected
1329-
(if your OpenSSL version is at least 1.0.2 or you are using LibreSSL)
1330-
or the NIST P-256 curve is used.
1328+
The default is unset, which means an appropriate curve is auto-selected.
13311329

13321330
This option is only effective if your OpenSSL version has ECDH support.
13331331

@@ -1341,7 +1339,10 @@ the server will choose following its own preferences.
13411339
=item I<tlsprotocols>
13421340

13431341
The list of TLS/SSL protocol versions to support. Valid protocols are
1344-
B<SSLv2>, B<SSLv3>, B<TLSv1>, B<TLSv1.1>, B<TLSv1.2> and B<TLSv1.3>.
1342+
B<SSLv3>, B<TLSv1>, B<TLSv1.1>, B<TLSv1.2> and B<TLSv1.3>. For compatibility
1343+
with older versions of INN, B<SSLv2> may also be listed, but this will have
1344+
no effect.
1345+
13451346
The default value is to only allow secure TLS protocols:
13461347

13471348
tlsprotocols: [ TLSv1.2 TLSv1.3 ]

doc/pod/install.pod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ versions you'll need:
182182
--with-blacklist blacklistd from FreeBSD 11 or higher base system
183183
--with-canlock libcanlock 3.3.0 or higher
184184
--with-krb5 MIT Kerberos v5 1.6.1 or higher
185-
--with-openssl OpenSSL 0.9.6 or higher, 3.0.0+ recommended
186-
LibreSSL 2.1.0 or higher, 3.2.0+ recommended
185+
--with-openssl OpenSSL 1.1.1 or higher, 3.0.0+ recommended
186+
LibreSSL 2.8.0 or higher, 3.5.0+ recommended
187187
--with-perl Perl 5.004_03 or higher, 5.8.0+ recommended
188188
--with-python Python 2.3.0 or higher, 2.5.0+ recommended
189189
Python 3.3.0 or higher

nnrpd/misc.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -638,13 +638,11 @@ CMDstarttls(int ac UNUSED, char *av[] UNUSED)
638638
}
639639
# endif /* HAVE_SASL */
640640

641-
# if defined(HAVE_ZLIB) && OPENSSL_VERSION_NUMBER >= 0x00090800fL
642-
/* Check whether a compression layer has just been added.
643-
* SSL_get_current_compression() is defined in OpenSSL versions >= 0.9.8
644-
* final release, as well as LibreSSL. */
641+
# if defined(HAVE_ZLIB)
642+
/* Check whether a compression layer has just been added. */
645643
tls_compression_on = (SSL_get_current_compression(tls_conn) != NULL);
646644
compression_layer_on = tls_compression_on;
647-
# endif /* HAVE_ZLIB && OPENSSL >= v0.9.8 */
645+
# endif /* HAVE_ZLIB */
648646

649647
/* Reset our read buffer so as to prevent plaintext command injection. */
650648
line_reset(&NNTPline);

nnrpd/nnrpd.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,13 +1358,11 @@ main(int argc, char *argv[])
13581358
}
13591359
encryption_layer_on = true;
13601360

1361-
# if defined(HAVE_ZLIB) && OPENSSL_VERSION_NUMBER >= 0x00090800fL
1362-
/* Check whether a compression layer has just been added.
1363-
* SSL_get_current_compression() is defined in OpenSSL versions >=
1364-
* 0.9.8 final release, as well as LibreSSL. */
1361+
# if defined(HAVE_ZLIB)
1362+
/* Check whether a compression layer has just been added. */
13651363
tls_compression_on = (SSL_get_current_compression(tls_conn) != NULL);
13661364
compression_layer_on = tls_compression_on;
1367-
# endif /* HAVE_ZLIB && OPENSSL >= v0.9.8 */
1365+
# endif /* HAVE_ZLIB */
13681366
}
13691367
#endif /* HAVE_OPENSSL */
13701368

0 commit comments

Comments
 (0)