All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/libp11: fix build with libressl
@ 2022-04-04 16:22 Fabrice Fontaine
  2022-04-04 20:17 ` Arnout Vandecappelle
  2022-04-10 15:33 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2022-04-04 16:22 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine

Fix the following build failure with libressl:

p11_rsa.c:355:14: error: static declaration of 'RSA_meth_get_finish' follows non-static declaration
  355 | static int (*RSA_meth_get_finish(const RSA_METHOD *meth)) (RSA *rsa)
      |              ^~~~~~~~~~~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/de3b1e97796f717eac47d291911e3e1517cb557b

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/libp11/0001-Update-wp11_rsa.c.patch | 26 +++++++++++++++++++++
 package/libp11/libp11.mk                    |  8 ++++++-
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 package/libp11/0001-Update-wp11_rsa.c.patch

diff --git a/package/libp11/0001-Update-wp11_rsa.c.patch b/package/libp11/0001-Update-wp11_rsa.c.patch
new file mode 100644
index 0000000000..0a2d6e65ce
--- /dev/null
+++ b/package/libp11/0001-Update-wp11_rsa.c.patch
@@ -0,0 +1,26 @@
+From 4968cfc64dbaa39bb479a24d9578d75099e2f337 Mon Sep 17 00:00:00 2001
+From: patchMonkey156 <pagorman@asu.edu>
+Date: Mon, 19 Oct 2020 17:12:15 -0400
+Subject: [PATCH] Update p11_rsa.c
+
+Bugfix for new LibreSSL version 3.2.2
+[Retrieved from:
+https://github.com/OpenSC/libp11/commit/4968cfc64dbaa39bb479a24d9578d75099e2f337]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ src/p11_rsa.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/p11_rsa.c b/src/p11_rsa.c
+index b6beef0..ff12ed7 100644
+--- a/src/p11_rsa.c
++++ b/src/p11_rsa.c
+@@ -336,7 +336,7 @@ int pkcs11_get_key_size(PKCS11_KEY *key)
+ 	return RSA_size(rsa);
+ }
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100005L || defined(LIBRESSL_VERSION_NUMBER)
++#if ( ( defined (OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x10100005L ) || ( defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x3020199L ) )
+ 
+ int (*RSA_meth_get_priv_enc(const RSA_METHOD *meth))
+ 		(int flen, const unsigned char *from,
diff --git a/package/libp11/libp11.mk b/package/libp11/libp11.mk
index 45a718ee99..c1873a920c 100644
--- a/package/libp11/libp11.mk
+++ b/package/libp11/libp11.mk
@@ -11,10 +11,16 @@ LIBP11_INSTALL_STAGING = YES
 LIBP11_LICENSE = LGPL-2.1+
 LIBP11_LICENSE_FILES = COPYING
 
+ifeq ($(BR2_PACKAGE_LIBOPENSSL),y)
+LIBP11_ENGINESDIR = enginesdir
+else ifeq ($(BR2_PACKAGE_LIBRESSL),y)
+LIBP11_ENGINESDIR = libdir
+endif
+
 # pkg-config returns a libcrypto enginesdir prefixed with the sysroot,
 # so let's rip it out.
 LIBP11_CONF_OPTS = \
-	--with-enginesdir=`$(PKG_CONFIG_HOST_BINARY) --variable enginesdir libcrypto | xargs readlink -f | sed 's%^$(STAGING_DIR)%%'`
+	--with-enginesdir=`$(PKG_CONFIG_HOST_BINARY) --variable $(LIBP11_ENGINESDIR) libcrypto | xargs readlink -f | sed 's%^$(STAGING_DIR)%%'`
 
 ifeq ($(BR2_PACKAGE_P11_KIT),y)
 LIBP11_CONF_OPTS += --with-pkcs11-module=/usr/lib/p11-kit-proxy.so
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/libp11: fix build with libressl
  2022-04-04 16:22 [Buildroot] [PATCH 1/1] package/libp11: fix build with libressl Fabrice Fontaine
@ 2022-04-04 20:17 ` Arnout Vandecappelle
  2022-04-10 15:33 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle @ 2022-04-04 20:17 UTC (permalink / raw)
  To: Fabrice Fontaine, buildroot



