Hello community, here is the log from the commit of package python-rsa for openSUSE:Factory checked in at 2015-05-16 19:02:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-rsa (Old) and /work/SRC/openSUSE:Factory/.python-rsa.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-rsa" Changes: -------- --- /work/SRC/openSUSE:Factory/python-rsa/python-rsa.changes 2014-11-18 22:45:45.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python-rsa.new/python-rsa.changes 2015-05-16 19:02:03.000000000 +0200 @@ -1,0 +2,10 @@ +Tue May 12 14:50:12 UTC 2015 - [email protected] + +- update to version 3.1.4: + * no changelog available +- add test dependency python-unittest2 +- fix update-alternatives +- run the tests with run_tests.py +- add README.rst to the package documentation + +------------------------------------------------------------------- Old: ---- rsa-3.1.2.tar.gz New: ---- rsa-3.1.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-rsa.spec ++++++ --- /var/tmp/diff_new_pack.Mxkbko/_old 2015-05-16 19:02:03.000000000 +0200 +++ /var/tmp/diff_new_pack.Mxkbko/_new 2015-05-16 19:02:03.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-rsa # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# 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 @@ -17,7 +17,7 @@ Name: python-rsa -Version: 3.1.2 +Version: 3.1.4 Release: 0 Url: http://stuvel.eu/rsa Summary: Pure-Python RSA Implementation @@ -28,6 +28,7 @@ BuildRequires: python-devel BuildRequires: python-pyasn1 BuildRequires: python-setuptools +BuildRequires: python-unittest2 Requires: python-pyasn1 Requires(post): update-alternatives Requires(postun): update-alternatives @@ -58,17 +59,17 @@ %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} -ln -s %{_bindir}/pyrsa-priv2pub-%{py_ver} %{buildroot}%{_bindir}/pyrsa-priv2pub -ln -s %{_bindir}/pyrsa-keygen-%{py_ver} %{buildroot}%{_bindir}/pyrsa-keygen -ln -s %{_bindir}/pyrsa-encrypt-%{py_ver} %{buildroot}%{_bindir}/pyrsa-encrypt -ln -s %{_bindir}/pyrsa-decrypt-%{py_ver} %{buildroot}%{_bindir}/pyrsa-decrypt -ln -s %{_bindir}/pyrsa-sign-%{py_ver} %{buildroot}%{_bindir}/pyrsa-sign -ln -s %{_bindir}/pyrsa-verify-%{py_ver} %{buildroot}%{_bindir}/pyrsa-verify -ln -s %{_bindir}/pyrsa-encrypt-bigfile-%{py_ver} %{buildroot}%{_bindir}/pyrsa-encrypt-bigfile -ln -s %{_bindir}/pyrsa-decrypt-bigfile-%{py_ver} %{buildroot}%{_bindir}/pyrsa-decrypt-bigfile + +# for update-alternatives +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +for f in pyrsa-priv2pub pyrsa-keygen pyrsa-encrypt pyrsa-decrypt pyrsa-sign \ + pyrsa-verify pyrsa-encrypt-bigfile pyrsa-decrypt-bigfile; do + touch %{buildroot}%{_sysconfdir}/alternatives/$f + ln -sf %{_sysconfdir}/alternatives/$f %{buildroot}%{_bindir}/$f +done %check -python setup.py test +python run_tests.py %pre # Since binaries became ghosted to be used with update-alternatives, we have to get rid @@ -100,22 +101,30 @@ %files %defattr(-,root,root,-) -%doc LICENSE -%ghost %{_bindir}/pyrsa-priv2pub +%doc LICENSE README.rst +%ghost %{_sysconfdir}/alternatives/pyrsa-priv2pub +%ghost %{_sysconfdir}/alternatives/pyrsa-keygen +%ghost %{_sysconfdir}/alternatives/pyrsa-encrypt +%ghost %{_sysconfdir}/alternatives/pyrsa-decrypt +%ghost %{_sysconfdir}/alternatives/pyrsa-sign +%ghost %{_sysconfdir}/alternatives/pyrsa-verify +%ghost %{_sysconfdir}/alternatives/pyrsa-encrypt-bigfile +%ghost %{_sysconfdir}/alternatives/pyrsa-decrypt-bigfile +%{_bindir}/pyrsa-priv2pub %{_bindir}/pyrsa-priv2pub-%{py_ver} -%ghost %{_bindir}/pyrsa-keygen +%{_bindir}/pyrsa-keygen %{_bindir}/pyrsa-keygen-%{py_ver} -%ghost %{_bindir}/pyrsa-encrypt +%{_bindir}/pyrsa-encrypt %{_bindir}/pyrsa-encrypt-%{py_ver} -%ghost %{_bindir}/pyrsa-decrypt +%{_bindir}/pyrsa-decrypt %{_bindir}/pyrsa-decrypt-%{py_ver} -%ghost %{_bindir}/pyrsa-sign +%{_bindir}/pyrsa-sign %{_bindir}/pyrsa-sign-%{py_ver} -%ghost %{_bindir}/pyrsa-verify +%{_bindir}/pyrsa-verify %{_bindir}/pyrsa-verify-%{py_ver} -%ghost %{_bindir}/pyrsa-encrypt-bigfile +%{_bindir}/pyrsa-encrypt-bigfile %{_bindir}/pyrsa-encrypt-bigfile-%{py_ver} -%ghost %{_bindir}/pyrsa-decrypt-bigfile +%{_bindir}/pyrsa-decrypt-bigfile %{_bindir}/pyrsa-decrypt-bigfile-%{py_ver} %{python_sitelib}/* ++++++ rsa-3.1.2.tar.gz -> rsa-3.1.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-3.1.2/PKG-INFO new/rsa-3.1.4/PKG-INFO --- old/rsa-3.1.2/PKG-INFO 2013-09-15 13:04:27.000000000 +0200 +++ new/rsa-3.1.4/PKG-INFO 2014-02-22 11:26:34.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: rsa -Version: 3.1.2 +Version: 3.1.4 Summary: Pure-Python RSA implementation Home-page: http://stuvel.eu/rsa Author: Sybren A. Stuvel @@ -15,9 +15,4 @@ Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2.6 -Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.2 -Classifier: Programming Language :: Python :: 3.3 Classifier: Topic :: Security :: Cryptography diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-3.1.2/playstuff.py new/rsa-3.1.4/playstuff.py --- old/rsa-3.1.2/playstuff.py 1970-01-01 01:00:00.000000000 +0100 +++ new/rsa-3.1.4/playstuff.py 2012-10-27 13:25:46.000000000 +0200 @@ -0,0 +1,41 @@ +#!/usr/bin/env python + +import re +import rsa + +def _logon( username, password ): + # Retrive the public key + # network stuff # req = urllib2.Request(AAA_GET_KEY, headers={'User-Agent': CLIENT_ID}) + # network stuff # response = urllib2.urlopen(req) + # network stuff # html = response.read() + # network stuff # print response.info() # DEBUG + # network stuff # print html # DEBUG + + # replacement for network stuff # + html="<x509PublicKey>30820122300d06092a864886f70d01010105000382010f003082010a0282010100dad8e3c084137bab285e869ae99a5de9752a095753680e9128adbe981e8141225704e558b8ee437836ec8c5460514efae61550bfdd883549981458bae388c9490b5ab43475068b169b32da446b0aae2dfbb3a5f425c74b284ced3f57ed33b30ec7b4b95a8216f8b063e34af2c84fef58bab381f3b79b80d06b687e0b5fc7aaeb311a88389ab7aa1422ae0b58956bb9e91c5cbf2b98422b05e1eacb82e29938566f6f05274294a8c596677c950ce97dcd003709d008f1ae6418ce5bf55ad2bf921318c6e31b324bdda4b4f12ff1fd86b5b71e647d1fc175aea137ba0ff869d5fbcf9ed0289fe7da3619c1204fc42d616462ac1b6a4e6ca2655d44bce039db519d0203010001</x509PublicKey>" + # end replacement for network stuff # + + # This shall pick the key + hexstring = re.compile('<x509PublicKey[^>]*>([0-9a-fA-F]+)</x509PublicKey>') + + # pick the key and convert it to der format + hex_pub_der = hexstring.search(html).group(1) + pub_der = hex_pub_der.decode('hex') + + # Convert it to a public key + pub_key = rsa.PublicKey.load_pkcs1_openssl_der(pub_der) + + # encode the password + enc_pass = rsa.encrypt(password, pub_key) + + # and hex-encode it + hex_pass = enc_pass.encode('hex') + +# _logon('me', 'MyPass') + +import timeit +timeit.timeit('_logon( "me", "MyPass" )', + setup='from __main__ import _logon', + number=1000) + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-3.1.2/rsa/__init__.py new/rsa-3.1.4/rsa/__init__.py --- old/rsa-3.1.2/rsa/__init__.py 2013-09-15 12:30:48.000000000 +0200 +++ new/rsa-3.1.4/rsa/__init__.py 2014-02-22 11:25:11.000000000 +0100 @@ -28,8 +28,8 @@ """ __author__ = "Sybren Stuvel, Barry Mead and Yesudeep Mangalapilly" -__date__ = "2013-09-15" -__version__ = '3.1.2' +__date__ = "2014-02-22" +__version__ = '3.1.4' from rsa.key import newkeys, PrivateKey, PublicKey from rsa.pkcs1 import encrypt, decrypt, sign, verify, DecryptionError, \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-3.1.2/rsa/cli.py new/rsa-3.1.4/rsa/cli.py --- old/rsa-3.1.2/rsa/cli.py 2013-09-15 12:30:48.000000000 +0200 +++ new/rsa-3.1.4/rsa/cli.py 2014-02-22 11:17:50.000000000 +0100 @@ -256,7 +256,7 @@ '''Verify a signature.''' keyname = 'public' - usage = 'usage: %%prog [options] private_key signature_file' + usage = 'usage: %%prog [options] public_key signature_file' description = ('Verifies a signature, exits with status 0 upon success, ' 'prints an error message and exits with status 1 upon error.') operation = 'verify' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-3.1.2/rsa/util.py new/rsa-3.1.4/rsa/util.py --- old/rsa-3.1.2/rsa/util.py 2013-09-15 12:30:48.000000000 +0200 +++ new/rsa-3.1.4/rsa/util.py 2014-02-22 11:06:15.000000000 +0100 @@ -16,7 +16,7 @@ '''Utility functions.''' -from __future__ import with_statement +from __future__ import with_statement, print_function import sys from optparse import OptionParser @@ -49,14 +49,16 @@ # Read the input data if cli.infilename: - print >>sys.stderr, 'Reading private key from %s in %s format' % \ - (cli.infilename, cli.inform) - with open(cli.infilename) as infile: + print('Reading private key from %s in %s format' % \ + (cli.infilename, cli.inform), file=sys.stderr) + with open(cli.infilename, 'rb') as infile: in_data = infile.read() else: - print >>sys.stderr, 'Reading private key from stdin in %s format' % \ - cli.inform - in_data = sys.stdin.read() + print('Reading private key from stdin in %s format' % cli.inform, + file=sys.stderr) + in_data = sys.stdin.read().encode('ascii') + + assert type(in_data) == bytes, type(in_data) # Take the public fields and create a public key @@ -67,13 +69,13 @@ out_data = pub_key.save_pkcs1(cli.outform) if cli.outfilename: - print >>sys.stderr, 'Writing public key to %s in %s format' % \ - (cli.outfilename, cli.outform) - with open(cli.outfilename, 'w') as outfile: + print('Writing public key to %s in %s format' % \ + (cli.outfilename, cli.outform), file=sys.stderr) + with open(cli.outfilename, 'wb') as outfile: outfile.write(out_data) else: - print >>sys.stderr, 'Writing public key to stdout in %s format' % \ - cli.outform - sys.stdout.write(out_data) + print('Writing public key to stdout in %s format' % cli.outform, + file=sys.stderr) + sys.stdout.write(out_data.decode('ascii')) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-3.1.2/rsa.egg-info/PKG-INFO new/rsa-3.1.4/rsa.egg-info/PKG-INFO --- old/rsa-3.1.2/rsa.egg-info/PKG-INFO 2013-09-15 13:04:27.000000000 +0200 +++ new/rsa-3.1.4/rsa.egg-info/PKG-INFO 2014-02-22 11:26:33.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: rsa -Version: 3.1.2 +Version: 3.1.4 Summary: Pure-Python RSA implementation Home-page: http://stuvel.eu/rsa Author: Sybren A. Stuvel @@ -15,9 +15,4 @@ Classifier: License :: OSI Approved :: Apache Software License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2.6 -Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.2 -Classifier: Programming Language :: Python :: 3.3 Classifier: Topic :: Security :: Cryptography diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-3.1.2/rsa.egg-info/SOURCES.txt new/rsa-3.1.4/rsa.egg-info/SOURCES.txt --- old/rsa-3.1.2/rsa.egg-info/SOURCES.txt 2013-09-15 13:04:27.000000000 +0200 +++ new/rsa-3.1.4/rsa.egg-info/SOURCES.txt 2014-02-22 11:26:34.000000000 +0100 @@ -2,6 +2,7 @@ MANIFEST.in README.rst create_timing_table.py +playstuff.py run_tests.py setup.cfg setup.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-3.1.2/rsa.egg-info/entry_points.txt new/rsa-3.1.4/rsa.egg-info/entry_points.txt --- old/rsa-3.1.2/rsa.egg-info/entry_points.txt 2013-09-15 13:04:27.000000000 +0200 +++ new/rsa-3.1.4/rsa.egg-info/entry_points.txt 2014-02-22 11:26:33.000000000 +0100 @@ -1,10 +1,10 @@ [console_scripts] -pyrsa-decrypt-bigfile = rsa.cli:decrypt_bigfile +pyrsa-encrypt = rsa.cli:encrypt pyrsa-keygen = rsa.cli:keygen -pyrsa-decrypt = rsa.cli:decrypt +pyrsa-priv2pub = rsa.util:private_to_public pyrsa-sign = rsa.cli:sign -pyrsa-encrypt = rsa.cli:encrypt pyrsa-verify = rsa.cli:verify -pyrsa-priv2pub = rsa.util:private_to_public pyrsa-encrypt-bigfile = rsa.cli:encrypt_bigfile +pyrsa-decrypt-bigfile = rsa.cli:decrypt_bigfile +pyrsa-decrypt = rsa.cli:decrypt diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-3.1.2/setup.cfg new/rsa-3.1.4/setup.cfg --- old/rsa-3.1.2/setup.cfg 2013-09-15 13:04:27.000000000 +0200 +++ new/rsa-3.1.4/setup.cfg 2014-02-22 11:26:34.000000000 +0100 @@ -2,7 +2,7 @@ verbosity = 2 [egg_info] -tag_svn_revision = 0 -tag_build = tag_date = 0 +tag_build = +tag_svn_revision = 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rsa-3.1.2/setup.py new/rsa-3.1.4/setup.py --- old/rsa-3.1.2/setup.py 2013-09-15 13:01:16.000000000 +0200 +++ new/rsa-3.1.4/setup.py 2014-02-02 11:43:16.000000000 +0100 @@ -22,11 +22,6 @@ 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', - 'Programming Language :: Python :: 2.6', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.2', - 'Programming Language :: Python :: 3.3', 'Topic :: Security :: Cryptography', ], install_requires=[
