aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/ossl_ssl.c
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2021-09-27 01:09:59 +0900
committerKazuki Yamaguchi <k@rhe.jp>2021-09-27 11:15:07 +0900
commit9088fe902908bc6ddf7cb062d7ec8fc40c0f5dc3 (patch)
tree2e0d7930c15cd32acf2d2a9f8f51da09e8d86564 /ext/openssl/ossl_ssl.c
parentb74e43bd71b9870e335da0120f5314cd6096e7e9 (diff)
downloadruby-openssl-9088fe902908bc6ddf7cb062d7ec8fc40c0f5dc3.tar.gz
test: adjust test cases for LibreSSL 3.2.4
This is a backport to the 2.1 branch of the following commits: - a0e98d48c91f ("Enhance TLS 1.3 support on LibreSSL 3.2/3.3", 2020-12-03) - a9954bac22ba ("test: adjust test cases for LibreSSL 3.2.4", 2021-02-25)
Diffstat (limited to 'ext/openssl/ossl_ssl.c')
-rw-r--r--ext/openssl/ossl_ssl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index f4271369..a8386f72 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -13,6 +13,12 @@
#define numberof(ary) (int)(sizeof(ary)/sizeof((ary)[0]))
+#if !defined(TLS1_3_VERSION) && \
+ defined(LIBRESSL_VERSION_NUMBER) && \
+ LIBRESSL_VERSION_NUMBER >= 0x3020000fL
+# define TLS1_3_VERSION 0x0304
+#endif
+
#ifdef _WIN32
# define TO_SOCKET(s) _get_osfhandle(s)
#else