PyCA's cryptography library
Go to file
Fraser Tweedale 520cea6ec9 Fix AES-GCM with FIPS provider version mismatch
Add patch from upstream PR https://github.com/pyca/cryptography/pull/14819
to fix AESGCM failing when an older FIPS provider (e.g. OpenSSL 3.0.7)
is loaded alongside a newer main OpenSSL library (>= 3.2).

The fix adds a fallback mechanism that re-initializes cipher contexts
from stored parameters when EVP_CIPHER_CTX_copy fails, which can occur
due to version mismatches between the FIPS provider and main library.

Resolves: RHEL-173746
2026-05-16 15:31:32 +10:00
tests Update to 48.0.0 2026-05-16 15:31:32 +10:00
.gitignore Update to 48.0.0 2026-05-16 15:31:32 +10:00
14819.patch Fix AES-GCM with FIPS provider version mismatch 2026-05-16 15:31:32 +10:00
changelog Fix AES-GCM with FIPS provider version mismatch 2026-05-16 15:31:32 +10:00
conftest-skipper.py Skip iso8601 and pretend tests on RHEL 2021-02-12 16:47:08 +01:00
gating.yaml Added gating.yaml and tests for python-cryptography 2024-06-26 15:27:18 +05:30
python-cryptography.spec Fix AES-GCM with FIPS provider version mismatch 2026-05-16 15:31:32 +10:00
README.md Update to 3.4.7, use vectors from sources (#1952024) 2021-04-22 08:07:57 +02:00
sources Update to 48.0.0 2026-05-16 15:31:32 +10:00
stepdown-cffi-and-maturin.patch Update to 48.0.0 2026-05-16 15:31:32 +10:00
vendor_rust.py Update to 43.0.0 2024-08-22 10:26:35 +02:00

PyCA cryptography

https://cryptography.io/en/latest/

Packaging python-cryptography

The example assumes

  • Fedora Rawhide (f34)
  • PyCA cryptography release 3.4
  • Update Bugzilla issue is RHBZ#00000001

Build new python-cryptography

Switch and update branch

fedpkg switch-branch rawhide
fedpkg pull

Bump version and get sources

rpmdev-bumpspec -c "Update to 3.4 (#00000001)" -n 3.4 python-cryptography.spec
spectool -gf python-cryptography.spec

Upload new source

fedpkg new-sources cryptography-3.4.tar.gz

Commit changes

fedpkg commit --clog
fedpkg push

Build

fedpkg build

RHEL/CentOS builds

RHEL and CentOS use a different approach for Rust crates packaging than Fedora. On Fedora Rust dependencies are packaged as RPMs, e.g. rust-pyo3+default-devel RPM. These packages don't exist on RHEL and CentOS. Instead python-cryptography uses a tar ball with vendored crates. The tar ball is created by a script:

./vendor_rust.py
rhpkg upload cryptography-3.4-vendor.tar.bz2