tags 589382 - moreinfo + confirmed
thanks

* Martin Manns <[email protected]>, 2010-07-19, 20:41:
from pyme import core, pygpgme
import pyme.errors
ciphertext = core.Data()
plaintext = core.Data(string="Test")
ctx = core.Context()
ctx.set_armor(1)
def _passphrase_callback(hint='', desc='', prev_bad=''):
   """Callback function needed by pyme"""

   return GPG_KEY_PASSPHRASE

ctx.set_passphrase_cb(_passphrase_callback)
ctx.op_keylist_start(GPG_KEY_UID, 0)
sigkey = ctx.op_keylist_next()
ctx.signers_clear()
ctx.signers_add(sigkey)
ctx.op_sign(plaintext, ciphertext, pygpgme.GPGME_SIG_MODE_DETACH)

Thanks, I can now reproduce the bug. (I had to disable gnupg-agent; otherwise set_passphrase_cb seems to be ignored.)

--
Jakub Wilk

Attachment: signature.asc
Description: Digital signature

Reply via email to