diff options
author | Tim Orling <ticotimo@gmail.com> | 2022-01-15 21:29:04 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-01-18 08:59:58 -0800 |
commit | 8589b69f9ff283ec3ae990466bed3b84702eb8e1 (patch) | |
tree | 9fd5a6bfa76ae8c439b1b1afed94d770811d944b /meta-python/recipes-devtools/python/python3-cryptography/openssl3.patch | |
parent | 6fecc883380c4dcfbb642464061aa4c51a4626ee (diff) | |
download | meta-openembedded-8589b69f9ff283ec3ae990466bed3b84702eb8e1.tar.gz |
python3-cryptography: upgrade 3.3.2 -> 36.0.1
See https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst#3601---2021-12-14
for changes
* Add PSF-2.0 license and explicitly add checksums for the LICENSE files that
are packaged.
* RDEPENDS on python3-hypothesis (in oe-core) for ptest so we can drop the
patch for skipping.
* Drop backported patch for openssl3 support.
* inherit new setuptools_rust class (which inherits new pyo3 class, which
inherits cargo and python3-dir).
* RDEPENDS on python3-pytest-subtests for ptest
* Copy pyproject.toml for ptest as it defines the pytest.marker(s) needed
* Cleanup and alphabetize the RDEPENDS
* Use 'cargo bitbake' to generate the crate:// SRC_URIs
- Needed some hacks to the Cargo.toml in src/rust/ to make this work (probably
only package.repository was strictly required):
[package]
description = "cryptography includes both high level recipes and low level interfaces to common cryptographic algorithms such as symmetric ciphers, message digests, and key derivation functions."
homepage = "https://github.com/pyca/cryptography"
repository = "https://github.com/pyca/cryptography"
* Add patches to src/rust/Cargo.toml to fix cargo errors including pem version
* Add check-memfree.py to ptest to check for sufficient free memory
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-cryptography/openssl3.patch')
-rw-r--r-- | meta-python/recipes-devtools/python/python3-cryptography/openssl3.patch | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/meta-python/recipes-devtools/python/python3-cryptography/openssl3.patch b/meta-python/recipes-devtools/python/python3-cryptography/openssl3.patch deleted file mode 100644 index 25baa42cc9..0000000000 --- a/meta-python/recipes-devtools/python/python3-cryptography/openssl3.patch +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | Encourage our old python3-cryptography to at least start to work with OpenSSL 3. | ||
2 | |||
3 | - Backport one patch to err.py to remove a symbol which has been removed in | ||
4 | OpenSSL 3, and isn't used in python3-cryptography. | ||
5 | (50ec692749b7e2e62685b443f5e629627b03987e) | ||
6 | |||
7 | - Backport the detection of OpenSSL 3 and don't link to FIPS_mode/FIPS_mode_set | ||
8 | (parts of f08a7de651f9e6475c8c0a67d2a61ed8b669ddf6) | ||
9 | |||
10 | This is *not* a complete backport of the 3.0 support, but is enough that packages | ||
11 | such as imgtool can import python3-cryptography and operate until the upgrade is | ||
12 | ready. | ||
13 | |||
14 | Upstream-Status: Inappropriate | ||
15 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
16 | |||
17 | diff --git a/src/_cffi_src/openssl/cryptography.py b/src/_cffi_src/openssl/cryptography.py | ||
18 | index f24bee5a..920a86de 100644 | ||
19 | --- a/src/_cffi_src/openssl/cryptography.py | ||
20 | +++ b/src/_cffi_src/openssl/cryptography.py | ||
21 | @@ -35,6 +35,8 @@ INCLUDES = """ | ||
22 | |||
23 | #define CRYPTOGRAPHY_OPENSSL_110F_OR_GREATER \ | ||
24 | (OPENSSL_VERSION_NUMBER >= 0x1010006f && !CRYPTOGRAPHY_IS_LIBRESSL) | ||
25 | +#define CRYPTOGRAPHY_OPENSSL_300_OR_GREATER \ | ||
26 | + (OPENSSL_VERSION_NUMBER >= 0x30000000 && !CRYPTOGRAPHY_IS_LIBRESSL) | ||
27 | |||
28 | #define CRYPTOGRAPHY_OPENSSL_LESS_THAN_110J \ | ||
29 | (OPENSSL_VERSION_NUMBER < 0x101000af || CRYPTOGRAPHY_IS_LIBRESSL) | ||
30 | @@ -54,6 +56,7 @@ INCLUDES = """ | ||
31 | |||
32 | TYPES = """ | ||
33 | static const int CRYPTOGRAPHY_OPENSSL_110F_OR_GREATER; | ||
34 | +static const int CRYPTOGRAPHY_OPENSSL_300_OR_GREATER; | ||
35 | |||
36 | static const int CRYPTOGRAPHY_OPENSSL_LESS_THAN_111; | ||
37 | static const int CRYPTOGRAPHY_OPENSSL_LESS_THAN_111B; | ||
38 | diff --git a/src/_cffi_src/openssl/err.py b/src/_cffi_src/openssl/err.py | ||
39 | index 0dd74146..42bab4d9 100644 | ||
40 | --- a/src/_cffi_src/openssl/err.py | ||
41 | +++ b/src/_cffi_src/openssl/err.py | ||
42 | @@ -40,7 +40,6 @@ void ERR_clear_error(void); | ||
43 | void ERR_put_error(int, int, int, const char *, int); | ||
44 | |||
45 | int ERR_GET_LIB(unsigned long); | ||
46 | -int ERR_GET_FUNC(unsigned long); | ||
47 | int ERR_GET_REASON(unsigned long); | ||
48 | |||
49 | """ | ||
50 | diff --git a/src/_cffi_src/openssl/fips.py b/src/_cffi_src/openssl/fips.py | ||
51 | index c92bca49..38bfa231 100644 | ||
52 | --- a/src/_cffi_src/openssl/fips.py | ||
53 | +++ b/src/_cffi_src/openssl/fips.py | ||
54 | @@ -18,7 +18,7 @@ int FIPS_mode(void); | ||
55 | """ | ||
56 | |||
57 | CUSTOMIZATIONS = """ | ||
58 | -#if CRYPTOGRAPHY_IS_LIBRESSL | ||
59 | +#if CRYPTOGRAPHY_IS_LIBRESSL || CRYPTOGRAPHY_OPENSSL_300_OR_GREATER | ||
60 | static const long Cryptography_HAS_FIPS = 0; | ||
61 | int (*FIPS_mode_set)(int) = NULL; | ||
62 | int (*FIPS_mode)(void) = NULL; | ||