Fix more issues with gating tests

This commit is contained in:
Christian Heimes 2022-01-24 10:35:14 +00:00
parent 7b4151100c
commit 9744c756c6
3 changed files with 35 additions and 2 deletions

View File

@ -0,0 +1,22 @@
From 076560a9507bbe26180f499adf750bc3851b97e8 Mon Sep 17 00:00:00 2001
From: Alex Gaynor <alex.gaynor@gmail.com>
Date: Mon, 11 Oct 2021 09:43:28 -0400
Subject: [PATCH] Specify the out length when obtaining the tag for poly1305
---
src/cryptography/hazmat/backends/openssl/poly1305.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cryptography/hazmat/backends/openssl/poly1305.py b/src/cryptography/hazmat/backends/openssl/poly1305.py
index 35f6819ce8..2ddae9847a 100644
--- a/src/cryptography/hazmat/backends/openssl/poly1305.py
+++ b/src/cryptography/hazmat/backends/openssl/poly1305.py
@@ -51,7 +51,7 @@ def update(self, data):
def finalize(self):
buf = self._backend._ffi.new("unsigned char[]", _POLY1305_TAG_SIZE)
- outlen = self._backend._ffi.new("size_t *")
+ outlen = self._backend._ffi.new("size_t *", _POLY1305_TAG_SIZE)
res = self._backend._lib.EVP_DigestSignFinal(self._ctx, buf, outlen)
self._backend.openssl_assert(res != 0)
self._backend.openssl_assert(outlen[0] == _POLY1305_TAG_SIZE)

View File

@ -7,7 +7,7 @@
Name: python-%{srcname}
Version: 3.4.7
Release: 5%{?dist}
Release: 6%{?dist}
Summary: PyCA's cryptography library
License: ASL 2.0 or BSD
@ -23,6 +23,8 @@ Patch2: 0002-WIP-3.0.0-support-5250.patch
Patch3: 0003-switch-to-using-EVP_PKEY_derive-instead-of-DH_comput.patch
Patch4: 0004-3.0.0-deprecated-func-and-it-isn-t-useful-to-us-in-g.patch
Patch5: 0005-remove-unneeded-binding-6150.patch
# OpenSSL 3.0.1 patches
Patch6: 0006-Specify-the-out-length-for-poly1305.patch
ExclusiveArch: %{rust_arches}
@ -122,6 +124,10 @@ PYTHONPATH=${PWD}/vectors:%{buildroot}%{python3_sitearch} \
%{python3_sitearch}/%{srcname}-%{version}-py*.egg-info
%changelog
* Tue Jan 18 2022 Christian Heimes <cheimes@redhat.com> - 3.4.7-6
- Fix gating issues, resolves: rhbz#2039768
- Fix poly1305 test, resolves: rhbz#2043582
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 3.4.7-5
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688

View File

@ -13,7 +13,9 @@
required_packages:
- python3-cryptography
- python3-pytest
- python3-pretend
- python3-pytest-subtests
environment:
PYTHONPATH: "{{ srcdir }}/vectors"
tests:
- remove_hypothesis:
# remove tests that depend on python3-hypothesis package
@ -27,6 +29,9 @@
# scrypt tests require more memory than available
dir: "source"
run: rm -f tests/hazmat/primitives/test_scrypt.py
- patch_conftest:
dir: "source"
run: "cat ../conftest-skipper.py >> tests/conftest.py"
# tests take some time, split up to avoid CI timeouts.
- unittests-basic:
dir: "source"