Message ID | 20220611114053.89542-1-fontaine.fabrice@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/1] package/ruby: fix build with libressl >= 3.5.0 | expand |
On 11/06/2022 13:40, Fabrice Fontaine wrote: > Fix the following build failure with libressl raised since bump to > version 3.5.2 in commit 8b216927db080b38fdbf1f8b025b6f90a89d4bc2: > > ossl_pkey.c: In function 'ossl_pkey_export_traditional': > ossl_pkey.c:681:62: error: invalid use of incomplete typedef 'EVP_PKEY' {aka 'struct evp_pkey_st'} > 681 | EVP_PKEY_asn1_get0_info(NULL, NULL, NULL, NULL, &aname, pkey->ameth); > | ^~ > > Fixes: > - http://autobuild.buildroot.org/results/9b2622fbc4c2c2b787578ee83fc6a23795a84415 > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Applied to master, thanks. Regards, Arnout > --- > .../0001-Fix-build-with-LibreSSL-3-5.patch | 25 +++++++++++++++++++ > 1 file changed, 25 insertions(+) > create mode 100644 package/ruby/0001-Fix-build-with-LibreSSL-3-5.patch > > diff --git a/package/ruby/0001-Fix-build-with-LibreSSL-3-5.patch b/package/ruby/0001-Fix-build-with-LibreSSL-3-5.patch > new file mode 100644 > index 0000000000..039a6466d6 > --- /dev/null > +++ b/package/ruby/0001-Fix-build-with-LibreSSL-3-5.patch > @@ -0,0 +1,25 @@ > +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 > + > +[Retrieved from: > +https://github.com/ruby/openssl/commit/e25fb0d0d86da5a9398ebdc9216b2ea89f80fa3d] > +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> > +--- > + ext/openssl/ossl_pkey.c | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +diff --git a/ext/openssl/ossl_pkey.c b/ext/openssl/ossl_pkey.c > +index 2a4835a2..24d0da46 100644 > +--- a/ext/openssl/ossl_pkey.c > ++++ b/ext/openssl/ossl_pkey.c > +@@ -670,7 +670,7 @@ ossl_pkey_export_traditional(int argc, VALUE *argv, VALUE self, int to_der) > + } > + } > + 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)) {
On 11/06/2022 13.40, Fabrice Fontaine wrote: > Fix the following build failure with libressl raised since bump to > version 3.5.2 in commit 8b216927db080b38fdbf1f8b025b6f90a89d4bc2: > > ossl_pkey.c: In function 'ossl_pkey_export_traditional': > ossl_pkey.c:681:62: error: invalid use of incomplete typedef 'EVP_PKEY' {aka 'struct evp_pkey_st'} > 681 | EVP_PKEY_asn1_get0_info(NULL, NULL, NULL, NULL, &aname, pkey->ameth); > | ^~ > > Fixes: > - http://autobuild.buildroot.org/results/9b2622fbc4c2c2b787578ee83fc6a23795a84415 > > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Committed to 2022.05.x, thanks.
diff --git a/package/ruby/0001-Fix-build-with-LibreSSL-3-5.patch b/package/ruby/0001-Fix-build-with-LibreSSL-3-5.patch new file mode 100644 index 0000000000..039a6466d6 --- /dev/null +++ b/package/ruby/0001-Fix-build-with-LibreSSL-3-5.patch @@ -0,0 +1,25 @@ +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 + +[Retrieved from: +https://github.com/ruby/openssl/commit/e25fb0d0d86da5a9398ebdc9216b2ea89f80fa3d] +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> +--- + ext/openssl/ossl_pkey.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ext/openssl/ossl_pkey.c b/ext/openssl/ossl_pkey.c +index 2a4835a2..24d0da46 100644 +--- a/ext/openssl/ossl_pkey.c ++++ b/ext/openssl/ossl_pkey.c +@@ -670,7 +670,7 @@ ossl_pkey_export_traditional(int argc, VALUE *argv, VALUE self, int to_der) + } + } + 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)) {
Fix the following build failure with libressl raised since bump to version 3.5.2 in commit 8b216927db080b38fdbf1f8b025b6f90a89d4bc2: ossl_pkey.c: In function 'ossl_pkey_export_traditional': ossl_pkey.c:681:62: error: invalid use of incomplete typedef 'EVP_PKEY' {aka 'struct evp_pkey_st'} 681 | EVP_PKEY_asn1_get0_info(NULL, NULL, NULL, NULL, &aname, pkey->ameth); | ^~ Fixes: - http://autobuild.buildroot.org/results/9b2622fbc4c2c2b787578ee83fc6a23795a84415 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> --- .../0001-Fix-build-with-LibreSSL-3-5.patch | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 package/ruby/0001-Fix-build-with-LibreSSL-3-5.patch