Benjamin-Loison / opentimestamps-client

OpenTimestamps client
Other
0 stars 0 forks source link

`ots verify examples/hello-world.txt.ots` results in `ValueError: unsupported hash type ripemd160` #13

Closed Benjamin-Loison closed 4 months ago

Benjamin-Loison commented 4 months ago
ots verify examples/hello-world.txt.ots
Traceback (most recent call last):
  File "/usr/lib/python3.10/hashlib.py", line 160, in __hash_new
    return _hashlib.new(name, data, **kwargs)
ValueError: [digital envelope routines] unsupported

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/benjamin/.local/bin/ots", line 8, in <module>
    sys.exit(main())
  File "/home/benjamin/.local/lib/python3.10/site-packages/otsclient/ots.py", line 34, in main
    args.cmd_func(args)
  File "/home/benjamin/.local/lib/python3.10/site-packages/otsclient/cmds.py", line 446, in verify_command
    detached_timestamp = DetachedTimestampFile.deserialize(ctx)
  File "/home/benjamin/.local/lib/python3.10/site-packages/opentimestamps/core/timestamp.py", line 337, in deserialize
    timestamp = Timestamp.deserialize(ctx, file_hash)
  File "/home/benjamin/.local/lib/python3.10/site-packages/opentimestamps/core/timestamp.py", line 181, in deserialize
    do_tag_or_attestation(tag)
  File "/home/benjamin/.local/lib/python3.10/site-packages/opentimestamps/core/timestamp.py", line 168, in do_tag_or_attestation
    result = op(initial_msg)
  File "/home/benjamin/.local/lib/python3.10/site-packages/opentimestamps/core/op.py", line 135, in __call__
    r = self._do_op_call(msg)
  File "/home/benjamin/.local/lib/python3.10/site-packages/opentimestamps/core/op.py", line 292, in _do_op_call
    r = hashlib.new(self.HASHLIB_NAME, bytes(msg)).digest()
  File "/usr/lib/python3.10/hashlib.py", line 166, in __hash_new
    return __get_builtin_constructor(name)(data)
  File "/usr/lib/python3.10/hashlib.py", line 123, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type ripemd160

On my Framework Linux Mint 21.3.

issues?q=is%3Aissue+is%3Aopen+ripemd160 does not return interesting entries.

Benjamin-Loison commented 4 months ago

My Framework Linux Mint Linux Mint (trust) VirtualBox virtual machine does not seem interesting (I investigated Desktop/bens_folder/).

Benjamin-Loison commented 4 months ago

The Stack Overflow answer 72508879 solves this issue.

Benjamin-Loison commented 4 months ago
[default_sect]
activate = 1

does not seem necessary. For bitcoin/blob/4e56df8f915bf6e769920ef12e7c52848786a56d/share/rpcauth/rpcauth.py it is necessary otherwise face:

Traceback (most recent call last):
  File "/home/benjamin/.bitcoin/./rpcauth.py", line 43, in <module>
    main()
  File "/home/benjamin/.bitcoin/./rpcauth.py", line 36, in main
    password_hmac = password_to_hmac(salt, args.password)
  File "/home/benjamin/.bitcoin/./rpcauth.py", line 20, in password_to_hmac
    m = hmac.new(salt.encode('utf-8'), password.encode('utf-8'), 'SHA256')
  File "/usr/lib/python3.10/hmac.py", line 184, in new
    return HMAC(key, msg, digestmod)
  File "/usr/lib/python3.10/hmac.py", line 60, in __init__
    self._init_hmac(key, msg, digestmod)
  File "/usr/lib/python3.10/hmac.py", line 67, in _init_hmac
    self._hmac = _hashopenssl.hmac_new(key, msg, digestmod=digestmod)
ValueError: [digital envelope routines] unsupported