5bc286
%{!?python3_pkgversion:%global python3_pkgversion 3}
5bc286
5bc286
%global srcname cryptography
5bc286
5bc286
Name:           python-%{srcname}
d49da0
Version:        3.2.1
b572bf
Release:        5%{?dist}
5bc286
Summary:        PyCA's cryptography library
5bc286
5bc286
Group:          Development/Libraries
5bc286
License:        ASL 2.0 or BSD
5bc286
URL:            https://cryptography.io/en/latest/
5bc286
Source0:        https://pypi.io/packages/source/c/%{srcname}/%{srcname}-%{version}.tar.gz
5bc286
d49da0
Patch0001:      0001-Re-add-deprecated-and-removed-features.patch
d49da0
Patch0002:      0002-Support-pytest-3.4.2.patch
d49da0
Patch0003:	0003-Skip-iso8601-test-cases.patch
665e9b
Patch0004:	0004-Revert-remove-NPN-bindings.patch
3ce8d3
Patch0005:	0005-CVE-2020-36242.patch
5bc286
5bc286
BuildRequires:  openssl-devel
5bc286
BuildRequires:  gcc
5bc286
5bc286
BuildRequires:  python%{python3_pkgversion}-devel
d49da0
BuildRequires:  python%{python3_pkgversion}-pytest >= 3.4.2
5bc286
BuildRequires:  python%{python3_pkgversion}-setuptools
5bc286
BuildRequires:  python%{python3_pkgversion}-pretend
d49da0
# BuildRequires:  python{python3_pkgversion}-iso8601
5bc286
BuildRequires:  python%{python3_pkgversion}-cryptography-vectors = %{version}
5bc286
BuildRequires:  python%{python3_pkgversion}-pytz
5bc286
BuildRequires:  python%{python3_pkgversion}-six >= 1.4.1
5bc286
BuildRequires:  python%{python3_pkgversion}-cffi >= 1.7
5bc286
5bc286
%description
5bc286
cryptography is a package designed to expose cryptographic primitives and
5bc286
recipes to Python developers.
5bc286
5bc286
%package -n  python%{python3_pkgversion}-%{srcname}
5bc286
Group:          Development/Libraries
5bc286
Summary:        PyCA's cryptography library
5bc286
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
5bc286
5bc286
Requires:       openssl-libs
5bc286
Requires:       python%{python3_pkgversion}-six >= 1.4.1
5bc286
Requires:       python%{python3_pkgversion}-cffi >= 1.7
665e9b
Conflicts:      python%{python3_pkgversion}-cryptography-vectors < %{version}
665e9b
Conflicts:      python%{python3_pkgversion}-cryptography-vectors > %{version}
5bc286
5bc286
%description -n python%{python3_pkgversion}-%{srcname}
5bc286
cryptography is a package designed to expose cryptographic primitives and
5bc286
recipes to Python developers.
d49da0
5bc286
5bc286
%prep
5bc286
%autosetup -p1 -n %{srcname}-%{version}
5bc286
d49da0
5bc286
%build
5bc286
%py3_build
d49da0
5bc286
5bc286
%install
5bc286
# Actually other *.c and *.h are appropriate
5bc286
# see https://github.com/pyca/cryptography/issues/1463
5bc286
find . -name .keep -print -delete
5bc286
%py3_install
5bc286
5bc286
5bc286
%check
5bc286
# workaround for pytest 3.2.0 bug https://github.com/pytest-dev/pytest/issues/2644
5bc286
rm -f tests/hazmat/primitives/test_padding.py
d49da0
# don't run hypothesis tests
d49da0
rm -rf tests/hypothesis
d49da0
PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} -m pytest
d49da0
d49da0
5bc286
%files -n python%{python3_pkgversion}-%{srcname}
5bc286
%doc README.rst docs
5bc286
%license LICENSE LICENSE.APACHE LICENSE.BSD
5bc286
%{python3_sitearch}/%{srcname}
5bc286
%{python3_sitearch}/%{srcname}-%{version}-py*.egg-info
5bc286
5bc286
5bc286
%changelog
b572bf
* Tue Jun 08 2021 Christian Heimes <cheimes@redhat.com> - 3.2.1-5
b572bf
- Rebuild for RHEL 8.5
b572bf
- Resolves: rhbz#1933071
b572bf
3ce8d3
* Tue Feb 09 2021 Christian Heimes <cheimes@redhat.com> - 3.2.1-4
3ce8d3
- CVE-2020-36242: Fixed a bug where certain sequences of update() calls
3ce8d3
  when symmetrically encrypting very large payloads (>2GB) could result
