Hello community, here is the log from the commit of package libsecret for openSUSE:Factory checked in at 2016-04-01 13:02:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libsecret (Old) and /work/SRC/openSUSE:Factory/.libsecret.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libsecret" Changes: -------- --- /work/SRC/openSUSE:Factory/libsecret/libsecret.changes 2016-01-23 01:14:25.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.libsecret.new/libsecret.changes 2016-04-01 13:02:28.000000000 +0200 @@ -1,0 +2,9 @@ +Fri Mar 25 15:12:37 UTC 2016 - zai...@opensuse.org + +- Update to version 0.18.5: + + Build fixes. + + Port tests to Python 3 (bgo#761834). + + Fix textual typos (bgo#763143). + + Updated translations. + +------------------------------------------------------------------- Old: ---- libsecret-0.18.4.tar.xz New: ---- libsecret-0.18.5.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libsecret.spec ++++++ --- /var/tmp/diff_new_pack.zOjoXV/_old 2016-04-01 13:02:29.000000000 +0200 +++ /var/tmp/diff_new_pack.zOjoXV/_new 2016-04-01 13:02:29.000000000 +0200 @@ -19,7 +19,7 @@ %define have_lang 1 Name: libsecret -Version: 0.18.4 +Version: 0.18.5 Release: 0 Summary: Library for accessing the Secret Service API License: LGPL-2.1+ ++++++ libsecret-0.18.4.tar.xz -> libsecret-0.18.5.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsecret-0.18.4/NEWS new/libsecret-0.18.5/NEWS --- old/libsecret-0.18.4/NEWS 2016-01-19 09:24:32.000000000 +0100 +++ new/libsecret-0.18.5/NEWS 2016-03-25 09:18:33.000000000 +0100 @@ -1,3 +1,9 @@ +0.18.5 + * Build fixes + * Port tests to Python 3 [#761834] + * Fix textual typos [#763143] + * Updated translations + 0.18.4 * Multithreading fixes [#756766] * Fix memory leaks [#756766] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsecret-0.18.4/aclocal.m4 new/libsecret-0.18.5/aclocal.m4 --- old/libsecret-0.18.4/aclocal.m4 2016-01-19 09:24:47.000000000 +0100 +++ new/libsecret-0.18.5/aclocal.m4 2016-03-25 09:18:42.000000000 +0100 @@ -683,13 +683,13 @@ dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl -dnl This file can can be used in projects which are not available under +dnl This file can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. +dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsecret-0.18.4/build/valgrind/valgrind.h new/libsecret-0.18.5/build/valgrind/valgrind.h --- old/libsecret-0.18.4/build/valgrind/valgrind.h 2015-10-19 12:15:02.000000000 +0200 +++ new/libsecret-0.18.5/build/valgrind/valgrind.h 2016-03-08 13:30:39.000000000 +0100 @@ -6826,7 +6826,7 @@ /* These requests allow control to move from the simulated CPU to the - real CPU, calling an arbitary function. + real CPU, calling an arbitrary function. Note that the current ThreadId is inserted as the first argument. So this call: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsecret-0.18.4/configure new/libsecret-0.18.5/configure --- old/libsecret-0.18.4/configure 2016-01-19 09:24:48.000000000 +0100 +++ new/libsecret-0.18.5/configure 2016-03-25 09:18:42.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libsecret 0.18.4. +# Generated by GNU Autoconf 2.69 for libsecret 0.18.5. # # Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=libsecret>. # @@ -591,8 +591,8 @@ # Identity of this package. PACKAGE_NAME='libsecret' PACKAGE_TARNAME='libsecret' -PACKAGE_VERSION='0.18.4' -PACKAGE_STRING='libsecret 0.18.4' +PACKAGE_VERSION='0.18.5' +PACKAGE_STRING='libsecret 0.18.5' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=libsecret' PACKAGE_URL='' @@ -1447,7 +1447,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libsecret 0.18.4 to adapt to many kinds of systems. +\`configure' configures libsecret 0.18.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1517,7 +1517,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libsecret 0.18.4:";; + short | recursive ) echo "Configuration of libsecret 0.18.5:";; esac cat <<\_ACEOF @@ -1662,7 +1662,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libsecret configure 0.18.4 +libsecret configure 0.18.5 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2031,7 +2031,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libsecret $as_me 0.18.4, which was +It was created by libsecret $as_me 0.18.5, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2926,7 +2926,7 @@ # Define the identity of the package. PACKAGE='libsecret' - VERSION='0.18.4' + VERSION='0.18.5' cat >>confdefs.h <<_ACEOF @@ -16970,7 +16970,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libsecret $as_me 0.18.4, which was +This file was extended by libsecret $as_me 0.18.5, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17036,7 +17036,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libsecret config.status 0.18.4 +libsecret config.status 0.18.5 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsecret-0.18.4/configure.ac new/libsecret-0.18.5/configure.ac --- old/libsecret-0.18.4/configure.ac 2016-01-19 09:22:53.000000000 +0100 +++ new/libsecret-0.18.5/configure.ac 2016-03-25 09:18:22.000000000 +0100 @@ -1,6 +1,6 @@ AC_PREREQ(2.63) -AC_INIT([libsecret],[0.18.4], +AC_INIT([libsecret],[0.18.5], [http://bugzilla.gnome.org/enter_bug.cgi?product=libsecret], [libsecret]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsecret-0.18.4/docs/reference/libsecret/html/SecretItem.html new/libsecret-0.18.5/docs/reference/libsecret/html/SecretItem.html --- old/libsecret-0.18.4/docs/reference/libsecret/html/SecretItem.html 2016-01-19 09:24:52.000000000 +0100 +++ new/libsecret-0.18.5/docs/reference/libsecret/html/SecretItem.html 2016-03-25 09:18:45.000000000 +0100 @@ -1369,7 +1369,7 @@ </div> <div class="refsect3"> <a name="id-1.4.4.10.24.7"></a><h4>Returns</h4> -<p> whether the secret item succesfully loaded or not</p> +<p> whether the secret item successfully loaded or not</p> </div> </div> <hr> @@ -1413,7 +1413,7 @@ </div> <div class="refsect3"> <a name="id-1.4.4.10.25.8"></a><h4>Returns</h4> -<p> whether the secret item succesfully loaded or not</p> +<p> whether the secret item successfully loaded or not</p> </div> </div> <hr> @@ -1494,7 +1494,7 @@ </div> <div class="refsect3"> <a name="id-1.4.4.10.27.7"></a><h4>Returns</h4> -<p> whether the operation succeded or not</p> +<p> whether the operation succeeded or not</p> </div> </div> <hr> @@ -1539,7 +1539,7 @@ </div> <div class="refsect3"> <a name="id-1.4.4.10.28.9"></a><h4>Returns</h4> -<p> whether the operation succeded or not</p> +<p> whether the operation succeeded or not</p> </div> </div> <hr> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsecret-0.18.4/docs/reference/libsecret/html/SecretService.html new/libsecret-0.18.5/docs/reference/libsecret/html/SecretService.html --- old/libsecret-0.18.4/docs/reference/libsecret/html/SecretService.html 2016-01-19 09:24:52.000000000 +0100 +++ new/libsecret-0.18.5/docs/reference/libsecret/html/SecretService.html 2016-03-25 09:18:45.000000000 +0100 @@ -2231,7 +2231,7 @@ <p>This function is called by other parts of this library to handle prompts for the various actions that can require prompting.</p> <p>Override the <a class="link" href="SecretService.html#SecretServiceClass" title="struct SecretServiceClass"><span class="type">SecretServiceClass</span></a> <code class="literal">prompt_async</code> virtual method -to change the behavior of the propmting. The default behavior is to simply +to change the behavior of the prompting. The default behavior is to simply run <a class="link" href="SecretPrompt.html#secret-prompt-perform" title="secret_prompt_perform ()"><code class="function">secret_prompt_perform()</code></a> on the prompt.</p> <div class="refsect3"> <a name="id-1.4.2.10.36.7"></a><h4>Parameters</h4> @@ -2338,7 +2338,7 @@ <p>This function is called by other parts of this library to handle prompts for the various actions that can require prompting.</p> <p>Override the <a class="link" href="SecretService.html#SecretServiceClass" title="struct SecretServiceClass"><span class="type">SecretServiceClass</span></a> <code class="literal">prompt_sync</code> virtual method -to change the behavior of the propmting. The default behavior is to simply +to change the behavior of the prompting. The default behavior is to simply run <a class="link" href="SecretPrompt.html#secret-prompt-perform-sync" title="secret_prompt_perform_sync ()"><code class="function">secret_prompt_perform_sync()</code></a> on the prompt with a <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> <code class="literal">window_id</code>.</p> <div class="refsect3"> <a name="id-1.4.2.10.38.8"></a><h4>Parameters</h4> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsecret-0.18.4/docs/reference/libsecret/html/index.html new/libsecret-0.18.5/docs/reference/libsecret/html/index.html --- old/libsecret-0.18.4/docs/reference/libsecret/html/index.html 2016-01-19 09:24:52.000000000 +0100 +++ new/libsecret-0.18.5/docs/reference/libsecret/html/index.html 2016-03-25 09:18:45.000000000 +0100 @@ -15,7 +15,7 @@ <div> <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">Libsecret Library Reference Manual</p></th></tr></table></div> <div><p class="releaseinfo"> - for libsecret 0.18.3 + for libsecret 0.18.5 . An online version of this documentation can be found at <a class="ulink" href="https://developer.gnome.org/libsecret/unstable/" target="_top">https://developer.gnome.org/libsecret/unstable/</a>. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsecret-0.18.4/docs/reference/libsecret/html/libsecret-SecretSchema.html new/libsecret-0.18.5/docs/reference/libsecret/html/libsecret-SecretSchema.html --- old/libsecret-0.18.4/docs/reference/libsecret/html/libsecret-SecretSchema.html 2016-01-19 09:24:52.000000000 +0100 +++ new/libsecret-0.18.5/docs/reference/libsecret/html/libsecret-SecretSchema.html 2016-03-25 09:18:45.000000000 +0100 @@ -447,7 +447,7 @@ values. Even for values that defined as an integer or boolean in the schema, the attribute values in the <a href="https://developer.gnome.org/glib/unstable/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> are strings. Boolean values are stored as the strings 'true' and 'false'. Integer values are stored in decimal, with -a preceeding negative sign for negative integers.</p> +a preceding negative sign for negative integers.</p> <p>Schemas are handled entirely on the client side by this library. The name of the schema is automatically stored as an attribute on the item.</p> <p>Normally when looking up passwords only those with matching schema names are diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsecret-0.18.4/docs/reference/libsecret/html/migrating-api.html new/libsecret-0.18.5/docs/reference/libsecret/html/migrating-api.html --- old/libsecret-0.18.4/docs/reference/libsecret/html/migrating-api.html 2016-01-19 09:24:52.000000000 +0100 +++ new/libsecret-0.18.5/docs/reference/libsecret/html/migrating-api.html 2016-03-25 09:18:45.000000000 +0100 @@ -57,7 +57,7 @@ for lookup of items it's important that the string representations of integers and booleans are always identical. Boolean values are stored as the strings <code class="literal">true</code> and <code class="literal">false</code>. - Integer values are stored in decimal, with a preceeding negative sign + Integer values are stored in decimal, with a preceding negative sign for negative integers. libsecret facilitates this using the <a class="link" href="libsecret-Secret-Attributes.html#secret-attributes-build" title="secret_attributes_build ()"><code class="function">secret_attributes_build()</code></a> and <a class="link" href="libsecret-Secret-Attributes.html#secret-attributes-buildv" title="secret_attributes_buildv ()"><code class="function">secret_attributes_buildv()</code></a> functions.</p> <p>Attributes are meant to be used for lookup of items; they're not diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsecret-0.18.4/docs/reference/libsecret/migrating-libgnome-keyring.xml new/libsecret-0.18.5/docs/reference/libsecret/migrating-libgnome-keyring.xml --- old/libsecret-0.18.4/docs/reference/libsecret/migrating-libgnome-keyring.xml 2015-04-11 07:29:05.000000000 +0200 +++ new/libsecret-0.18.5/docs/reference/libsecret/migrating-libgnome-keyring.xml 2016-03-08 13:30:39.000000000 +0100 @@ -58,7 +58,7 @@ for lookup of items it's important that the string representations of integers and booleans are always identical. Boolean values are stored as the strings <literal>true</literal> and <literal>false</literal>. - Integer values are stored in decimal, with a preceeding negative sign + Integer values are stored in decimal, with a preceding negative sign for negative integers. libsecret facilitates this using the secret_attributes_build() and secret_attributes_buildv() functions.</para> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsecret-0.18.4/egg/egg-secure-memory.c new/libsecret-0.18.5/egg/egg-secure-memory.c --- old/libsecret-0.18.4/egg/egg-secure-memory.c 2015-10-19 12:15:02.000000000 +0200 +++ new/libsecret-0.18.5/egg/egg-secure-memory.c 2016-03-08 13:30:39.000000000 +0100 @@ -1299,7 +1299,7 @@ if (records == NULL) break; - /* Make sure this actualy accounts for all memory */ + /* Make sure this actually accounts for all memory */ ASSERT (total == block->n_words); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsecret-0.18.4/libsecret/mock/__init__.py new/libsecret-0.18.5/libsecret/mock/__init__.py --- old/libsecret-0.18.4/libsecret/mock/__init__.py 2014-09-23 09:49:21.000000000 +0200 +++ new/libsecret-0.18.5/libsecret/mock/__init__.py 2016-02-14 17:55:09.000000000 +0100 @@ -9,4 +9,5 @@ # See the included COPYING file for more information. # -from service import * +from .service import SecretItem, SecretCollection, SecretService, SecretPrompt +from .service import PlainAlgorithm, NotSupported Files old/libsecret-0.18.4/libsecret/mock/__pycache__/__init__.cpython-34.pyc and new/libsecret-0.18.5/libsecret/mock/__pycache__/__init__.cpython-34.pyc differ Files old/libsecret-0.18.4/libsecret/mock/__pycache__/aes.cpython-34.pyc and new/libsecret-0.18.5/libsecret/mock/__pycache__/aes.cpython-34.pyc differ Files old/libsecret-0.18.4/libsecret/mock/__pycache__/dh.cpython-34.pyc and new/libsecret-0.18.5/libsecret/mock/__pycache__/dh.cpython-34.pyc differ Files old/libsecret-0.18.4/libsecret/mock/__pycache__/hkdf.cpython-34.pyc and new/libsecret-0.18.5/libsecret/mock/__pycache__/hkdf.cpython-34.pyc differ Files old/libsecret-0.18.4/libsecret/mock/__pycache__/service.cpython-34.pyc and new/libsecret-0.18.5/libsecret/mock/__pycache__/service.cpython-34.pyc differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsecret-0.18.4/libsecret/mock/aes.py new/libsecret-0.18.5/libsecret/mock/aes.py --- old/libsecret-0.18.4/libsecret/mock/aes.py 2014-09-23 09:49:21.000000000 +0200 +++ new/libsecret-0.18.5/libsecret/mock/aes.py 2016-02-14 17:55:09.000000000 +0100 @@ -11,20 +11,18 @@ # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/ # -import os -import sys import math def append_PKCS7_padding(s): """return s padded to a multiple of 16-bytes by PKCS7 padding""" numpads = 16 - (len(s)%16) - return s + numpads*chr(numpads) + return s + bytes([numpads] * numpads) def strip_PKCS7_padding(s): """return s stripped of PKCS7 padding""" if len(s)%16 or not s: raise ValueError("String of len %d can't be PCKS7-padded" % len(s)) - numpads = ord(s[-1]) + numpads = s[-1] if numpads > 16: raise ValueError("String ending with %r can't be PCKS7-padded" % s[-1]) return s[:-numpads] @@ -421,7 +419,7 @@ while len(ar) < end - start: ar.append(0) while i < end: - ar[j] = ord(string[i]) + ar[j] = string[i] j += 1 i += 1 return ar @@ -523,7 +521,7 @@ output = [] plaintext = [0] * 16 # the output plain text string - stringOut = '' + result = [] # char firstRound firstRound = True if cipherIn != None: @@ -549,7 +547,7 @@ else: plaintext[i] = output[i] ^ ciphertext[i] for k in range(end-start): - stringOut += chr(plaintext[k]) + result.append(plaintext[k]) iput = ciphertext elif mode == self.modeOfOperation["OFB"]: if firstRound: @@ -567,7 +565,7 @@ else: plaintext[i] = output[i] ^ ciphertext[i] for k in range(end-start): - stringOut += chr(plaintext[k]) + result.append(plaintext[k]) iput = output elif mode == self.modeOfOperation["CBC"]: output = self.aes.decrypt(ciphertext, key, size) @@ -579,70 +577,14 @@ firstRound = False if originalsize is not None and originalsize < end: for k in range(originalsize-start): - stringOut += chr(plaintext[k]) + result.append(plaintext[k]) else: for k in range(end-start): - stringOut += chr(plaintext[k]) + result.append(plaintext[k]) iput = ciphertext - return stringOut + return bytes(result) -def encryptData(key, data, mode=AESModeOfOperation.modeOfOperation["CBC"]): - """encrypt `data` using `key` - - `key` should be a string of bytes. - - returned cipher is a string of bytes prepended with the initialization - vector. - - """ - key = map(ord, key) - if mode == AESModeOfOperation.modeOfOperation["CBC"]: - data = append_PKCS7_padding(data) - keysize = len(key) - assert keysize in AES.keySize.values(), 'invalid key size: %s' % keysize - # create a new iv using random data - iv = [ord(i) for i in os.urandom(16)] - moo = AESModeOfOperation() - (mode, length, ciph) = moo.encrypt(data, mode, key, keysize, iv) - # With padding, the original length does not need to be known. It's a bad - # idea to store the original message length. - # prepend the iv. - return ''.join(map(chr, iv)) + ''.join(map(chr, ciph)) - -def decryptData(key, data, mode=AESModeOfOperation.modeOfOperation["CBC"]): - """decrypt `data` using `key` - - `key` should be a string of bytes. - - `data` should have the initialization vector prepended as a string of - ordinal values. - - """ - - key = map(ord, key) - keysize = len(key) - assert keysize in AES.keySize.values(), 'invalid key size: %s' % keysize - # iv is first 16 bytes - iv = map(ord, data[:16]) - data = map(ord, data[16:]) - moo = AESModeOfOperation() - decr = moo.decrypt(data, None, mode, key, keysize, iv) - if mode == AESModeOfOperation.modeOfOperation["CBC"]: - decr = strip_PKCS7_padding(decr) - return decr - -def generateRandomKey(keysize): - """Generates a key from random data of length `keysize`. - - The returned key is a string of bytes. - - """ - if keysize not in (16, 24, 32): - emsg = 'Invalid keysize, %s. Should be one of (16, 24, 32).' - raise ValueError, emsg % keysize - return os.urandom(keysize) - if __name__ == "__main__": moo = AESModeOfOperation() cleartext = "This is a test!" @@ -650,7 +592,7 @@ iv = [103,35,148,239,76,213,47,118,255,222,123,176,106,134,98,92] mode, orig_len, ciph = moo.encrypt(cleartext, moo.modeOfOperation["CBC"], cypherkey, moo.aes.keySize["SIZE_128"], iv) - print 'm=%s, ol=%s (%s), ciph=%s' % (mode, orig_len, len(cleartext), ciph) + print('m=%s, ol=%s (%s), ciph=%s' % (mode, orig_len, len(cleartext), ciph)) decr = moo.decrypt(ciph, orig_len, mode, cypherkey, moo.aes.keySize["SIZE_128"], iv) - print decr + print(decr) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsecret-0.18.4/libsecret/mock/dh.py new/libsecret-0.18.5/libsecret/mock/dh.py --- old/libsecret-0.18.4/libsecret/mock/dh.py 2014-09-23 09:49:21.000000000 +0200 +++ new/libsecret-0.18.5/libsecret/mock/dh.py 2016-02-14 17:55:09.000000000 +0100 @@ -22,52 +22,26 @@ import math import random -PRIME = '\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC9\x0F\xDA\xA2\x21\x68\xC2\x34\xC4\xC6\x62\x8B\x80\xDC\x1C\xD1' \ - '\x29\x02\x4E\x08\x8A\x67\xCC\x74\x02\x0B\xBE\xA6\x3B\x13\x9B\x22\x51\x4A\x08\x79\x8E\x34\x04\xDD' \ - '\xEF\x95\x19\xB3\xCD\x3A\x43\x1B\x30\x2B\x0A\x6D\xF2\x5F\x14\x37\x4F\xE1\x35\x6D\x6D\x51\xC2\x45' \ - '\xE4\x85\xB5\x76\x62\x5E\x7E\xC6\xF4\x4C\x42\xE9\xA6\x37\xED\x6B\x0B\xFF\x5C\xB6\xF4\x06\xB7\xED' \ - '\xEE\x38\x6B\xFB\x5A\x89\x9F\xA5\xAE\x9F\x24\x11\x7C\x4B\x1F\xE6\x49\x28\x66\x51\xEC\xE6\x53\x81' \ - '\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF' - -def num_bits(number): - if number == 0: - return 0 - s = "%x" % number - return ((len(s)-1)*4) + \ - {'0':0, '1':1, '2':2, '3':2, - '4':3, '5':3, '6':3, '7':3, - '8':4, '9':4, 'a':4, 'b':4, - 'c':4, 'd':4, 'e':4, 'f':4, - }[s[0]] +PRIME = b'\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xC9\x0F\xDA\xA2\x21\x68\xC2\x34\xC4\xC6\x62\x8B\x80\xDC\x1C\xD1' \ + b'\x29\x02\x4E\x08\x8A\x67\xCC\x74\x02\x0B\xBE\xA6\x3B\x13\x9B\x22\x51\x4A\x08\x79\x8E\x34\x04\xDD' \ + b'\xEF\x95\x19\xB3\xCD\x3A\x43\x1B\x30\x2B\x0A\x6D\xF2\x5F\x14\x37\x4F\xE1\x35\x6D\x6D\x51\xC2\x45' \ + b'\xE4\x85\xB5\x76\x62\x5E\x7E\xC6\xF4\x4C\x42\xE9\xA6\x37\xED\x6B\x0B\xFF\x5C\xB6\xF4\x06\xB7\xED' \ + b'\xEE\x38\x6B\xFB\x5A\x89\x9F\xA5\xAE\x9F\x24\x11\x7C\x4B\x1F\xE6\x49\x28\x66\x51\xEC\xE6\x53\x81' \ + b'\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF' def num_bytes(number): - if number == 0: - return 0 - bits = num_bits(number) - return int(math.ceil(bits / 8.0)) - -def bytes_to_number(data): - number = 0L - multiplier = 1L - for count in range(len(data) - 1, -1, -1): - number += multiplier * ord(data[count]) - multiplier *= 256 - return number + return math.ceil(number.bit_length() / 8) def number_to_bytes(number): n_data = num_bytes(number) - data = ['' for i in range(0, n_data)] - for count in range(n_data - 1, -1, -1): - data[count] = chr(number % 256) - number >>= 8 - return "".join(data) + return number.to_bytes(n_data, 'big') def generate_pair(): - prime = bytes_to_number (PRIME) + prime = int.from_bytes(PRIME, 'big') base = 2 # print "mock prime: ", hex(prime) # print " mock base: ", hex(base) - bits = num_bits(prime) + bits = prime.bit_length() privat = 0 while privat == 0: privat = random.getrandbits(bits - 1) @@ -75,7 +49,7 @@ return (privat, publi) def derive_key(privat, peer): - prime = bytes_to_number (PRIME) + prime = int.from_bytes(PRIME, 'big') key = pow(peer, privat, prime) # print " mock ikm2: ", hex(key) return number_to_bytes(key) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsecret-0.18.4/libsecret/mock/hkdf.py new/libsecret-0.18.5/libsecret/mock/hkdf.py --- old/libsecret-0.18.4/libsecret/mock/hkdf.py 2014-09-23 09:49:21.000000000 +0200 +++ new/libsecret-0.18.5/libsecret/mock/hkdf.py 2016-02-14 17:55:09.000000000 +0100 @@ -18,11 +18,9 @@ # system libcryptopp. import hashlib, hmac -import math -from binascii import a2b_hex, b2a_hex class HKDF(object): - def __init__(self, ikm, L, salt=None, info="", digestmod = None): + def __init__(self, ikm, L, salt=None, info=None, digestmod = None): self.ikm = ikm self.keylen = L @@ -36,11 +34,11 @@ self.hashlen = len(self.digest_cons().digest()) if salt is None: - self.salt = chr(0)*(self.hashlen) + self.salt = b'\x00' * (self.hashlen) else: self.salt = salt - self.info = info + self.info = info or b'' #extract PRK def extract(self): @@ -50,23 +48,13 @@ #expand PRK def expand(self): - N = math.ceil(float(self.keylen)/self.hashlen) - T = "" - temp = "" + T = b"" + temp = b"" i=0x01 - '''while len(T)<2*self.keylen : - msg = temp - msg += self.info - msg += b2a_hex(chr(i)) - h = hmac.new(self.prk, a2b_hex(msg), self.digest_cons) - temp = b2a_hex(h.digest()) - i += 1 - T += temp - ''' while len(T)<self.keylen : msg = temp msg += self.info - msg += chr(i) + msg += bytes((i,)) h = hmac.new(self.prk, msg, self.digest_cons) temp = h.digest() i += 1 @@ -80,5 +68,5 @@ def hkdf(ikm, length, salt=None, info=""): hk = HKDF(ikm, length ,salt,info) - computedprk = hk.extract() + hk.extract() return hk.expand() \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsecret-0.18.4/libsecret/mock/service.py new/libsecret-0.18.5/libsecret/mock/service.py --- old/libsecret-0.18.4/libsecret/mock/service.py 2015-04-14 10:48:45.000000000 +0200 +++ new/libsecret-0.18.5/libsecret/mock/service.py 2016-02-14 17:55:09.000000000 +0100 @@ -15,16 +15,13 @@ import os import sys import time -import unittest -import aes -import dh -import hkdf +from mock import aes, dh, hkdf import dbus import dbus.service import dbus.glib -import gobject +from gi.repository import GLib COLLECTION_PREFIX = "/org/freedesktop/secrets/collection/" @@ -54,8 +51,7 @@ return "%s%d" % (prefix, unique_identifier) def encode_identifier(value): - return "".join([(c.isalpha() or c.isdigit()) and c or "_%02x" % ord(c) \ - for c in value.encode('utf-8')]) + return "".join([c.isalnum() and c or "_%02x" % ord(c) for c in value]) def hex_encode(string): return "".join([hex(ord(c))[2:].zfill(2) for c in string]) @@ -71,9 +67,9 @@ return (dbus.String("", variant_level=1), session) def encrypt(self, key, data): - return ("", data) + return b"", data - def decrypt(self, param, data): + def decrypt(self, key, params, data): if params == "": raise InvalidArgs("invalid secret plain parameter") return data @@ -84,7 +80,7 @@ if type (param) != dbus.ByteArray: raise InvalidArgs("invalid argument passed to OpenSession") privat, publi = dh.generate_pair() - peer = dh.bytes_to_number(param) + peer = int.from_bytes(param, 'big') # print "mock publi: ", hex(publi) # print " mock peer: ", hex(peer) ikm = dh.derive_key(privat, peer) @@ -95,21 +91,17 @@ return (dbus.ByteArray(dh.number_to_bytes(publi), variant_level=1), session) def encrypt(self, key, data): - key = map(ord, key) data = aes.append_PKCS7_padding(data) keysize = len(key) - iv = [ord(i) for i in os.urandom(16)] + iv = os.urandom(16) mode = aes.AESModeOfOperation.modeOfOperation["CBC"] moo = aes.AESModeOfOperation() (mode, length, ciph) = moo.encrypt(data, mode, key, keysize, iv) - return ("".join([chr(i) for i in iv]), - "".join([chr(i) for i in ciph])) + return iv, ciph def decrypt(self, key, param, data): - key = map(ord, key) keysize = len(key) - iv = map(ord, param[:16]) - data = map(ord, data) + iv = param[:16] moo = aes.AESModeOfOperation() mode = aes.AESModeOfOperation.modeOfOperation["CBC"] decr = moo.decrypt(data, None, mode, key, keysize, iv) @@ -146,7 +138,7 @@ def Prompt(self, window_id): if self.action: self.result = self.action() - gobject.timeout_add(self.delay * 1000, self._complete) + GLib.timeout_add(self.delay * 1000, self._complete) @dbus.service.method('org.freedesktop.Secret.Prompt') def Dismiss(self): @@ -197,7 +189,7 @@ self.collection = collection self.identifier = identifier self.label = label or "Unnamed item" - self.secret = secret + self.secret = secret.encode('ascii') if isinstance(secret, str) else secret self.type = type or "org.freedesktop.Secret.Generic" self.attributes = attributes self.content_type = content_type @@ -376,7 +368,7 @@ self.PropertiesChanged('org.freedesktop.Secret.Collection', { "Locked" : lock }, []) def perform_delete(self): - for item in self.items.values(): + for item in list(self.items.values()): item.perform_delete() del objects[self.path] self.service.remove_collection(self) @@ -525,12 +517,11 @@ self.set_alias('session', collection) def listen(self): - loop = gobject.MainLoop() + loop = GLib.MainLoop() name = self.bus.get_unique_name() if not name: raise NameError("No unique name available") - print name - sys.stdout.flush() + print(name, flush=True) loop.run() def add_session(self, session): @@ -691,8 +682,8 @@ def parse_options(args): try: opts, args = getopt.getopt(args, "", []) - except getopt.GetoptError, err: - print str(err) + except getopt.GetoptError as err: + print(str(err)) sys.exit(2) for o, a in opts: assert False, "unhandled option" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsecret-0.18.4/libsecret/mock-service.c new/libsecret-0.18.5/libsecret/mock-service.c --- old/libsecret-0.18.4/libsecret/mock-service.c 2015-04-14 10:48:45.000000000 +0200 +++ new/libsecret-0.18.5/libsecret/mock-service.c 2016-02-14 17:59:20.000000000 +0100 @@ -88,7 +88,7 @@ gint output; gchar *argv[] = { - "python", (gchar *)mock_script, + "python3", (gchar *)mock_script, NULL }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsecret-0.18.4/libsecret/secret-item.c new/libsecret-0.18.5/libsecret/secret-item.c --- old/libsecret-0.18.4/libsecret/secret-item.c 2015-10-19 12:15:02.000000000 +0200 +++ new/libsecret-0.18.5/libsecret/secret-item.c 2016-03-08 13:31:34.000000000 +0100 @@ -1259,7 +1259,7 @@ * The newly loaded secret value can be accessed by calling * secret_item_get_secret(). * - * Returns: whether the secret item succesfully loaded or not + * Returns: whether the secret item successfully loaded or not */ gboolean secret_item_load_secret_finish (SecretItem *self, @@ -1292,7 +1292,7 @@ * This function may block indefinetely. Use the asynchronous version * in user interface threads. * - * Returns: whether the secret item succesfully loaded or not + * Returns: whether the secret item successfully loaded or not */ gboolean secret_item_load_secret_sync (SecretItem *self, @@ -1486,7 +1486,7 @@ * * Items that are locked will not have their secrets loaded. * - * Returns: whether the operation succeded or not + * Returns: whether the operation succeeded or not */ gboolean secret_item_load_secrets_finish (GAsyncResult *result, @@ -1520,7 +1520,7 @@ * * Items that are locked will not have their secrets loaded. * - * Returns: whether the operation succeded or not + * Returns: whether the operation succeeded or not */ gboolean secret_item_load_secrets_sync (GList *items, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsecret-0.18.4/libsecret/secret-schema.c new/libsecret-0.18.5/libsecret/secret-schema.c --- old/libsecret-0.18.4/libsecret/secret-schema.c 2015-10-19 12:15:02.000000000 +0200 +++ new/libsecret-0.18.5/libsecret/secret-schema.c 2016-03-08 13:30:39.000000000 +0100 @@ -83,7 +83,7 @@ * values. Even for values that defined as an integer or boolean in the schema, * the attribute values in the #GHashTable are strings. Boolean values are stored * as the strings 'true' and 'false'. Integer values are stored in decimal, with - * a preceeding negative sign for negative integers. + * a preceding negative sign for negative integers. * * Schemas are handled entirely on the client side by this library. The name of the * schema is automatically stored as an attribute on the item. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsecret-0.18.4/po/fur.po new/libsecret-0.18.5/po/fur.po --- old/libsecret-0.18.4/po/fur.po 2014-09-23 09:49:21.000000000 +0200 +++ new/libsecret-0.18.5/po/fur.po 2016-03-25 09:18:22.000000000 +0100 @@ -8,17 +8,17 @@ "Project-Id-Version: libsecret master\n" "Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?" "product=libsecret&keywords=I18N+L10N&component=general\n" -"POT-Creation-Date: 2013-08-15 21:02+0000\n" -"PO-Revision-Date: 2013-08-20 14:21+0100\n" +"POT-Creation-Date: 2013-12-19 15:14+0000\n" +"PO-Revision-Date: 2016-03-23 16:07+0100\n" "Last-Translator: Fabio Tomat <f.t.pub...@gmail.com>\n" "Language-Team: Friulian <f...@li.org>\n" "Language: fur\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.5.4\n" +"X-Generator: Poedit 1.8.5\n" -#: ../libsecret/secret-item.c:1164 +#: ../libsecret/secret-item.c:1161 #, c-format msgid "Received invalid secret from the secret storage" msgstr "Ricevût un segret no valit dal dispositîf di archiviazion dai segrets" @@ -39,13 +39,14 @@ msgid "the collection in which to place the stored item" msgstr "la colezion dulà plaçâ l'element salvât" -#: ../tool/secret-tool.c:43 ../tool/secret-tool.c:50 ../tool/secret-tool.c:437 +#: ../tool/secret-tool.c:43 ../tool/secret-tool.c:50 +#: ../tool/secret-tool.c:437 msgid "attribute value pairs of item to lookup" -msgstr "" +msgstr "Pâr di valôrs dal atribût dal element di cirî" #: ../tool/secret-tool.c:57 msgid "attribute value pairs which match items to clear" -msgstr "" +msgstr "Pâr di valôrs dal atribût che a corispuindin al atribût di eliminâ" #: ../tool/secret-tool.c:433 msgid "return all results, instead of just first one" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsecret-0.18.4/secret-dbus-generated.c new/libsecret-0.18.5/secret-dbus-generated.c --- old/libsecret-0.18.4/secret-dbus-generated.c 2015-10-19 12:15:03.000000000 +0200 +++ new/libsecret-0.18.5/secret-dbus-generated.c 2016-02-14 17:55:12.000000000 +0100 @@ -1,6 +1,6 @@ #define GLIB_DISABLE_DEPRECATION_WARNINGS /* - * Generated by gdbus-codegen 2.46.1. DO NOT EDIT. + * Generated by gdbus-codegen 2.46.2. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libsecret-0.18.4/secret-dbus-generated.h new/libsecret-0.18.5/secret-dbus-generated.h --- old/libsecret-0.18.4/secret-dbus-generated.h 2015-10-19 12:15:03.000000000 +0200 +++ new/libsecret-0.18.5/secret-dbus-generated.h 2016-02-14 17:55:12.000000000 +0100 @@ -1,5 +1,5 @@ /* - * Generated by gdbus-codegen 2.46.1. DO NOT EDIT. + * Generated by gdbus-codegen 2.46.2. DO NOT EDIT. * * The license of this code is the same as for the source it was derived from. */