mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/openssl] ossl.c: do not set locking callbacks on LibreSSL
Similarly to OpenSSL >= 1.1.0, LibreSSL 2.9.0 ensures thread safety
without requiring applications to set locking callbacks and made
related functions no-op.
7276233e1a
This commit is contained in:
parent
88d64418dd
commit
b7a908af34
2 changed files with 7 additions and 2 deletions
|
@ -130,7 +130,6 @@ engines.each { |name|
|
|||
if !have_struct_member("SSL", "ctx", "openssl/ssl.h") || is_libressl
|
||||
$defs.push("-DHAVE_OPAQUE_OPENSSL")
|
||||
end
|
||||
have_func("CRYPTO_lock") || $defs.push("-DHAVE_OPENSSL_110_THREADING_API")
|
||||
have_func("BN_GENCB_new")
|
||||
have_func("BN_GENCB_free")
|
||||
have_func("BN_GENCB_get_arg")
|
||||
|
|
|
@ -9,7 +9,13 @@
|
|||
*/
|
||||
#include "ossl.h"
|
||||
#include <stdarg.h> /* for ossl_raise */
|
||||
#include <ruby/thread_native.h> /* for OpenSSL < 1.1.0 locks */
|
||||
|
||||
/* OpenSSL >= 1.1.0 and LibreSSL >= 2.9.0 */
|
||||
#if defined(LIBRESSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER >= 0x10100000
|
||||
# define HAVE_OPENSSL_110_THREADING_API
|
||||
#else
|
||||
# include <ruby/thread_native.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Data Conversion
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue