From f0ac4c47b04724c1b4ffae33a1809554b1f56b91 Mon Sep 17 00:00:00 2001 From: Artem Boldariev Date: Tue, 5 Apr 2022 13:33:40 +0300 Subject: [PATCH] Change X509_STORE_up_ref() shim return value X509_STORE_up_ref() must return 1 on success, while the previous implementation would return the references count. This commit fixes that. --- lib/isc/openssl_shim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/isc/openssl_shim.c b/lib/isc/openssl_shim.c index 1dcc921f01..3d6cbeed89 100644 --- a/lib/isc/openssl_shim.c +++ b/lib/isc/openssl_shim.c @@ -174,7 +174,7 @@ OPENSSL_cleanup(void) { int X509_STORE_up_ref(X509_STORE *store) { - return (CRYPTO_add(&store->references, 1, CRYPTO_LOCK_X509_STORE)); + return (CRYPTO_add(&store->references, 1, CRYPTO_LOCK_X509_STORE) > 0); } #endif /* !HAVE_OPENSSL_CLEANUP */