Skip to content

Commit

Permalink
GH-471 Check that OpenSSL has NPN enabled when testing NPN.
Browse files Browse the repository at this point in the history
OpenSSL can be configured without NPN support. The NPN tests assumed that NPN
is always available instead of checking for the presence of NPN functionality.
  • Loading branch information
h-vn committed Jan 17, 2024
1 parent ce522e8 commit de8a734
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
Revision history for Perl extension Net::SSLeay.

1.95_01 yyyy-mm-dd
- Skip NPN tests when NPN is disabled in OpenSSL instead o
assuming NPN is always enabled. Reported by GitHub user
dilyanpalauzov Дилян Палаузов.

1.94 2024-01-08
- New stable release incorporating all changes from developer releases 1.93_01
to 1.93_05.
Expand Down
3 changes: 3 additions & 0 deletions t/local/40_npn_support.t
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ BEGIN {
plan skip_all => "OpenSSL 1.0.1 or above required";
} elsif (Net::SSLeay::constant("LIBRESSL_VERSION_NUMBER")) {
plan skip_all => "LibreSSL removed support for NPN";
} elsif (!defined &Net::SSLeay::CTX_set_next_protos_advertised_cb) {
# OpenSSL can optionally be compiled without NPN support
plan skip_all => "NPN is not enabled";
} elsif (not can_fork()) {
plan skip_all => "fork() not supported on this system";
} elsif ( !eval { new_ctx( undef, 'TLSv1.2' ); 1 } ) {
Expand Down

0 comments on commit de8a734

Please sign in to comment.