From 4a64ed53d96bea0ad0d248e39d945842293cbb5d Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Dec 14 2015 17:00:03 +0000 Subject: Update to 0.13 - Modernize spec --- diff --git a/.gitignore b/.gitignore index be68342..f601648 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /ecdsa-0.10-clean.tar.gz /ecdsa-0.11-clean.tar.gz +/ecdsa-0.13.tar.gz diff --git a/python-ecdsa-noweak.patch b/python-ecdsa-noweak.patch new file mode 100644 index 0000000..0584596 --- /dev/null +++ b/python-ecdsa-noweak.patch @@ -0,0 +1,34 @@ +diff -up ecdsa-0.13/ecdsa/test_pyecdsa.py.noweak ecdsa-0.13/ecdsa/test_pyecdsa.py +--- ecdsa-0.13/ecdsa/test_pyecdsa.py.noweak 2015-02-07 11:16:22.000000000 -0700 ++++ ecdsa-0.13/ecdsa/test_pyecdsa.py 2015-12-14 09:56:23.085656270 -0700 +@@ -8,7 +8,7 @@ import subprocess + from binascii import hexlify, unhexlify + from hashlib import sha1, sha256, sha512 + +-from .six import b, print_, binary_type ++from six import b, print_, binary_type + from .keys import SigningKey, VerifyingKey + from .keys import BadSignatureError + from . import util +@@ -331,10 +331,6 @@ class OpenSSL(unittest.TestCase): + # vk: 3:OpenSSL->python 4:python->OpenSSL + # sig: 5:OpenSSL->python 6:python->OpenSSL + +- def test_from_openssl_nist192p(self): +- return self.do_test_from_openssl(NIST192p) +- def test_from_openssl_nist224p(self): +- return self.do_test_from_openssl(NIST224p) + def test_from_openssl_nist256p(self): + return self.do_test_from_openssl(NIST256p) + def test_from_openssl_nist384p(self): +@@ -370,10 +366,6 @@ class OpenSSL(unittest.TestCase): + sig = sk.sign(data) + self.assertTrue(vk.verify(sig, data)) + +- def test_to_openssl_nist192p(self): +- self.do_test_to_openssl(NIST192p) +- def test_to_openssl_nist224p(self): +- self.do_test_to_openssl(NIST224p) + def test_to_openssl_nist256p(self): + self.do_test_to_openssl(NIST256p) + def test_to_openssl_nist384p(self): diff --git a/python-ecdsa.spec b/python-ecdsa.spec index fd885b1..2f3d4ca 100644 --- a/python-ecdsa.spec +++ b/python-ecdsa.spec @@ -9,16 +9,15 @@ %global srcname ecdsa Name: python-%{srcname} -Version: 0.11 -Release: 5%{?dist} +Version: 0.13 +Release: 1%{?dist} Summary: ECDSA cryptographic signature library License: MIT URL: https://pypi.python.org/pypi/ecdsa -# Remove the prime192v1 and secp224r1 curves for now -# https://bugzilla.redhat.com/show_bug.cgi?id=1067697 -Source0: %{srcname}-%{version}-clean.tar.gz -#Source0: https://pypi.python.org/packages/source/e/%{srcname}/%{srcname}-%{version}.tar.gz +Source0: https://pypi.python.org/packages/source/e/%{srcname}/%{srcname}-%{version}.tar.gz +# Fedora's openssl does not support 192 and 224 bit keys, so don't test against that +Patch0: python-ecdsa-noweak.patch BuildArch: noarch BuildRequires: python2-devel @@ -31,7 +30,6 @@ BuildRequires: python3-six %endif # For tests BuildRequires: openssl -Requires: python-six %description This is an easy-to-use implementation of ECDSA cryptography (Elliptic Curve @@ -41,12 +39,24 @@ key and verifying key), sign messages, and verify the signatures. The keys and signatures are very short, making them easy to handle and incorporate into other protocols. -NOTE: The prime192v1 and secp224r1 curves are currently disabled. +%package -n python2-%{srcname} +Summary: ECDSA cryptographic signature library +Requires: python-six +%{?python_provide:%python_provide python2-%{srcname}} + +%description -n python2-%{srcname} +This is an easy-to-use implementation of ECDSA cryptography (Elliptic Curve +Digital Signature Algorithm), implemented purely in Python, released under +the MIT license. With this library, you can quickly create keypairs (signing +key and verifying key), sign messages, and verify the signatures. The keys +and signatures are very short, making them easy to handle and incorporate +into other protocols. %if 0%{?with_python3} %package -n python3-%{srcname} Summary: ECDSA cryptographic signature library Requires: python3-six +%{?python_provide:%python_provide python2-%{srcname}} %description -n python3-%{srcname} This is an easy-to-use implementation of ECDSA cryptography (Elliptic Curve @@ -55,13 +65,12 @@ the MIT license. With this library, you can quickly create keypairs (signing key and verifying key), sign messages, and verify the signatures. The keys and signatures are very short, making them easy to handle and incorporate into other protocols. - -NOTE: The prime192v1 and secp224r1 curves are currently disabled. %endif # with_python3 %prep -%setup -q -n %{srcname}-%{version}-clean +%setup -q -n %{srcname}-%{version} +%patch0 -p1 -b .noweak rm -rf %{srcname}.egg-info # Remove extraneous #! find ecdsa -name \*.py | xargs sed -ie '/\/usr\/bin\/env/d' @@ -69,28 +78,18 @@ find ecdsa -name \*.py | xargs sed -ie '/\/usr\/bin\/env/d' find -name \*.py | xargs sed -ie 's/from \(ecdsa\|\)\.six/from six/g' rm ecdsa/six.py -%if 0%{?with_python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' -%endif # with_python3 - %build %{__python2} setup.py build %if 0%{?with_python3} -pushd %{py3dir} %{__python3} setup.py build -popd %endif # with_python3 %install %if 0%{?with_python3} -pushd %{py3dir} %{__python3} setup.py install --skip-build --root %{buildroot} -popd %endif # with_python3 %{__python2} setup.py install --skip-build --root %{buildroot} @@ -100,13 +99,11 @@ popd %{__python2} setup.py test %if 0%{?with_python3} -pushd %{py3dir} %{__python3} setup.py test -popd %endif # with_python3 -%files +%files -n python2-%{srcname} %doc LICENSE NEWS PKG-INFO README.md %{python2_sitelib}/* @@ -118,6 +115,10 @@ popd %changelog +* Mon Dec 14 2015 Orion Poplawski - 0.13-1 +- Update to 0.13 +- Modernize spec + * Tue Nov 10 2015 Fedora Release Engineering - 0.11-5 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 diff --git a/sources b/sources index 5215b66..a9331a0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ad52ce932b8082a2a431ac5047bd7040 ecdsa-0.11-clean.tar.gz +1f60eda9cb5c46722856db41a3ae6670 ecdsa-0.13.tar.gz