0001-Fix-build-with-LibreSSL-3-5.patch 984 B

12345678910111213141516171819202122232425
  1. From e25fb0d0d86da5a9398ebdc9216b2ea89f80fa3d Mon Sep 17 00:00:00 2001
  2. From: Jeremy Evans <code@jeremyevans.net>
  3. Date: Fri, 25 Mar 2022 13:11:31 -0700
  4. Subject: [PATCH] Fix build with LibreSSL 3.5
  5. [Retrieved from:
  6. https://github.com/ruby/openssl/commit/e25fb0d0d86da5a9398ebdc9216b2ea89f80fa3d]
  7. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  8. ---
  9. ext/openssl/ossl_pkey.c | 2 +-
  10. 1 file changed, 1 insertion(+), 1 deletion(-)
  11. diff --git a/ext/openssl/ossl_pkey.c b/ext/openssl/ossl_pkey.c
  12. index 2a4835a2..24d0da46 100644
  13. --- a/ext/openssl/ossl_pkey.c
  14. +++ b/ext/openssl/ossl_pkey.c
  15. @@ -710,7 +710,7 @@ ossl_pkey_export_traditional(int argc, VALUE *argv, VALUE self, int to_der)
  16. }
  17. }
  18. else {
  19. -#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
  20. +#if OSSL_OPENSSL_PREREQ(1, 1, 0) || OSSL_LIBRESSL_PREREQ(3, 5, 0)
  21. if (!PEM_write_bio_PrivateKey_traditional(bio, pkey, enc, NULL, 0,
  22. ossl_pem_passwd_cb,
  23. (void *)pass)) {