aboutsummaryrefslogtreecommitdiff
path: root/lang/ruby/patches/001-fix-build-with-libressl-3.5.patch
blob: 0462556da905603b53b5c9985034a02fa782fdf9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
From e25fb0d0d86da5a9398ebdc9216b2ea89f80fa3d Mon Sep 17 00:00:00 2001
From: Jeremy Evans <code@jeremyevans.net>
Date: Fri, 25 Mar 2022 13:11:31 -0700
Subject: [PATCH] Fix build with LibreSSL 3.5

---
 ext/openssl/ossl_pkey.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/ext/openssl/ossl_pkey.c
+++ b/ext/openssl/ossl_pkey.c
@@ -710,7 +710,7 @@ ossl_pkey_export_traditional(int argc, V
 	}
     }
     else {
-#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
+#if OSSL_OPENSSL_PREREQ(1, 1, 0) || OSSL_LIBRESSL_PREREQ(3, 5, 0)
 	if (!PEM_write_bio_PrivateKey_traditional(bio, pkey, enc, NULL, 0,
 						  ossl_pem_passwd_cb,
 						  (void *)pass)) {