Hello community, here is the log from the commit of package python-libnacl for openSUSE:Factory checked in at 2015-03-18 13:08:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-libnacl (Old) and /work/SRC/openSUSE:Factory/.python-libnacl.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-libnacl" Changes: -------- --- /work/SRC/openSUSE:Factory/python-libnacl/python-libnacl.changes 2015-02-20 12:01:45.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python-libnacl.new/python-libnacl.changes 2015-03-18 13:08:40.000000000 +0100 @@ -1,0 +2,6 @@ +Tue Mar 17 18:42:08 UTC 2015 - [email protected] + +- Updated to 1.4.2 + + Add support to save and load SecretBox keys + +------------------------------------------------------------------- Old: ---- libnacl-1.4.1.tar.gz New: ---- libnacl-1.4.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-libnacl.spec ++++++ --- /var/tmp/diff_new_pack.qcYTr5/_old 2015-03-18 13:08:41.000000000 +0100 +++ /var/tmp/diff_new_pack.qcYTr5/_new 2015-03-18 13:08:41.000000000 +0100 @@ -16,7 +16,7 @@ # Name: python-libnacl -Version: 1.4.1 +Version: 1.4.2 Release: 0 License: Apache-2.0 Summary: Python bindings for libsodium/tweetnacl based on ctypes ++++++ libnacl-1.4.1.tar.gz -> libnacl-1.4.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnacl-1.4.1/MANIFEST.in new/libnacl-1.4.2/MANIFEST.in --- old/libnacl-1.4.1/MANIFEST.in 2014-10-03 22:21:33.000000000 +0200 +++ new/libnacl-1.4.2/MANIFEST.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -include LICENSE -include AUTHORS -include README.rst -recursive-include tests * -recursive-include doc * -recursive-include pkg * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnacl-1.4.1/PKG-INFO new/libnacl-1.4.2/PKG-INFO --- old/libnacl-1.4.1/PKG-INFO 2015-02-18 18:28:29.000000000 +0100 +++ new/libnacl-1.4.2/PKG-INFO 2015-03-17 18:02:58.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: libnacl -Version: 1.4.1 +Version: 1.4.2 Summary: Python bindings for libsodium/tweetnacl based on ctypes Home-page: https://libnacl.readthedocs.org/ Author: Thomas S Hatch diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnacl-1.4.1/doc/conf.py new/libnacl-1.4.2/doc/conf.py --- old/libnacl-1.4.1/doc/conf.py 2015-02-18 18:06:14.000000000 +0100 +++ new/libnacl-1.4.2/doc/conf.py 2015-03-17 17:57:04.000000000 +0100 @@ -53,7 +53,7 @@ # built documents. # # The short X.Y version. -version = '1.4.1' +version = '1.4.2' # The full version, including alpha/beta/rc tags. release = version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnacl-1.4.1/doc/topics/releases/1.4.2.rst new/libnacl-1.4.2/doc/topics/releases/1.4.2.rst --- old/libnacl-1.4.1/doc/topics/releases/1.4.2.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/libnacl-1.4.2/doc/topics/releases/1.4.2.rst 2015-03-17 18:00:00.000000000 +0100 @@ -0,0 +1,8 @@ +=========================== +libnacl 1.4.2 Release Notes +=========================== + +SecretBox key save and load +=========================== + +* Add support to save and load SecretBox keys diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnacl-1.4.1/libnacl/__init__.py new/libnacl-1.4.2/libnacl/__init__.py --- old/libnacl-1.4.1/libnacl/__init__.py 2015-02-18 17:34:19.000000000 +0100 +++ new/libnacl-1.4.2/libnacl/__init__.py 2015-03-17 17:11:06.000000000 +0100 @@ -452,11 +452,11 @@ key_len = 0 nacl.crypto_generichash( hbuf, - ctypes.c_ulonglong(len(hbuf)), + ctypes.c_size_t(len(hbuf)), msg, ctypes.c_ulonglong(len(msg)), key, - ctypes.c_ulonglong(key_len)) + ctypes.c_size_t(key_len)) return hbuf.raw # scalarmult diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnacl-1.4.1/libnacl/base.py new/libnacl-1.4.2/libnacl/base.py --- old/libnacl-1.4.1/libnacl/base.py 2014-11-03 05:47:24.000000000 +0100 +++ new/libnacl-1.4.2/libnacl/base.py 2015-03-17 17:53:55.000000000 +0100 @@ -40,7 +40,7 @@ pk = self.hex_pk() vk = self.hex_vk() seed = self.hex_seed() - if sk and pk: + if sk: pre['priv'] = sk.decode('utf-8') if pk: pre['pub'] = pk.decode('utf-8') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnacl-1.4.1/libnacl/utils.py new/libnacl-1.4.2/libnacl/utils.py --- old/libnacl-1.4.1/libnacl/utils.py 2014-10-03 22:21:33.000000000 +0200 +++ new/libnacl-1.4.2/libnacl/utils.py 2015-03-17 17:53:30.000000000 +0100 @@ -6,6 +6,7 @@ # Import nacl libs import libnacl import libnacl.encode +import libnacl.secret import libnacl.public import libnacl.sign import libnacl.dual @@ -24,11 +25,11 @@ elif serial == 'json': import json key_data = json.loads(packaged.decode(encoding='UTF-8')) - if 'priv' in key_data and 'sign' in key_data: + if 'priv' in key_data and 'sign' in key_data and 'pub' in key_data: return libnacl.dual.DualSecret( libnacl.encode.hex_decode(key_data['priv']), libnacl.encode.hex_decode(key_data['sign'])) - elif 'priv' in key_data: + elif 'priv' in key_data and 'pub' in key_data: return libnacl.public.SecretKey( libnacl.encode.hex_decode(key_data['priv'])) elif 'sign' in key_data: @@ -39,6 +40,9 @@ libnacl.encode.hex_decode(key_data['pub'])) elif 'verify' in key_data: return libnacl.sign.Verifier(key_data['verify']) + elif 'priv' in key_data: + return libnacl.secret.SecretBox( + libnacl.encode.hex_decode(key_data['priv'])) raise ValueError('Found no key data') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnacl-1.4.1/libnacl/version.py new/libnacl-1.4.2/libnacl/version.py --- old/libnacl-1.4.1/libnacl/version.py 2015-02-18 18:04:44.000000000 +0100 +++ new/libnacl-1.4.2/libnacl/version.py 2015-03-17 17:56:49.000000000 +0100 @@ -1 +1 @@ -__version__ = '1.4.1' +__version__ = '1.4.2' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnacl-1.4.1/libnacl.egg-info/PKG-INFO new/libnacl-1.4.2/libnacl.egg-info/PKG-INFO --- old/libnacl-1.4.1/libnacl.egg-info/PKG-INFO 2015-02-18 18:28:29.000000000 +0100 +++ new/libnacl-1.4.2/libnacl.egg-info/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 @@ -1,19 +0,0 @@ -Metadata-Version: 1.1 -Name: libnacl -Version: 1.4.1 -Summary: Python bindings for libsodium/tweetnacl based on ctypes -Home-page: https://libnacl.readthedocs.org/ -Author: Thomas S Hatch -Author-email: [email protected] -License: UNKNOWN -Description: UNKNOWN -Platform: UNKNOWN -Classifier: Operating System :: OS Independent -Classifier: License :: OSI Approved :: Apache Software License -Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2.6 -Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3.4 -Classifier: Development Status :: 5 - Production/Stable -Classifier: Intended Audience :: Developers -Classifier: Topic :: Security :: Cryptography diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnacl-1.4.1/libnacl.egg-info/SOURCES.txt new/libnacl-1.4.2/libnacl.egg-info/SOURCES.txt --- old/libnacl-1.4.1/libnacl.egg-info/SOURCES.txt 2015-02-18 18:28:29.000000000 +0100 +++ new/libnacl-1.4.2/libnacl.egg-info/SOURCES.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,61 +0,0 @@ -AUTHORS -LICENSE -MANIFEST.in -README.rst -setup.py -doc/Makefile -doc/conf.py -doc/index.rst -doc/topics/dual.rst -doc/topics/public.rst -doc/topics/raw_generichash.rst -doc/topics/raw_hash.rst -doc/topics/raw_public.rst -doc/topics/raw_secret.rst -doc/topics/raw_sign.rst -doc/topics/secret.rst -doc/topics/sign.rst -doc/topics/utils.rst -doc/topics/releases/1.0.0.rst -doc/topics/releases/1.1.0.rst -doc/topics/releases/1.2.0.rst -doc/topics/releases/1.3.0.rst -doc/topics/releases/1.3.1.rst -doc/topics/releases/1.3.2.rst -doc/topics/releases/1.3.3.rst -doc/topics/releases/1.3.4.rst -doc/topics/releases/1.4.0.rst -doc/topics/releases/1.4.1.rst -doc/topics/releases/index.rst -libnacl/__init__.py -libnacl/base.py -libnacl/blake.py -libnacl/dual.py -libnacl/encode.py -libnacl/public.py -libnacl/secret.py -libnacl/sign.py -libnacl/utils.py -libnacl/version.py -libnacl.egg-info/PKG-INFO -libnacl.egg-info/SOURCES.txt -libnacl.egg-info/dependency_links.txt -libnacl.egg-info/top_level.txt -pkg/rpm/python-libnacl.spec -pkg/suse/python-libnacl.changes -pkg/suse/python-libnacl.spec -tests/runtests.py -tests/unit/__init__.py -tests/unit/test_blake.py -tests/unit/test_dual.py -tests/unit/test_public.py -tests/unit/test_raw_auth_sym.py -tests/unit/test_raw_generichash.py -tests/unit/test_raw_hash.py -tests/unit/test_raw_public.py -tests/unit/test_raw_random.py -tests/unit/test_raw_sign.py -tests/unit/test_save.py -tests/unit/test_secret.py -tests/unit/test_sign.py -tests/unit/test_version.py \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnacl-1.4.1/libnacl.egg-info/dependency_links.txt new/libnacl-1.4.2/libnacl.egg-info/dependency_links.txt --- old/libnacl-1.4.1/libnacl.egg-info/dependency_links.txt 2015-02-18 18:28:29.000000000 +0100 +++ new/libnacl-1.4.2/libnacl.egg-info/dependency_links.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnacl-1.4.1/libnacl.egg-info/top_level.txt new/libnacl-1.4.2/libnacl.egg-info/top_level.txt --- old/libnacl-1.4.1/libnacl.egg-info/top_level.txt 2015-02-18 18:28:29.000000000 +0100 +++ new/libnacl-1.4.2/libnacl.egg-info/top_level.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -libnacl diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnacl-1.4.1/setup.cfg new/libnacl-1.4.2/setup.cfg --- old/libnacl-1.4.1/setup.cfg 2015-02-18 18:28:29.000000000 +0100 +++ new/libnacl-1.4.2/setup.cfg 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +0,0 @@ -[egg_info] -tag_build = -tag_date = 0 -tag_svn_revision = 0 - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnacl-1.4.1/setup.py new/libnacl-1.4.2/setup.py --- old/libnacl-1.4.1/setup.py 2014-11-03 03:57:24.000000000 +0100 +++ new/libnacl-1.4.2/setup.py 2015-03-17 17:11:06.000000000 +0100 @@ -1,10 +1,14 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- + # Import python libs import os import sys -from setuptools import setup +if 'USE_SETUPTOOLS' in os.environ or 'setuptools' in sys.modules: + from setuptools import setup +else: + from distutils.core import setup NAME = 'libnacl' DESC = ('Python bindings for libsodium/tweetnacl based on ctypes') @@ -14,7 +18,7 @@ with open('libnacl/version.py') as fp: exec(fp.read(), None, _locals) VERSION = _locals['__version__'] - + setup(name=NAME, version=VERSION, description=DESC, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libnacl-1.4.1/tests/unit/test_save.py new/libnacl-1.4.2/tests/unit/test_save.py --- old/libnacl-1.4.1/tests/unit/test_save.py 2014-11-03 05:12:17.000000000 +0100 +++ new/libnacl-1.4.2/tests/unit/test_save.py 2015-03-17 17:37:45.000000000 +0100 @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Import libnacl libs import libnacl.dual +import libnacl.secret import libnacl.sign import libnacl.utils @@ -47,6 +48,17 @@ os.remove(bob_path) os.remove(alice_path) + def test_save_load_secret(self): + msg = b'then leap out of the rabbit, taking the French by surprise' + box = libnacl.secret.SecretBox() + fh_, box_path = tempfile.mkstemp() + os.close(fh_) + box.save(box_path) + lbox = libnacl.utils.load_key(box_path) + ctxt = box.encrypt(msg) + out_msg = lbox.decrypt(ctxt) + self.assertEqual(msg, out_msg) + def test_save_load_sign(self): msg = b'then leap out of the rabbit, taking the French by surprise' signer = libnacl.sign.Signer() -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
