From bba888d55909ebeb949200e6a712cf2a093b1963 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Wed, 2 Jan 2019 06:59:30 -0500 Subject: Remove assertion OpenSSL has removed the crypto locking primitives, so CRYPTO_get_locking_function always returns NULL. To support older and newer OpenSSL, continue to set a locking function, but don't assert if we have already initialized and the locking function returns null. --- tls.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tls.c b/tls.c index 7b33d8e..366286f 100644 --- a/tls.c +++ b/tls.c @@ -232,9 +232,13 @@ tls_init () { SSL_load_error_strings (); #if defined HAVE_PTHREADS - if (CRYPTO_get_locking_callback () == NULL) + /* OpenSSL 1.1 removed the locking functions and finally implemented + * its own thread safety. In this case the locking callback will + * return null even after we initialize it. So if we have already + * allocated mutexes, don't consider that a failure. + */ + if ((CRYPTO_get_locking_callback () == NULL) || (s_openssl_mutexes_count > 0)) { - assert (s_openssl_mutexes_count == 0); /* Allocate and initialise mutexes. We will never free these. FIXME: Is there a portable way of having a function invoked when a solib is unloaded? -ln */ -- cgit v1.2.1 From c71a10b4f5dfcdb765dfa08ed263bb574cdf778b Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Wed, 2 Jan 2019 07:04:51 -0500 Subject: Release --- debian/changelog | 6 ++++++ debian/control | 2 +- debian/rules | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index e7d986c..9942a11 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libradsec (0.0.5-5) unstable; urgency=high + + * Fix assert, necessary for library to work with OpenSSL 1.1.1. + + -- Sam Hartman Wed, 02 Jan 2019 07:01:03 -0500 + libradsec (0.0.5-4) unstable; urgency=medium * Fix problems detected by better warnings in gcc 7, Closes: #853506 diff --git a/debian/control b/debian/control index c7bd47c..d964542 100644 --- a/debian/control +++ b/debian/control @@ -1,5 +1,5 @@ Source: libradsec -Priority: extra +Priority: optional Maintainer: Sam Hartman Build-Depends: debhelper (>= 9), autotools-dev, libconfuse-dev, libssl-dev, libevent-dev (>= 2.0), dh-autoreconf Standards-Version: 3.9.8 diff --git a/debian/rules b/debian/rules index ec3ee90..0ff0b3f 100755 --- a/debian/rules +++ b/debian/rules @@ -13,3 +13,5 @@ override_dh_auto_configure: dh_auto_configure -- --enable-tls --enable-tls-psk CFLAGS='$(shell dpkg-buildflags --get CFLAGS) -pthread' +override_dh_makeshlibs: + dh_makeshlibs -plibradsec0 -V'libradsec0 (>= 0.0.5-5)' -- cgit v1.2.1