forked from pool/python-cryptography
- update to 1.1: * Added support for Elliptic Curve Diffie-Hellman with :class:`~cryptography.hazmat.primitives.asymmetric.ec.ECDH`. * Added :class:`~cryptography.hazmat.primitives.kdf.x963kdf.X963KDF`. * Added support for parsing certificate revocation lists (CRLs) using :func:`~cryptography.x509.load_pem_x509_crl` and :func:`~cryptography.x509.load_der_x509_crl`. * Add support for AES key wrapping with :func:`~cryptography.hazmat.primitives.keywrap.aes_key_wrap` and :func:`~cryptography.hazmat.primitives.keywrap.aes_key_unwrap`. * Added a ``__hash__`` method to :class:`~cryptography.x509.Name`. * Add support for encoding and decoding elliptic curve points to a byte string form using :meth:`~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicNumbers.encode_point` and :meth:`~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePublicNumbers.from_encoded_point`. * Added :meth:`~cryptography.x509.Extensions.get_extension_for_class`. * :class:`~cryptography.x509.CertificatePolicies` are now supported in the :class:`~cryptography.x509.CertificateBuilder`. * ``countryName`` is now encoded as a ``PrintableString`` when creating subject and issuer distinguished names with the Certificate and CSR builder classes. * **SECURITY ISSUE**: The OpenSSL backend prior to 1.0.2 made extensive use of assertions to check response codes where our tests could not trigger a failure. However, when Python is run with ``-O`` these asserts are optimized away. If a user ran Python with this flag and got an invalid response code this could result in undefined behavior or worse. Accordingly, all response checks from the OpenSSL backend have been converted from ``assert`` to a true function call. Credit **Emilia Käsper (Google Security Team)** for the report. * We now ship OS X wheels that statically link OpenSSL by default. When OBS-URL: https://build.opensuse.org/request/show/343324 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cryptography?expand=0&rev=23
105 lines
3.6 KiB
RPMSpec
105 lines
3.6 KiB
RPMSpec
#
|
|
# spec file for package python-cryptography
|
|
#
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: python-cryptography
|
|
Version: 1.1
|
|
Release: 0
|
|
Summary: Python library which exposes cryptographic recipes and primitives
|
|
License: Apache-2.0
|
|
Group: Development/Languages/Python
|
|
Url: https://cryptography.io/en/latest/
|
|
Source0: https://pypi.python.org/packages/source/c/cryptography/cryptography-%{version}.tar.gz
|
|
Source1: https://pypi.python.org/packages/source/c/cryptography/cryptography-%{version}.tar.gz.asc
|
|
Source2: %{name}.keyring
|
|
Source3: https://pypi.python.org/packages/source/c/cryptography-vectors/cryptography_vectors-%{version}.tar.gz
|
|
Source4: https://pypi.python.org/packages/source/c/cryptography-vectors/cryptography_vectors-%{version}.tar.gz.asc
|
|
# PATCH-FIX-SLE disable-uneven-sizes-tests.patch bnc#944204
|
|
Patch1: disable-uneven-sizes-tests.patch
|
|
BuildRequires: libopenssl-devel
|
|
BuildRequires: python-cffi >= 1.1.0
|
|
BuildRequires: python-devel
|
|
BuildRequires: python-enum34
|
|
BuildRequires: python-hypothesis
|
|
BuildRequires: python-idna >= 2.0
|
|
BuildRequires: python-ipaddress
|
|
BuildRequires: python-pyasn1-modules
|
|
BuildRequires: python-setuptools
|
|
BuildRequires: python-six >= 1.4.1
|
|
BuildRequires: pkgconfig(libffi)
|
|
# Test requirements
|
|
BuildRequires: python-iso8601
|
|
BuildRequires: python-pretend
|
|
BuildRequires: python-pyasn1 >= 0.1.8
|
|
BuildRequires: python-pytest
|
|
BuildRequires: python-virtualenv
|
|
%requires_eq python-cffi
|
|
Requires: python-enum34
|
|
Requires: python-idna >= 2.0
|
|
Requires: python-ipaddress
|
|
Requires: python-pyasn1 >= 0.1.8
|
|
Requires: python-six >= 1.4.1
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%description
|
|
cryptography is a package designed to expose cryptographic
|
|
recipes and primitives to Python developers. Our goal is
|
|
for it to be your "cryptographic standard library". It
|
|
supports Python 2.6-2.7, Python 3.2+, and PyPy.
|
|
|
|
cryptography includes both high level recipes, and low
|
|
level interfaces to common cryptographic algorithms such as
|
|
symmetric ciphers, message digests and key derivation
|
|
functions.
|
|
|
|
%prep
|
|
%setup -q -n cryptography-%{version}
|
|
|
|
# prepare vectors module
|
|
tar xvzf %{SOURCE3}
|
|
|
|
%patch1 -p1
|
|
|
|
%build
|
|
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build
|
|
|
|
%install
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
|
|
%check
|
|
# this is going to be fun
|
|
# create virtualenv
|
|
virtualenv --system-site-packages TESTROOT
|
|
. TESTROOT/bin/activate
|
|
# install package in virtualenv
|
|
python setup.py install
|
|
# install cryptography vectors
|
|
(cd cryptography_vectors-%{version} && python setup.py install)
|
|
# run tests with virtualenv'd python
|
|
# (specify "tests" directory, otherwise py.test discovers tests in virtualenv'd setuptools)
|
|
python /usr/bin/py.test tests
|
|
# finish
|
|
deactivate
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc AUTHORS.rst CONTRIBUTING.rst CHANGELOG.rst LICENSE README.rst
|
|
%{python_sitearch}/cryptography/
|
|
%{python_sitearch}/cryptography-%{version}-py%{py_ver}.egg-info/
|
|
|
|
%changelog
|