1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-05-07 04:58:57 +00:00

Revert "meta-arm: add old version of python3-cryptography"

This reverts commit a15c16068a.

Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Ross Burton
2022-01-27 16:54:19 +00:00
committed by Jon Mason
parent 778236335a
commit 8a42328437
5 changed files with 0 additions and 145 deletions
-3
View File
@@ -19,6 +19,3 @@ LAYERDEPENDS_meta-arm-bsp:append:musca-s1 = " meta-python"
# Additional license directories.
LICENSE_PATH += "${LAYERDIR}/custom-licenses"
# Delete this when our downgrade of python3-cryptography is removed
BBMASK += "meta-arm-bsp/recipes-devtools/python/python3-cryptography_3.3.2.bb"
@@ -1,10 +0,0 @@
--- a/tests/hypothesis/__init__.py
+++ b/tests/hypothesis/__init__.py
@@ -3,3 +3,7 @@
# for complete details.
from __future__ import absolute_import, division, print_function
+
+import pytest
+hypothesis = pytest.importorskip("hypothesis")
+
@@ -1,62 +0,0 @@
Encourage our old python3-cryptography to at least start to work with OpenSSL 3.
- Backport one patch to err.py to remove a symbol which has been removed in
OpenSSL 3, and isn't used in python3-cryptography.
(50ec692749b7e2e62685b443f5e629627b03987e)
- Backport the detection of OpenSSL 3 and don't link to FIPS_mode/FIPS_mode_set
(parts of f08a7de651f9e6475c8c0a67d2a61ed8b669ddf6)
This is *not* a complete backport of the 3.0 support, but is enough that packages
such as imgtool can import python3-cryptography and operate until the upgrade is
ready.
Upstream-Status: Inappropriate
Signed-off-by: Ross Burton <ross.burton@arm.com>
diff --git a/src/_cffi_src/openssl/cryptography.py b/src/_cffi_src/openssl/cryptography.py
index f24bee5a..920a86de 100644
--- a/src/_cffi_src/openssl/cryptography.py
+++ b/src/_cffi_src/openssl/cryptography.py
@@ -35,6 +35,8 @@ INCLUDES = """
#define CRYPTOGRAPHY_OPENSSL_110F_OR_GREATER \
(OPENSSL_VERSION_NUMBER >= 0x1010006f && !CRYPTOGRAPHY_IS_LIBRESSL)
+#define CRYPTOGRAPHY_OPENSSL_300_OR_GREATER \
+ (OPENSSL_VERSION_NUMBER >= 0x30000000 && !CRYPTOGRAPHY_IS_LIBRESSL)
#define CRYPTOGRAPHY_OPENSSL_LESS_THAN_110J \
(OPENSSL_VERSION_NUMBER < 0x101000af || CRYPTOGRAPHY_IS_LIBRESSL)
@@ -54,6 +56,7 @@ INCLUDES = """
TYPES = """
static const int CRYPTOGRAPHY_OPENSSL_110F_OR_GREATER;
+static const int CRYPTOGRAPHY_OPENSSL_300_OR_GREATER;
static const int CRYPTOGRAPHY_OPENSSL_LESS_THAN_111;
static const int CRYPTOGRAPHY_OPENSSL_LESS_THAN_111B;
diff --git a/src/_cffi_src/openssl/err.py b/src/_cffi_src/openssl/err.py
index 0dd74146..42bab4d9 100644
--- a/src/_cffi_src/openssl/err.py
+++ b/src/_cffi_src/openssl/err.py
@@ -40,7 +40,6 @@ void ERR_clear_error(void);
void ERR_put_error(int, int, int, const char *, int);
int ERR_GET_LIB(unsigned long);
-int ERR_GET_FUNC(unsigned long);
int ERR_GET_REASON(unsigned long);
"""
diff --git a/src/_cffi_src/openssl/fips.py b/src/_cffi_src/openssl/fips.py
index c92bca49..38bfa231 100644
--- a/src/_cffi_src/openssl/fips.py
+++ b/src/_cffi_src/openssl/fips.py
@@ -18,7 +18,7 @@ int FIPS_mode(void);
"""
CUSTOMIZATIONS = """
-#if CRYPTOGRAPHY_IS_LIBRESSL
+#if CRYPTOGRAPHY_IS_LIBRESSL || CRYPTOGRAPHY_OPENSSL_300_OR_GREATER
static const long Cryptography_HAS_FIPS = 0;
int (*FIPS_mode_set)(int) = NULL;
int (*FIPS_mode)(void) = NULL;
@@ -1,2 +0,0 @@
#!/bin/sh
py.test
@@ -1,68 +0,0 @@
SUMMARY = "Provides cryptographic recipes and primitives to python developers"
HOMEPAGE = "https://cryptography.io/"
SECTION = "devel/python"
LICENSE = "Apache-2.0 | BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE;md5=bf405a8056a6647e7d077b0e7bc36aba \
file://LICENSE.APACHE;md5=4e168cce331e5c827d4c2b68a6200e1b \
file://LICENSE.BSD;md5=5ae30ba4123bc4f2fa49aa0b0dce887b"
LDSHARED += "-pthread"
SRC_URI[sha256sum] = "5a60d3780149e13b7a6ff7ad6526b38846354d11a15e21068e57073e29e19bed"
SRC_URI += " \
file://run-ptest \
file://h-test.patch \
file://openssl3.patch \
"
inherit pypi setuptools3
DEPENDS += " \
${PYTHON_PN}-cffi \
${PYTHON_PN}-cffi-native \
${PYTHON_PN}-asn1crypto \
${PYTHON_PN}-six \
"
RDEPENDS:${PN} += " \
${PYTHON_PN}-cffi \
${PYTHON_PN}-idna \
${PYTHON_PN}-asn1crypto \
${PYTHON_PN}-setuptools \
${PYTHON_PN}-six \
"
RDEPENDS:${PN}:class-target += " \
${PYTHON_PN}-cffi \
${PYTHON_PN}-idna \
${PYTHON_PN}-numbers \
${PYTHON_PN}-asn1crypto \
${PYTHON_PN}-setuptools \
${PYTHON_PN}-six \
${PYTHON_PN}-threading \
"
RDEPENDS:${PN}-ptest += " \
${PN} \
${PYTHON_PN}-cryptography-vectors \
${PYTHON_PN}-iso8601 \
${PYTHON_PN}-pretend \
${PYTHON_PN}-pytest \
${PYTHON_PN}-pytz \
"
inherit ptest
do_install_ptest() {
install -d ${D}${PTEST_PATH}/tests
cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
install -d ${D}${PTEST_PATH}/tests/hazmat
cp -rf ${S}/tests/hazmat/* ${D}${PTEST_PATH}/tests/hazmat/
}
FILES:${PN}-dbg += " \
${libdir}/${PYTHON_PN}2.7/site-packages/${SRCNAME}/hazmat/bindings/.debug \
"
BBCLASSEXTEND = "native nativesdk"