3ce8d3
  in an integer overflow, leading to buffer overflows.
3ce8d3
- Resolves: rhbz#1926528
3ce8d3
665e9b
* Mon Dec 14 17:24:01 CET 2020 Christian Heimes <cheimes@redhat.com> - 3.2.1-3
665e9b
- Conflict with non-matching vector package
665e9b
665e9b
* Mon Dec 14 14:19:42 CET 2020 Christian Heimes <cheimes@redhat.com> - 3.2.1-2
665e9b
- Re-add remove NPN bindings, required for pyOpenSSL
665e9b
- Resolves: rhbz#1907429
665e9b
d49da0
* Wed Oct 28 2020 Christian Heimes <cheimes@redhat.com> - 3.2.1-1
d49da0
- Rebase to upstream release 3.2.1
d49da0
- Resolves: rhbz#1873581
d49da0
- Resolves: rhbz#1778939
d49da0
- Removed dependencies on python-asn1crypto, python-idna
d49da0
3f8b8d
* Tue Nov 12 2019 Christian Heimes <cheimes@redhat.com> - 2.3-3
3f8b8d
- Don't activate custom osrandom engine for FIPS compliance
3f8b8d
- Resolves: rhbz#1762667
3f8b8d
5bc286
* Mon Aug 13 2018 Christian Heimes <cheimes@redhat.com> - 2.3-2
5bc286
- Use TLSv1.2 in test as workaround for RHBZ#1615099
5bc286
- Resolves: RHBZ#1611738
5bc286
5bc286
* Wed Jul 18 2018 Christian Heimes <cheimes@redhat.com> - 2.3-1
5bc286
- New upstream release 2.3
5bc286
- Fix AEAD tag truncation bug, CVE-2018-10903, RHBZ#1602755, RHBZ#1602932
5bc286
5bc286
* Tue Jun 19 2018 Christian Heimes <cheimes@redhat.com> - 2.2.1-2
5bc286
- Drop Python 2 subpackages from RHEL 8, fixes RHBZ#1589754
5bc286
- Remove unnecessary copy and shebang mangling
5bc286
5bc286
* Wed Mar 21 2018 Christian Heimes <cheimes@redhat.com> - 2.2.1-1
5bc286
- New upstream release 2.2.1
5bc286
5bc286
* Sun Feb 18 2018 Christian Heimes <cheimes@redhat.com> - 2.1.4-1
5bc286
- New upstream release 2.1.4
5bc286
5bc286
* Sun Feb 18 2018 Christian Heimes <cheimes@redhat.com> - 2.1.3-4
5bc286
- Build requires gcc
5bc286
5bc286
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.1.3-3
5bc286
- Update Python 2 dependency declarations to new packaging standards
5bc286
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
5bc286
5bc286
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.3-2
5bc286
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
5bc286
5bc286
* Thu Nov 23 2017 Haïkel Guémar <hguemar@fedoraproject.org> - 2.1.3-1
5bc286
- Upstream 2.1.3
5bc286
5bc286
* Tue Oct 24 2017 Christian Heimes <cheimes@redhat.com> - 2.1-2
5bc286
- Change Requires to openssl-libs
5bc286
5bc286
* Thu Oct 12 2017 Christian Heimes <cheimes@redhat.com> - 2.1-1
5bc286
- New upstream release 2.1
5bc286
5bc286
* Wed Sep 27 2017 Troy Dawson <tdawson@redhat.com> - 2.0.2-3
5bc286
- Cleanup spec file conditionals
5bc286
5bc286
* Thu Aug 03 2017 Christian Heimes <cheimes@redhat.com> - 2.0.2-2
5bc286
- Add workaround for pytest bug
5bc286
5bc286
* Thu Aug 03 2017 Christian Heimes <cheimes@redhat.com> - 2.0.2-1
5bc286
- New upstream release 2.0.2
5bc286
- Modernize spec
5bc286
5bc286
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.9-3
5bc286
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
5bc286
5bc286
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.9-2
5bc286
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
5bc286
5bc286
* Tue Jun 27 2017 Christian Heimes <cheimes@redhat.com> - 1.9-1
5bc286
- Upstream release 1.9
5bc286
5bc286
* Wed Feb 15 2017 Christian Heimes <cheimes@redhat.com> - 1.7.2-1
5bc286
- Update to latest upstream
5bc286
5bc286
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.1-2
5bc286
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
5bc286
5bc286
* Thu Jan 05 2017 Matěj Cepl <mcepl@redhat.com> - 1.7.1-1
5bc286
- Update to the latest upstream.
5bc286
- Add a patch from https://github.com/pyca/cryptography/pull/3328
5bc286
5bc286
* Tue Dec 13 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.5.3-5
5bc286
- Enable tests
5bc286
5bc286
* Mon Dec 12 2016 Charalampos Stratakis <cstratak@redhat.com> - 1.5.3-4
5bc286
- Rebuild for Python 3.6
5bc286
- Disable python3 tests for now
5bc286
5bc286
* Thu Nov 10 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.5.3-3
5bc286
- Revert previous change
5bc286
5bc286
* Thu Nov 10 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.5.3-2
5bc286
- Disable tests on releases earlier than 24
5bc286
5bc286
* Mon Nov 07 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.5.3-1
5bc286
- Update to v1.5.3
5bc286
- Update source URL
5bc286
- Add BR for pytz
5bc286
5bc286
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-4
5bc286
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
5bc286
5bc286
* Tue May 10 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.3.1-3
5bc286
- Remove versioned setuptools dependency
5bc286
5bc286
* Tue May 10 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.3.1-2
5bc286
- Make it easier to build on EL7
5bc286
5bc286
* Tue May 03 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.3.1-1
5bc286
- Update to v1.3.1
5bc286
5bc286
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.1-3
5bc286
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
5bc286
5bc286
* Mon Jan 11 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.2.1-2
5bc286
- Move python-cryptograph => python2-cryptography
5bc286
5bc286
* Sat Jan 09 2016 Nathaniel McCallum <npmccallum@redhat.com> - 1.2.1-1
5bc286
- Update to v1.2.1
5bc286
5bc286
* Wed Nov 11 2015 Robert Kuska <rkuska@redhat.com> - 1.1-1
5bc286
- Update to v1.1
5bc286
5bc286
* Wed Nov 04 2015 Robert Kuska <rkuska@redhat.com> - 1.0.2-2
5bc286
- Rebuilt for Python3.5 rebuild
5bc286
5bc286
* Wed Sep 30 2015 Matěj Cepl <mcepl@redhat.com> - 1.0.2-1
5bc286
- New upstream release (fix #1267548)
5bc286
5bc286
* Wed Aug 12 2015 Nathaniel McCallum <npmccallum@redhat.com> - 1.0-1
5bc286
- New upstream release
5bc286
5bc286
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-2
5bc286
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
5bc286
5bc286
* Thu May 14 2015 Nathaniel McCallum <npmccallum@redhat.com> - 0.9-1
5bc286
- New upstream release
5bc286
- Run tests on RHEL
5bc286
- New deps: python-idna, python-ipaddress
5bc286
5bc286
* Fri Apr 17 2015 Nathaniel McCallum <npmccallum@redhat.com> - 0.8.2-1
5bc286
- New upstream release
5bc286
- Add python3-pyasn1 Requires (#1211073)
5bc286
5bc286
* Tue Apr 14 2015 Matej Cepl <mcepl@redhat.com> - 0.8-2
5bc286
- Add python-pyasn1 Requires (#1211073)
5bc286
5bc286
* Fri Mar 13 2015 Nathaniel McCallum <npmccallum@redhat.com> - 0.8-1
5bc286
- New upstream release
5bc286
- Remove upstreamed patch
5bc286
5bc286
* Wed Mar 04 2015 Nathaniel McCallum <npmccallum@redhat.com> - 0.7.2-2
5bc286
- Add python3-cryptography-vectors build requires
5bc286
- Add python-enum34 requires
5bc286
5bc286
* Tue Feb 03 2015 Nathaniel McCallum <npmccallum@redhat.com> - 0.7.2-1
5bc286
- New upstream release. BSD is now an optional license.
5bc286
- Fix test running on python3
5bc286
- Add upstream patch to fix test paths
5bc286
5bc286
* Fri Nov 07 2014 Matej Cepl <mcepl@redhat.com> - 0.6.1-2
5bc286
- Fix requires, for reasons why other development files were not
5bc286
  eliminated see https://github.com/pyca/cryptography/issues/1463.
5bc286
5bc286
* Wed Nov 05 2014 Matej Cepl <mcepl@redhat.com> - 0.6.1-1
5bc286
- New upstream release.
5bc286
5bc286
* Sun Jun 29 2014 Terry Chia <terrycwk1994@gmail.com> 0.4-1
5bc286
- initial version