diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2021-04-04 23:39:41 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-04 23:39:41 +0900 |
commit | 11801ad6b12895329e00220599fba100746a9137 (patch) | |
tree | 7db7439d3075424574a3547756fee310a12a49c0 /ext/openssl/ossl.c | |
parent | 6fae2bd612dbf5a2fc2d444a8be5d8e83ce15136 (diff) | |
parent | 7276233e1ade65465aa89b8b777ebe05608a1468 (diff) | |
download | ruby-openssl-11801ad6b12895329e00220599fba100746a9137.tar.gz |
Merge pull request #396 from rhenium/ky/drop-openssl-1.0.1
require OpenSSL >= 1.0.2 and LibreSSL >= 3.1
Diffstat (limited to 'ext/openssl/ossl.c')
-rw-r--r-- | ext/openssl/ossl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c index 70b6a6a8..358b3b29 100644 --- a/ext/openssl/ossl.c +++ b/ext/openssl/ossl.c @@ -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 |