Skip to main content


Perl bindings for OpenSSL and LibreSSL

Changes for 1.93_03 - 2024-01-02

  • Pass RAND_seed()'s sole argument to the underlying RAND_seed() function in libcrypto, rather than passing the value of a non-existent second argument. Fixes GH-427. Thanks to cgf1 for the report.
  • Avoid explicit and implicit use of weak hash algorithms, such as MD5 and SHA-1, in test suite. This allows tests 44_sess.t and 45_exporter.t to correctly work on systems where crypto policies prohibit their direct use and TLS versions that require them. An example of such a system is Rocky Linux 9.2. Any Red Hat Enterprise Linux 9 and derived system is likely to have similar behaviour. Thanks to Paul Howarth for the investigation and patches.
  • LibreSSL 3.8.0 release notes state: The POLICY_TREE and its related structures and API were removed. The affected Net::SSLeay functions are:
  • Add OpenSSL 3.1 and LibreSSL 3.7 minor releases to GitHub CI testing. Update the previous minor releases to their latest versions. Add NetBSD to BSDs job and update the other BSDs and Alpine Linux jobs to cover additional and latest releases. Use the latest MacOS runners.
  • Expose SSL_CTX_set_client_hello_cb for setting a callback the server calls when it processes a ClientHello. Expose the following functions that can be called only from the callback. None of these are available with LibreSSL.
  • Expose constants used by SSL_CTX_set_client_hello_cb related functions.
  • Expose functions for setting up TLS PSK on the server side. Only SSL_CIPHER_find is available with LibreSSL.
  • Expose NID_shake128, NID_shake256 and the rest of NID_sha* constants.
  • Expose functions for setting up TLS 1.3 PSK authentication on the client side. Only SSL_SESSION_get0_cipher is available with LibreSSL.
  • Major documentation cleanup. Thanks to John Jetmore.
  • Add constants for specifying version field for certificates, certificate requests and CRLs. Available in OpenSSL 3.0:
  • Remove conditional compilation checks from SSLeay.xs and compatilibty notes from SSLeay.pod for OpenSSL versions earlier than 0.9.8. This includes all 0.9.7 and earlier releases down to 0.9.3a. Update tests respectively.
  • Add OpenSSL 3.2 and LibreSSL 3.8 minor releases to GitHub CI testing. Update existing OpenSSL releases to 1.1.1w, 3.0.12 and 3.1.4.
  • Support compiling SSLeay.xs with a C++ compiler. Thanks to James E Keenan and GitHub user twata1 for suggesting this, testing and providing detailed test reports. Tested with GCC 13 g++, Clang 17 clang++ and Visual Studio Community 2022 C++ compilers. Discussion in GH-425 and GH-438.
  • Add constants for OPENSSL_init_crypto and related functions:
  • Expose functions for OpenSSL libcrypto and libssl initialisation, configuration and deinitialisation. These are available in OpenSSL 1.1.0 and later:
  • Add new test file 23_openssl_init.t for OPENSSL_init_ssl and related functions.
  • Support finding OpenSSL libraries using ExtUtils:😛kgConfig. Thanks to Paul Howarth for the patch.
  • Fix a number of cases where variables were declared after code triggering Gcc and Clang warning -Wdeclaration-after-statement. This is supported by C language version C99 and used by Perl 5.35.5 and later. SSLeay.xs is likely compiled with compilers that do not support this, therefore such constructs are avoided in SSLeay.xs. Thanks to GitHub user bulk88 for the patch.
  • Fix _CRT_SECURE_NO_DEPRECATE warning on Windows. Fix OpenSSL library file path detection loop in Makefile.PL. Both thanks to bulk88.
  • Update Shining Light OpenSSL detection to work with OpenSSL 1.1.1w, 3.0.12, 3.1.4 and 3.2.0 installers. Caveats: when both 32bit and 64bit versions are installed, OpenSSL library path detection may pick the wrong version. Static compilation needs seems not to work with the these versions. Thanks to bulk88 for the initial updates.
  • Tone down Makefile.PL and README warning against mixing compilers and flags when compiling OpenSSL, Perl and Net::SSLeay. This may still be a requirement on some platforms, but, for example, with Linux and macOS mixing clang and gcc appears to work.
  • Add general installation instructions in README. Thanks to GitHub user viviparous. Update README and README.OSX.