google / keyczar

Easy-to-use crypto toolkit
Apache License 2.0
1.1k stars 141 forks source link

Incompatible with pyasn1 0.4.2-2 #212

Closed xnox closed 3 years ago

xnox commented 6 years ago

Upgrading pyasn1 from 0.1.9-2 to 0.4.2-2 in Debian/Ubuntu, leads to keyczar regression.

======================================================================
ERROR: testParseX509 (util_test.ParseX509Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/<<BUILDDIR>>/python-keyczar-0.716+ds/tests/keyczar_tests/util_test.py", line 97, in testParseX509
    params = util.ParseX509(publickey)
  File "/<<BUILDDIR>>/python-keyczar-0.716+ds/.pybuild/pythonX.Y_2.7/build/keyczar/util.py", line 176, in ParseX509
    prettyPrint()[2:-3])))[0]
  File "/<<BUILDDIR>>/python-keyczar-0.716+ds/.pybuild/pythonX.Y_2.7/build/keyczar/util.py", line 256, in BinToBytes
    return "".join([chr(int(x, 2)) for x in octets])
ValueError: invalid literal for int() with base 2: '00052245'

----------------------------------------------------------------------
Ran 79 tests in 1.511s

This is similar to the previously reported issue #209

P-EB commented 6 years ago

See https://salsa.debian.org/python-team/modules/python-keyczar/commit/2a2cbc0884aebf2f2e27419d8ba3b43198401097 for a patch.

Specifically: https://salsa.debian.org/python-team/modules/python-keyczar/blob/2a2cbc0884aebf2f2e27419d8ba3b43198401097/debian/patches/0001-Fixes-output-value-changes-between-older-and-newer-p.patch

xnox commented 6 years ago

Nice, are you going to upload that into unstable soon?

P-EB commented 6 years ago

It's done. :)