isislovecruft / python-gnupg

A modified version of python-gnupg, including security patches, extensive documentation, and extra features.
Other
424 stars 172 forks source link

Handle `PKA_TRUST_*` and `TRUST_*` status message during key generation #120

Closed isislovecruft closed 7 years ago

isislovecruft commented 9 years ago

With python-gnupg-2.0.2 and gnupg-2.1.7, during key generation a PKA_TRUST_GOOD status message code is received:

Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
      self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
      self.__target(*self.__args, **self.__kwargs)
  File "/home/isis/.virtualenvs/python-gnupg/local/lib/python2.7/site-packages/gnupg-2.0.2_11_g665f1b6-py2.7.egg/gnupg/_meta.py", line 626, in _read_response
      result._handle_status(keyword, value)
  File "/home/isis/.virtualenvs/python-gnupg/local/lib/python2.7/site-packages/gnupg-2.0.2_11_g665f1b6-py2.7.egg/gnupg/_parsers.py", line 866, in _handle_status
      raise ValueError("Unknown status message: %r" % key)
ValueError: Unknown status message: u'PKA_TRUST_GOOD'

85   L585 :gen_key            INFO    Key created. Fingerprint: None
85   L154 :createKey          ERROR   Key creation seems to have failed: None

See http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=doc/DETAILS;h=811b1055ad3da52d22e62ae5e0a8ed6d242763d2;hb=refs/heads/master#l645

This is possibly related to #117.

isislovecruft commented 7 years ago

Fixed in python-gnupg version 2.2.0.