On 04/04/2022 18:22, Fabrice Fontaine wrote:
> Fix the following build failure with libressl:
> 
> p11_rsa.c:355:14: error: static declaration of 'RSA_meth_get_finish' follows non-static declaration
>    355 | static int (*RSA_meth_get_finish(const RSA_METHOD *meth)) (RSA *rsa)
>        |              ^~~~~~~~~~~~~~~~~~~
> 
> Fixes:
>   - http://autobuild.buildroot.org/results/de3b1e97796f717eac47d291911e3e1517cb557b
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   package/libp11/0001-Update-wp11_rsa.c.patch | 26 +++++++++++++++++++++
>   package/libp11/libp11.mk                    |  8 ++++++-
>   2 files changed, 33 insertions(+), 1 deletion(-)
>   create mode 100644 package/libp11/0001-Update-wp11_rsa.c.patch
> 
> diff --git a/package/libp11/0001-Update-wp11_rsa.c.patch b/package/libp11/0001-Update-wp11_rsa.c.patch
> new file mode 100644
> index 0000000000..0a2d6e65ce
> --- /dev/null
> +++ b/package/libp11/0001-Update-wp11_rsa.c.patch
> @@ -0,0 +1,26 @@
> +From 4968cfc64dbaa39bb479a24d9578d75099e2f337 Mon Sep 17 00:00:00 2001
> +From: patchMonkey156 <pagorman@asu.edu>
> +Date: Mon, 19 Oct 2020 17:12:15 -0400
> +Subject: [PATCH] Update p11_rsa.c
> +
> +Bugfix for new LibreSSL version 3.2.2
> +[Retrieved from:
> +https://github.com/OpenSC/libp11/commit/4968cfc64dbaa39bb479a24d9578d75099e2f337]
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +---
> + src/p11_rsa.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/src/p11_rsa.c b/src/p11_rsa.c
> +index b6beef0..ff12ed7 100644
> +--- a/src/p11_rsa.c
> ++++ b/src/p11_rsa.c
> +@@ -336,7 +336,7 @@ int pkcs11_get_key_size(PKCS11_KEY *key)
> + 	return RSA_size(rsa);
> + }
> +
> +-#if OPENSSL_VERSION_NUMBER < 0x10100005L || defined(LIBRESSL_VERSION_NUMBER)
> ++#if ( ( defined (OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x10100005L ) || ( defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x3020199L ) )
> +
> + int (*RSA_meth_get_priv_enc(const RSA_METHOD *meth))
> + 		(int flen, const unsigned char *from,
> diff --git a/package/libp11/libp11.mk b/package/libp11/libp11.mk
> index 45a718ee99..c1873a920c 100644
> --- a/package/libp11/libp11.mk
> +++ b/package/libp11/libp11.mk
> @@ -11,10 +11,16 @@ LIBP11_INSTALL_STAGING = YES
>   LIBP11_LICENSE = LGPL-2.1+
>   LIBP11_LICENSE_FILES = COPYING
>   
> +ifeq ($(BR2_PACKAGE_LIBOPENSSL),y)
> +LIBP11_ENGINESDIR = enginesdir
> +else ifeq ($(BR2_PACKAGE_LIBRESSL),y)
> +LIBP11_ENGINESDIR = libdir
> +endif
> +
>   # pkg-config returns a libcrypto enginesdir prefixed with the sysroot,
>   # so let's rip it out.
>   LIBP11_CONF_OPTS = \
> -	--with-enginesdir=`$(PKG_CONFIG_HOST_BINARY) --variable enginesdir libcrypto | xargs readlink -f | sed 's%^$(STAGING_DIR)%%'`
> +	--with-enginesdir=`$(PKG_CONFIG_HOST_BINARY) --variable $(LIBP11_ENGINESDIR) libcrypto | xargs readlink -f | sed 's%^$(STAGING_DIR)%%'`
>   
>   ifeq ($(BR2_PACKAGE_P11_KIT),y)
>   LIBP11_CONF_OPTS += --with-pkcs11-module=/usr/lib/p11-kit-proxy.so
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/libp11: fix build with libressl
  2022-04-04 16:22 [Buildroot] [PATCH 1/1] package/libp11: fix build with libressl Fabrice Fontaine
  2022-04-04 20:17 ` Arnout Vandecappelle
@ 2022-04-10 15:33 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2022-04-10 15:33 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Fix the following build failure with libressl:
 > p11_rsa.c:355:14: error: static declaration of 'RSA_meth_get_finish' follows non-static declaration
 >   355 | static int (*RSA_meth_get_finish(const RSA_METHOD *meth)) (RSA *rsa)
 >       |              ^~~~~~~~~~~~~~~~~~~

 > Fixes:
 >  - http://autobuild.buildroot.org/results/de3b1e97796f717eac47d291911e3e1517cb557b

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-10 15:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-04 16:22 [Buildroot] [PATCH 1/1] package/libp11: fix build with libressl Fabrice Fontaine
2022-04-04 20:17 ` Arnout Vandecappelle
2022-04-10 15:33 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.