debian/0000775000000000000000000000000012370207455007175 5ustar debian/python3-secretstorage.install0000664000000000000000000000002312272215343015030 0ustar usr/lib/python3*/* debian/patches/0000775000000000000000000000000012370206724010622 5ustar debian/patches/use_any_collection.diff0000664000000000000000000000751712272225135015342 0ustar Description: use get_any_collection when possible Origin: upstream, commits cbadc121c8da28 and 95b6aafb34b0fc Last-Update: 2014-01-29 --- a/secretstorage/__init__.py +++ b/secretstorage/__init__.py @@ -20,6 +20,7 @@ from secretstorage.exceptions import SecretStorageException, \ SecretServiceNotAvailableException, LockedException, \ ItemNotFoundException +from os.path import join __version__ = '2.0.0' @@ -57,7 +58,7 @@ """Returns tuples for all items in the default collection matching `search_attributes`.""" bus = dbus_init() - collection = Collection(bus) + collection = get_any_collection(bus) if unlock_all and collection.is_locked(): collection.unlock() search_results = collection.search_items(search_attributes) @@ -67,23 +68,23 @@ """Returns item id for all items in the default collection matching `search_attributes`.""" bus = dbus_init() - collection = Collection(bus) + collection = get_any_collection(bus) search_results = collection.search_items(search_attributes) return [item._item_id() for item in search_results] def get_item_attributes(item_id): """Returns item attributes for item with given id.""" bus = dbus_init() - item = Item(bus, item_id) + collection = get_any_collection(bus) + item = Item(bus, join(collection.collection_path, str(item_id))) return item.get_attributes() def get_item_object(item_id, unlock=True): """Returns the item with given id and unlocks it if `unlock` is `True`.""" bus = dbus_init() - item = Item(bus, item_id) - collection_path = item.item_path.rsplit('/', 1)[0] - collection = Collection(bus, collection_path) + collection = get_any_collection(bus) + item = Item(bus, join(collection.collection_path, str(item_id))) if unlock and collection.is_locked(): collection.unlock() return item @@ -100,7 +101,7 @@ """Creates an item with given `label`, `attributes` and `secret` in the default collection. Returns id of the created item.""" bus = dbus_init() - collection = Collection(bus) + collection = get_any_collection(bus) if unlock and collection.is_locked(): collection.unlock() item = collection.create_item(label, attributes, secret) --- a/tests/test_collection.py +++ b/tests/test_collection.py @@ -5,7 +5,7 @@ # This file tests the secretstorage.Collection class. import unittest -from secretstorage import dbus_init, Collection, get_all_collections +from secretstorage import dbus_init, get_any_collection, get_all_collections, Collection class CollectionTest(unittest.TestCase): """A test case that tests that all common methods of Collection @@ -14,7 +14,7 @@ @classmethod def setUpClass(cls): cls.bus = dbus_init(main_loop=False) - cls.collection = Collection(cls.bus) + cls.collection = get_any_collection(cls.bus) def test_all_collections(self): labels = map(Collection.get_label, get_all_collections(self.bus)) --- a/tests/test_exceptions.py +++ b/tests/test_exceptions.py @@ -15,7 +15,7 @@ @classmethod def setUpClass(cls): cls.bus = secretstorage.dbus_init(main_loop=False) - cls.collection = secretstorage.Collection(cls.bus) + cls.collection = secretstorage.get_any_collection(cls.bus) def test_double_deleting(self): item = self.collection.create_item('MyItem', --- a/tests/test_item.py +++ b/tests/test_item.py @@ -6,7 +6,7 @@ import unittest import time -from secretstorage import dbus_init, search_items, Collection +from secretstorage import dbus_init, search_items, get_any_collection ATTRIBUTES = {'application': 'secretstorage-test', 'attribute': 'qwerty'} NEW_ATTRIBUTES = {'application': 'secretstorage-test', @@ -19,7 +19,7 @@ @classmethod def setUpClass(cls): cls.bus = dbus_init(main_loop=False) - cls.collection = Collection(cls.bus) + cls.collection = get_any_collection(cls.bus) cls.created_timestamp = time.time() cls.item = cls.collection.create_item('My item', ATTRIBUTES, b'pa$$word') debian/patches/series0000664000000000000000000000006212370206627012037 0ustar use_any_collection.diff fix_session_creation.diff debian/patches/fix_session_creation.diff0000664000000000000000000000125412370207235015671 0ustar Description: make sure common secret is exactly 128 bytes long Bug: https://bugs.launchpad.net/bugs/1352997 Origin: upstream, https://github.com/mitya57/secretstorage/commit/d55efce2c04b053c Last-Update: 2014-08-05 --- a/secretstorage/dhcrypto.py +++ b/secretstorage/dhcrypto.py @@ -55,6 +55,8 @@ common_secret = pow(server_public_key, self.my_private_key, DH_PRIME_1024) common_secret = long_to_bytes(common_secret) + # Prepend NULL bytes if needed + common_secret = b'\x00' * (0x80 - len(common_secret)) + common_secret # HKDF with null salt, empty info and SHA-256 hash salt = b'\x00' * 0x20 pseudo_random_key = hmac.new(salt, common_secret, sha256).digest() debian/python-secretstorage-doc.doc-base0000664000000000000000000000052612272215343015527 0ustar Document: python-secretstorage Title: SecretStorage module for Python Author: Dmitry Shachnev Abstract: This is documentation of python-secretstorage module. Section: Programming/Python Format: HTML Index: /usr/share/doc/python-secretstorage-doc/html/index.html Files: /usr/share/doc/python-secretstorage-doc/html/*.html debian/control0000664000000000000000000000554012306645475010613 0ustar Source: python-secretstorage Section: python Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Dmitry Shachnev Uploaders: Debian Python Modules Team Build-Depends: debhelper (>= 9), dh-python, python-all (>= 2.6.6-3~), python3-all (>= 3.1.2-7~), python3-crypto, python3-sphinx, python3-dbus Standards-Version: 3.9.5 Homepage: https://github.com/mitya57/secretstorage Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/python-secretstorage/trunk/ Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/python-secretstorage/trunk/ X-Python-Version: >= 2.6 X-Python3-Version: >= 3.1 XS-Testsuite: autopkgtest Package: python-secretstorage Architecture: all Depends: ${python:Depends}, ${misc:Depends}, python-crypto, python-dbus, dbus Recommends: python-gi Suggests: gnome-keyring (>= 2.30), python-secretstorage-doc Description: Python module for storing secrets - Python 2.x version Python-SecretStorage provides a way for securely storing passwords and other secrets. . It uses D-Bus Secret Service API that is supported by GNOME Keyring (>= 2.30) and KSecretsService. . It allows one to create, edit and delete secret items, manipulate secret collections, and search for items matching given attributes. It also supports locking and unlocking collections. . This package provides Python 2.x version of SecretStorage. Package: python3-secretstorage Architecture: all Depends: ${python3:Depends}, ${misc:Depends}, python3-crypto, python3-dbus, dbus Recommends: python3-gi Suggests: gnome-keyring (>= 2.30), python-secretstorage-doc Description: Python module for storing secrets - Python 3.x version Python-SecretStorage provides a way for securely storing passwords and other secrets. . It uses D-Bus Secret Service API that is supported by GNOME Keyring (>= 2.30) and KSecretsService. . It allows one to create, edit and delete secret items, manipulate secret collections, and search for items matching given attributes. It also supports locking and unlocking collections. . This package provides Python 3.x version of SecretStorage. Package: python-secretstorage-doc Section: doc Architecture: all Depends: ${misc:Depends}, ${sphinxdoc:Depends} Description: Python module for storing secrets - documentation Python-SecretStorage provides a way for securely storing passwords and other secrets. . It uses D-Bus Secret Service API that is supported by GNOME Keyring (>= 2.30) and KSecretsService. . It allows one to create, edit and delete secret items, manipulate secret collections, and search for items matching given attributes. It also supports locking and unlocking collections. . This package provides the HTML documentation. debian/upstream/0000775000000000000000000000000012272215343011031 5ustar debian/upstream/signing-key.asc0000664000000000000000000000756312272215343013760 0ustar -----BEGIN PGP PUBLIC KEY BLOCK----- Version: SKS 1.1.4 mQINBE+CrdUBEADA6BFeqBw9HzBCH/gbwKHpL+QFMhWrVEJ+lgDVysogoCofLkOfuLHLI3nQ JqTiCjgNqYJ5UvOO+Is+zbRXWPeVgxfrYPk9oxB0uScDgmrAQil2XsAL0E1erLs050fy5phr lHrkYZYHzVzNANauMhaaV2Daqu90y67u9ssUCNkI9At8CYGwiXIF04ksGF8OGStT8EFxDK+c VPnAv3HG8UWW4WLgumDEjTsmwY7nETIndJ5JkLFT9oNr91vgN6nLFv1U3+O+airUNc7BSbL2 89uWaSp7bqCp8wnAJj6SGTzAoT0c9dPjC0iGJm+o4R7UBOoJ8v/tV+guEbHMV5GetpyZYsi4 yGMHsaeFbuMyfjno6dK8Ws12M4sl4w2oTzZoTF9K+eGuvf8qXpl2jliLuVpiAc5bzMnjlr8+ Y5eg7azmurQiq16bZg2Rsta/N6nY/UBzDocoYbqPI25tdh42UO7eALeJMK0D3TTPcVDsYn9Z H5QTSAX8NAQJ03wbGglSfr1jejXs3fIBKUotMz/ddbzTInsg6yptnsV6NOoD5Uxgiq1wpniG 6uEsY6rE3nCMmnr+B7BGfaVIPpVmS2UgT6jlVwHoRw7h873XYgo/OLKbYfHhX/R3fHwQxohx c8oXPh2x96j7127DrzRtgPZYM0RHheasdc+BluVZbvagsSbAawARAQABtCNEbWl0cnkgU2hh Y2huZXYgPG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rOpntn+wO2zYCV6lqOWXSRp/1qGymIsaEZ/plAOGfN2gqc4PCc4/FIa7gS4MSNt+AB/uE MWDK4ep1TcgQCnEcU+XHdT5nLuWIcTjm9kstS7YynUaftrw/rE+YQjYeqb9E2AU8Sr/JMTg1 FP/cEVzUi0ikAGr2rBQo9m1cfqoAyCk5jO6LYfrTr2cAEQEAAYkCHwQYAQIACQUCT5GR3wIb DAAKCRBgJpNtLxyK4Bf5D/9gB15v094W9LgzfuoG3Ui0HMGAgGVCwucQ6XoYr0dv0p9VFV7k nxQM/eXTQ0DmzFD1K9MJjOiJns3I3fRKozIGcicgXjPfA3u5laH0CVxBVoDOKoPoWd/2+vE/ 2ejwGQpPJCA4NYfgXqPcD50Kc69ckfulR50iC62gZNlASD891rD3j5UmLL4RcEYBrC2eFecF G13sESogGasA0sQWCzxWqLU8blD/H5itEv6wC63kXTxUCHhW1d2QzC0nHv9mnyD0r8m+UEfT 408VmjGlpWUKIO0QyUI9Mv8/Tu9rLgrSSo7I78P8pWB/Q4jOP8tmJPKrs3TqBKuJ4Ef9CC4M RmV93k8yT90wwDHU360tM9Pa8V17p6UMmhGOttVUqIo4z7qMQtR/P/+IqkqMeHNF/oJ8HDeo FAnth9vYTqxdxsG2KFfNgvnXYtU9PZmNH8GM1PSmmU5zBvhTRlRQNc0k95a5yNC1i5MDP8EU HaSqgHY2jQL4z0fjy7grRDCbJLEk4QBQwtAmKH5hH6PTPRk0eHsgdd976AjgeBljKeVfi7hn K7KcUpSN5WBePkFVDCgFH47mMMF/T0+aqnzjWfOGpB+qQj0vOIgris8jCZCWrO5l3StwYUXb 490c99V6I5H6cGzWhunDdSM2xEd2TsDvubC6kEjIS7irhWqJIAbzaBStmA== =DySd -----END PGP PUBLIC KEY BLOCK----- debian/copyright0000664000000000000000000000323112272215343011123 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: python-secretstorage Source: https://launchpad.net/python-secretstorage Files: * Copyright: Copyright 2012 Dmitry Shachnev License: BSD-3-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . * Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/changelog0000664000000000000000000000525012370207435011047 0ustar python-secretstorage (2.0.0-1ubuntu1.1) trusty; urgency=medium * Fix name of the previous patch. * debian/patches/fix_session_creation.diff: make sure common secret is exactly 128 bytes long (LP: #1352997). -- Dmitry Shachnev Tue, 05 Aug 2014 21:05:29 +0400 python-secretstorage (2.0.0-1ubuntu1) trusty; urgency=medium * debian/patches/use_any_collection.diff: Use get_any_collection() where possible. * Add autopkgtests (LP: #1189172). -- Dmitry Shachnev Wed, 29 Jan 2014 20:21:01 +0400 python-secretstorage (2.0.0-1) unstable; urgency=medium * New upstream release. * Add explicit build-dependency on dh-python. * Add dependency on python[3]-crypto. * Add my signing key and check signature in debian/watch. * Update home page URL to point to GitHub. -- Dmitry Shachnev Wed, 29 Jan 2014 19:14:50 +0400 python-secretstorage (1.1.0-1) unstable; urgency=low * New upstream release. - No longer fails when the default collection does not exist (LP: #1242412). * Update debian/watch to use HTTPS. * Bump Standards-Version to 3.9.5, no changes needed. * Bump debhelper compat level to 9. -- Dmitry Shachnev Sun, 17 Nov 2013 15:15:53 +0400 python-secretstorage (1.0.0-1) unstable; urgency=low * New upstream release. - Added get_default_collection() and get_any_collection() helper functions (LP: #1175751). - Fixed creation of items with empty attributes dict. - Misc fixes and documentation improvements. -- Dmitry Shachnev Wed, 08 May 2013 19:26:01 +0400 python-secretstorage (0.9.1-1) unstable; urgency=low * New upstream bugfix release. - Makes exec_prompt_async_qt() really work. -- Dmitry Shachnev Sat, 23 Mar 2013 16:55:48 +0400 python-secretstorage (0.9.0-1) unstable; urgency=low * New upstream release. * Use canonical Vcs-Svn URI. -- Dmitry Shachnev Tue, 05 Mar 2013 14:06:38 +0400 python-secretstorage (0.8.1-1) unstable; urgency=low * Upload to unstable. * New upstream release. * Add missing python3 build. * Build docs using sphinx. * Removed obsolete d/patches/bzr_use_check_call.patch. * Bump Standards-Version to 3.9.4, no changes needed. * Moved dependencies on python*-gi to Recommends. -- Dmitry Shachnev Wed, 16 Jan 2013 19:10:48 +0400 python-secretstorage (0.2-1) experimental; urgency=low * Initial release. (closes: #675193) * debian/patches/bzr_use_check_call.patch: - use check_call instead of Popen in setup.py (from upstream bzr) -- Dmitry Shachnev Thu, 28 Jun 2012 12:13:33 +0400 debian/rules0000775000000000000000000000102212306645527010255 0ustar #!/usr/bin/make -f # -*- mode: makefile; coding: utf-8 -*- PYTHON3=$(shell py3versions -r) %: dh $@ --with python2,python3,sphinxdoc override_dh_auto_clean: dh_auto_clean rm -rf build/ docs/html/*.html */__pycache__ override_dh_auto_build: dh_auto_build set -ex; for python in $(PYTHON3); do \ $$python setup.py build; \ done python3 setup.py build_sphinx override_dh_auto_install: dh_auto_install set -ex; for python in $(PYTHON3); do \ $$python setup.py install --install-layout=deb --root=debian/tmp; \ done debian/python-secretstorage.install0000664000000000000000000000002412272215343014746 0ustar usr/lib/python2.*/* debian/source/0000775000000000000000000000000012272215343010471 5ustar debian/source/format0000664000000000000000000000001412272215343011677 0ustar 3.0 (quilt) debian/tests/0000775000000000000000000000000012306644701010335 5ustar debian/tests/control0000664000000000000000000000014612306644424011743 0ustar Tests: gnome-keyring Depends: gnome-keyring, python-secretstorage, python3-secretstorage, xauth, xvfb debian/tests/gnome-keyring0000775000000000000000000000035712306646035013045 0ustar #!/bin/sh set -eu cp -r tests "$ADTTMP" cd "$ADTTMP" export XDG_RUNTIME_DIR="$ADTTMP" for python in $(pyversions -i) $(py3versions -i); do echo "Testing with $python..." xvfb-run -a $python -m unittest discover -v -s tests done debian/python-secretstorage-doc.docs0000664000000000000000000000002212272215343014771 0ustar build/sphinx/html debian/watch0000664000000000000000000000020012272215343010212 0ustar version=3 options=pgpsigurlmangle=s/$/.asc/ \ https://pypi.python.org/packages/source/S/SecretStorage/SecretStorage-(.*).tar.gz debian/compat0000664000000000000000000000000212272215343010367 0ustar 9