From ded7cb0127c3f128304a6892c98a51b64d384b70 Mon Sep 17 00:00:00 2001 From: Kazuki Yamaguchi Date: Sun, 24 Mar 2024 03:42:05 +0900 Subject: [PATCH] libressl --- ext/openssl/ossl_ssl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c index 97375cee2..482fb1285 100644 --- a/ext/openssl/ossl_ssl.c +++ b/ext/openssl/ossl_ssl.c @@ -1724,6 +1724,10 @@ ossl_ssl_setup(VALUE self) if (!bio) ossl_raise(eSSLError, "BIO_new(ossl_bio_meth)"); BIO_set_data(bio, (void *)io); +#if OSSL_IS_LIBRESSL + // Incompatibility with OpenSSL? + BIO_set_init(bio, 1); +#endif // Returns void currently (but wouldn't it be technically possible to fail?) SSL_set_bio(ssl, bio, bio); }