You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is one bit of code with some of the changes that would be needed, in /usr/lib/python2.7/site-packages/cvmfs/root_file.py
def _read_signature(self, file_object):
""" Reads the signature's checksum and the binary signature string """
file_object.seek(0)
message_digest = self._hash_over_content(file_object)
self.signature_checksum = file_object.readline().rstrip()
if len(self.signature_checksum) == 40:
pass # sha-1
elif len(self.signature_checksum) == 49 and self.signature_checksum[40:49] == "-shake128":
pass # shake-128
else:
raise IncompleteRootFileSignature("Signature checksum malformed")
Then there would need to be a function similar to _hash_over_content which calculates the shake128 hash. Maybe that will be helpful if someone comes along to work on it.
Activity
DrDaveD commentedon Jun 8, 2018
Yep, looks like it predates shake128. Would you be willing to do a PR? I'm as blind as you are on this, I haven't looked at the code before.
rptaylor commentedon Jun 8, 2018
I took a look and got as far as needing to calculate the hash, but the shake128 hash isn't available in Python until version 3.6:
https://docs.python.org/3.6/library/hashlib.html
[-]big_catalogs exception: signature checksum malformed[/-][+]shake128 support for big_catalogs[/+]rptaylor commentedon Jun 8, 2018
Here is one bit of code with some of the changes that would be needed, in /usr/lib/python2.7/site-packages/cvmfs/root_file.py
Then there would need to be a function similar to _hash_over_content which calculates the shake128 hash. Maybe that will be helpful if someone comes along to work on it.
DrDaveD commentedon Jun 11, 2018
One could always import a custom function. Alternatively, python3 is available in EPEL for all EL* variants. yum install /usr/bin/python3.
DrDaveD commentedon Jul 14, 2026
Should be fixed by #45