All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/python-cryptography: fix symbol redeclared error
@ 2022-05-01  8:01 James Hilliard
  2022-05-01 19:58 ` Yann E. MORIN
  0 siblings, 1 reply; 2+ messages in thread
From: James Hilliard @ 2022-05-01  8:01 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard, Asaf Kahlon

Backport a patch removing invalid OPENSSL_NO_PSK guard.

Fixes:
 - http://autobuild.buildroot.net/results/1f2/1f2f203ee5130fdfce005281e71bf371699701f3

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 ...id-OPENSSL_NO_PSK-defined-guard-7146.patch | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 package/python-cryptography/0001-Remove-invalid-OPENSSL_NO_PSK-defined-guard-7146.patch

diff --git a/package/python-cryptography/0001-Remove-invalid-OPENSSL_NO_PSK-defined-guard-7146.patch b/package/python-cryptography/0001-Remove-invalid-OPENSSL_NO_PSK-defined-guard-7146.patch
new file mode 100644
index 0000000000..5d953b8931
--- /dev/null
+++ b/package/python-cryptography/0001-Remove-invalid-OPENSSL_NO_PSK-defined-guard-7146.patch
@@ -0,0 +1,56 @@
+From 891a06101d7b48c61d0d3174f79e9962b995770e Mon Sep 17 00:00:00 2001
+From: James Hilliard <james.hilliard1@gmail.com>
+Date: Fri, 29 Apr 2022 16:06:10 -0600
+Subject: [PATCH] Remove invalid OPENSSL_NO_PSK defined guard (#7146)
+
+These symbols are not conditional on OPENSSL_NO_PSK in ssl.h
+
+SSL_CTX_set_psk_find_session_callback:
+https://github.com/openssl/openssl/blob/openssl-3.0.2/include/openssl/ssl.h.in#L847
+
+SSL_CTX_set_psk_use_session_callback:
+https://github.com/openssl/openssl/blob/openssl-3.0.2/include/openssl/ssl.h.in#L850-L851
+
+As such we can not guard the fallback with defined(OPENSSL_NO_PSK)
+as this will result in redeclaration errors.
+
+Fixes:
+build/temp.linux-sparc64-3.10/_openssl.c:2286:8: error: 'SSL_CTX_set_psk_find_session_callback' redeclared as different kind of symbol
+ 2286 | void (*SSL_CTX_set_psk_find_session_callback)(SSL_CTX *,
+      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+In file included from build/temp.linux-sparc64-3.10/_openssl.c:832:
+/home/giuliobenetti/autobuild/run/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/openssl/ssl.h:855:6: note: previous declaration of 'SSL_CTX_set_psk_find_session_callback' was here
+  855 | void SSL_CTX_set_psk_find_session_callback(SSL_CTX *ctx,
+      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+build/temp.linux-sparc64-3.10/_openssl.c:2293:8: error: 'SSL_CTX_set_psk_use_session_callback' redeclared as different kind of symbol
+ 2293 | void (*SSL_CTX_set_psk_use_session_callback)(SSL_CTX *,
+      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+In file included from build/temp.linux-sparc64-3.10/_openssl.c:832:
+/home/giuliobenetti/autobuild/run/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/openssl/ssl.h:858:6: note: previous declaration of 'SSL_CTX_set_psk_use_session_callback' was here
+  858 | void SSL_CTX_set_psk_use_session_callback(SSL_CTX *ctx,
+      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
+[james.hilliard1@gmail.com: backport from upstream commit
+891a06101d7b48c61d0d3174f79e9962b995770e]
+---
+ src/_cffi_src/openssl/ssl.py | 3 +--
+ 2 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py
+index 1314b85b0..d036e4f2d 100644
+--- a/src/_cffi_src/openssl/ssl.py
++++ b/src/_cffi_src/openssl/ssl.py
+@@ -785,8 +785,7 @@ void (*SSL_CTX_set_cookie_verify_cb)(SSL_CTX *,
+ static const long Cryptography_HAS_SSL_COOKIE = 1;
+ #endif
+ #if CRYPTOGRAPHY_OPENSSL_LESS_THAN_111 || \
+-    CRYPTOGRAPHY_IS_LIBRESSL || CRYPTOGRAPHY_IS_BORINGSSL || \
+-    defined(OPENSSL_NO_PSK)
++    CRYPTOGRAPHY_IS_LIBRESSL || CRYPTOGRAPHY_IS_BORINGSSL
+ static const long Cryptography_HAS_PSK_TLSv1_3 = 0;
+ void (*SSL_CTX_set_psk_find_session_callback)(SSL_CTX *,
+                                            int (*)(
+-- 
+2.25.1
+
-- 
2.25.1

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

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

* Re: [Buildroot] [PATCH 1/1] package/python-cryptography: fix symbol redeclared error
  2022-05-01  8:01 [Buildroot] [PATCH 1/1] package/python-cryptography: fix symbol redeclared error James Hilliard
@ 2022-05-01 19:58 ` Yann E. MORIN
  0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2022-05-01 19:58 UTC (permalink / raw)
  To: James Hilliard; +Cc: Asaf Kahlon, buildroot

