trustcrypto / onlykey-agent

The OnlyKey agent is essentially middleware that lets you use OnlyKey as a hardware SSH/GPG device.
https://docs.crp.to/onlykey-agent.html
GNU Lesser General Public License v3.0
46 stars 15 forks source link

Python 3 support #21

Closed haplo closed 3 years ago

haplo commented 4 years ago

Fixes #18 .

haplo commented 4 years ago

Using the python_3 branch of the python-onlykey repository the error is different:

Traceback (most recent call last):
  File "/usr/local/bin/onlykey-agent", line 10, in <module>
    sys.exit(run_agent())
  File "/home/fidel/Code/onlykey-agent/onlykey_agent/__main__.py", line 123, in wrapper
    return func(*args, **kwargs)
  File "/home/fidel/Code/onlykey-agent/onlykey_agent/__main__.py", line 140, in run_agent
    public_key = conn.get_public_key(label=label)
  File "/home/fidel/Code/onlykey-agent/onlykey_agent/client.py", line 58, in get_public_key
    h.update(label)
TypeError: Unicode-objects must be encoded before hashing
haplo commented 4 years ago

This branch is now working when also using these changes from python-onlykey: https://github.com/trustcrypto/python-onlykey/pull/35