aboutsummaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-m2crypto
diff options
context:
space:
mode:
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-m2crypto')
-rw-r--r--meta-python/recipes-devtools/python/python3-m2crypto/0001-Allow-verify_cb_-to-be-called-with-ok-True.patch47
-rw-r--r--meta-python/recipes-devtools/python/python3-m2crypto/0001-Use-of-RSA_SSLV23_PADDING-has-been-deprecated.patch29
-rw-r--r--meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-address-openssl-3.x-build-issue.patch28
-rw-r--r--meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch2
-rw-r--r--meta-python/recipes-devtools/python/python3-m2crypto/avoid-host-contamination.patch23
-rw-r--r--meta-python/recipes-devtools/python/python3-m2crypto/cross-compile-platform.patch4
6 files changed, 55 insertions, 78 deletions
diff --git a/meta-python/recipes-devtools/python/python3-m2crypto/0001-Allow-verify_cb_-to-be-called-with-ok-True.patch b/meta-python/recipes-devtools/python/python3-m2crypto/0001-Allow-verify_cb_-to-be-called-with-ok-True.patch
deleted file mode 100644
index 3c836635a1..0000000000
--- a/meta-python/recipes-devtools/python/python3-m2crypto/0001-Allow-verify_cb_-to-be-called-with-ok-True.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 73fbd1e646f6bbf202d4418bae80eb9941fbf552 Mon Sep 17 00:00:00 2001
-From: Casey Deccio <casey@deccio.net>
-Date: Fri, 8 Jan 2021 12:43:09 -0700
-Subject: [PATCH] Allow verify_cb_* to be called with ok=True
-
-With https://github.com/openssl/openssl/commit/2e06150e3928daa06d5ff70c32bffad8088ebe58
-OpenSSL allowed verificaton to continue on UNABLE_TO_VERIFY_LEAF_SIGNATURE
----
- tests/test_ssl.py | 14 ++++++++++++--
- 1 file changed, 12 insertions(+), 2 deletions(-)
-
-diff --git a/tests/test_ssl.py b/tests/test_ssl.py
-index 92b6942..7a3271a 100644
---- a/tests/test_ssl.py
-+++ b/tests/test_ssl.py
-@@ -59,8 +59,13 @@ def allocate_srv_port():
-
-
- def verify_cb_new_function(ok, store):
-- assert not ok
- err = store.get_error()
-+ # If err is X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE, then instead of
-+ # aborting, this callback is called to retrieve additional error
-+ # information. In this case, ok might not be False.
-+ # See https://github.com/openssl/openssl/commit/2e06150e3928daa06d5ff70c32bffad8088ebe58
-+ if err != m2.X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE:
-+ assert not ok
- assert err in [m2.X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT,
- m2.X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY,
- m2.X509_V_ERR_CERT_UNTRUSTED,
-@@ -618,7 +623,12 @@ class MiscSSLClientTestCase(BaseSSLClientTestCase):
-
- def verify_cb_old(self, ctx_ptr, x509_ptr, err, depth, ok):
- try:
-- self.assertFalse(ok)
-+ # If err is X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE, then instead of
-+ # aborting, this callback is called to retrieve additional error
-+ # information. In this case, ok might not be False.
-+ # See https://github.com/openssl/openssl/commit/2e06150e3928daa06d5ff70c32bffad8088ebe58
-+ if err != m2.X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE:
-+ self.assertFalse(ok)
- self.assertIn(err,
- [m2.X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT,
- m2.X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY,
---
-2.29.2
-
diff --git a/meta-python/recipes-devtools/python/python3-m2crypto/0001-Use-of-RSA_SSLV23_PADDING-has-been-deprecated.patch b/meta-python/recipes-devtools/python/python3-m2crypto/0001-Use-of-RSA_SSLV23_PADDING-has-been-deprecated.patch
deleted file mode 100644
index 2313a324a0..0000000000
--- a/meta-python/recipes-devtools/python/python3-m2crypto/0001-Use-of-RSA_SSLV23_PADDING-has-been-deprecated.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From d06eaa88a5f491827733f32027c46de3557fbd05 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= <mcepl@cepl.eu>
-Date: Fri, 19 Feb 2021 15:53:02 +0100
-Subject: [PATCH] Use of RSA_SSLV23_PADDING has been deprecated.
-
-Fixes #293.
----
- tests/test_rsa.py | 5 -----
- 1 file changed, 5 deletions(-)
-
-diff --git a/tests/test_rsa.py b/tests/test_rsa.py
-index 3de5016..7299785 100644
---- a/tests/test_rsa.py
-+++ b/tests/test_rsa.py
-@@ -124,11 +124,6 @@ class RSATestCase(unittest.TestCase):
- ptxt = priv.private_decrypt(ctxt, p)
- self.assertEqual(ptxt, self.data)
-
-- # sslv23_padding
-- ctxt = priv.public_encrypt(self.data, RSA.sslv23_padding)
-- res = priv.private_decrypt(ctxt, RSA.sslv23_padding)
-- self.assertEqual(res, self.data)
--
- # no_padding
- with six.assertRaisesRegex(self, RSA.RSAError, 'data too small'):
- priv.public_encrypt(self.data, RSA.no_padding)
---
-2.29.2
-
diff --git a/meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-address-openssl-3.x-build-issue.patch b/meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-address-openssl-3.x-build-issue.patch
new file mode 100644
index 0000000000..c67e50803b
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-address-openssl-3.x-build-issue.patch
@@ -0,0 +1,28 @@
+From 0d824e5c2ab13e761ffaeabdccf9513d5b8f280d Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Fri, 8 Oct 2021 11:18:35 +0200
+Subject: [PATCH] setup.py: address openssl 3.x build issue
+
+swig throws:
+| /home/alex/development/poky/build-metaoe/tmp/work/x86_64-linux/python3-m2crypto-native/0.38.0-r0/recipe-sysroot-native/usr/include/openssl/macros.h:155: Error: CPP #error ""OPENSSL_API_COMPAT expresses an impossible API compatibility level"". Use the -cpperraswarn option to continue swig processing.
+
+I'm not sure why; upstream should take a look.
+
+Upstream-Status: Inappropriate [workaround]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ setup.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/setup.py b/setup.py
+index 2c65404..74704bc 100644
+--- a/setup.py
++++ b/setup.py
+@@ -192,6 +192,7 @@ class _M2CryptoBuildExt(build_ext.build_ext):
+
+ self.swig_opts.append('-includeall')
+ self.swig_opts.append('-modern')
++ self.swig_opts.append('-cpperraswarn')
+ self.swig_opts.append('-builtin')
+
+ # These two lines are a workaround for
diff --git a/meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch b/meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch
index f4c74384f9..0baadfcaa5 100644
--- a/meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch
+++ b/meta-python/recipes-devtools/python/python3-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] setup.py: link in sysroot, not in host directories
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
-Upstream-status: Unknown
+Upstream-Status: Pending [Unknown]
---
setup.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta-python/recipes-devtools/python/python3-m2crypto/avoid-host-contamination.patch b/meta-python/recipes-devtools/python/python3-m2crypto/avoid-host-contamination.patch
new file mode 100644
index 0000000000..3cd6f7c276
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-m2crypto/avoid-host-contamination.patch
@@ -0,0 +1,23 @@
+Filter out '/usr/include' for swig to avoid host contamination issue.
+
+Upstream-Status: Inappropriate [cross compile specific]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ setup.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 5a12981..389d49f 100644
+--- a/setup.py
++++ b/setup.py
+@@ -153,7 +153,8 @@ class _M2CryptoBuildExt(build_ext.build_ext):
+ self.swig_opts.append('-py3')
+
+ # swig seems to need the default header file directories
+- self.swig_opts.extend(['-I%s' % i for i in _get_additional_includes()])
++ self.swig_opts.extend(['-I%s' % i for i in _get_additional_includes()
++ if i != '/usr/include'])
+
+ log.debug('self.include_dirs = %s', self.include_dirs)
+ log.debug('self.library_dirs = %s', self.library_dirs)
diff --git a/meta-python/recipes-devtools/python/python3-m2crypto/cross-compile-platform.patch b/meta-python/recipes-devtools/python/python3-m2crypto/cross-compile-platform.patch
index f039ae8665..77ef7e557e 100644
--- a/meta-python/recipes-devtools/python/python3-m2crypto/cross-compile-platform.patch
+++ b/meta-python/recipes-devtools/python/python3-m2crypto/cross-compile-platform.patch
@@ -6,7 +6,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- a/setup.py
+++ b/setup.py
-@@ -169,22 +169,6 @@ class _M2CryptoBuildExt(build_ext.build_
+@@ -169,24 +169,6 @@ class _M2CryptoBuildExt(build_ext.build_
log.debug('self.include_dirs = %s', self.include_dirs)
log.debug('self.library_dirs = %s', self.library_dirs)
@@ -25,6 +25,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
- self.swig_opts.append('-D%s' % arch)
- if mach in ('ppc64le', 'ppc64el'):
- self.swig_opts.append('-D_CALL_ELF=2')
+- if mach in ('arm64_be'):
+- self.swig_opts.append('-D__AARCH64EB__')
-
self.swig_opts.extend(['-I%s' % i for i in self.include_dirs])