James, All,

On 2022-05-01 02:01 -0600, James Hilliard spake thusly:
> Backport a patch removing invalid OPENSSL_NO_PSK guard.
> 
> Fixes:
>  - http://autobuild.buildroot.net/results/1f2/1f2f203ee5130fdfce005281e71bf371699701f3
> 
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  ...id-OPENSSL_NO_PSK-defined-guard-7146.patch | 56 +++++++++++++++++++
>  1 file changed, 56 insertions(+)
>  create mode 100644 package/python-cryptography/0001-Remove-invalid-OPENSSL_NO_PSK-defined-guard-7146.patch
> 
> diff --git a/package/python-cryptography/0001-Remove-invalid-OPENSSL_NO_PSK-defined-guard-7146.patch b/package/python-cryptography/0001-Remove-invalid-OPENSSL_NO_PSK-defined-guard-7146.patch
> new file mode 100644
> index 0000000000..5d953b8931
> --- /dev/null
> +++ b/package/python-cryptography/0001-Remove-invalid-OPENSSL_NO_PSK-defined-guard-7146.patch
> @@ -0,0 +1,56 @@
> +From 891a06101d7b48c61d0d3174f79e9962b995770e Mon Sep 17 00:00:00 2001
> +From: James Hilliard <james.hilliard1@gmail.com>
> +Date: Fri, 29 Apr 2022 16:06:10 -0600
> +Subject: [PATCH] Remove invalid OPENSSL_NO_PSK defined guard (#7146)
> +
> +These symbols are not conditional on OPENSSL_NO_PSK in ssl.h
> +
> +SSL_CTX_set_psk_find_session_callback:
> +https://github.com/openssl/openssl/blob/openssl-3.0.2/include/openssl/ssl.h.in#L847
> +
> +SSL_CTX_set_psk_use_session_callback:
> +https://github.com/openssl/openssl/blob/openssl-3.0.2/include/openssl/ssl.h.in#L850-L851
> +
> +As such we can not guard the fallback with defined(OPENSSL_NO_PSK)
> +as this will result in redeclaration errors.
> +
> +Fixes:
> +build/temp.linux-sparc64-3.10/_openssl.c:2286:8: error: 'SSL_CTX_set_psk_find_session_callback' redeclared as different kind of symbol
> + 2286 | void (*SSL_CTX_set_psk_find_session_callback)(SSL_CTX *,
> +      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +In file included from build/temp.linux-sparc64-3.10/_openssl.c:832:
> +/home/giuliobenetti/autobuild/run/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/openssl/ssl.h:855:6: note: previous declaration of 'SSL_CTX_set_psk_find_session_callback' was here
> +  855 | void SSL_CTX_set_psk_find_session_callback(SSL_CTX *ctx,
> +      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +build/temp.linux-sparc64-3.10/_openssl.c:2293:8: error: 'SSL_CTX_set_psk_use_session_callback' redeclared as different kind of symbol
> + 2293 | void (*SSL_CTX_set_psk_use_session_callback)(SSL_CTX *,
> +      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +In file included from build/temp.linux-sparc64-3.10/_openssl.c:832:
> +/home/giuliobenetti/autobuild/run/instance-0/output-1/host/sparc64-buildroot-linux-gnu/sysroot/usr/include/openssl/ssl.h:858:6: note: previous declaration of 'SSL_CTX_set_psk_use_session_callback' was here
> +  858 | void SSL_CTX_set_psk_use_session_callback(SSL_CTX *ctx,
> +      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> +[james.hilliard1@gmail.com: backport from upstream commit
> +891a06101d7b48c61d0d3174f79e9962b995770e]
> +---
> + src/_cffi_src/openssl/ssl.py | 3 +--
> + 2 files changed, 2 insertions(+), 3 deletions(-)
> +
> +diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py
> +index 1314b85b0..d036e4f2d 100644
> +--- a/src/_cffi_src/openssl/ssl.py
> ++++ b/src/_cffi_src/openssl/ssl.py
> +@@ -785,8 +785,7 @@ void (*SSL_CTX_set_cookie_verify_cb)(SSL_CTX *,
> + static const long Cryptography_HAS_SSL_COOKIE = 1;
> + #endif
> + #if CRYPTOGRAPHY_OPENSSL_LESS_THAN_111 || \
> +-    CRYPTOGRAPHY_IS_LIBRESSL || CRYPTOGRAPHY_IS_BORINGSSL || \
> +-    defined(OPENSSL_NO_PSK)
> ++    CRYPTOGRAPHY_IS_LIBRESSL || CRYPTOGRAPHY_IS_BORINGSSL
> + static const long Cryptography_HAS_PSK_TLSv1_3 = 0;
> + void (*SSL_CTX_set_psk_find_session_callback)(SSL_CTX *,
> +                                            int (*)(
> +-- 
> +2.25.1
> +
> -- 
> 2.25.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-05-01 19:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-01  8:01 [Buildroot] [PATCH 1/1] package/python-cryptography: fix symbol redeclared error James Hilliard
2022-05-01 19:58 ` Yann E. MORIN

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.