Page MenuHome GnuPG

running gpg-agent unsusable after upgrade
Closed, ResolvedPublic

Description

After I upgraded
gnupg2 and gnupg-agent version 2.0.7-1kk2 to 2.0.7.svn4643-0kk1
libgpgme11 version 1.1.5-0kk1 to 1.1.5.svn1282-1
(from apt.intevation.org)
the already running gpg-agent is no longer able to decrypt or sign OpenPKG or
S/MIME mails with mutt (using gpgme) or Kontact (enterprise branch)

Error messages are Bad passphrase or Unknown system error.

kwatchgnupg log shows:

4 - 2007-12-11 14:42:30 gpg-agent[6982.6] DBG: -> OK Pleased to meet you
4 - 2007-12-11 14:42:30 gpg-agent[6982.6] DBG: <- RESET
4 - 2007-12-11 14:42:30 gpg-agent[6982.6] DBG: -> OK
4 - 2007-12-11 14:42:30 gpg-agent[6982.6] DBG: <- OPTION

display=uhuru.hq.intevation.de:0.0

4 - 2007-12-11 14:42:30 gpg-agent[6982.6] DBG: -> OK
4 - 2007-12-11 14:42:30 gpg-agent[6982.6] DBG: <- OPTION ttyname=/dev/pts/20
4 - 2007-12-11 14:42:30 gpg-agent[6982.6] DBG: -> OK
4 - 2007-12-11 14:42:30 gpg-agent[6982.6] DBG: <- OPTION ttytype=xterm
4 - 2007-12-11 14:42:30 gpg-agent[6982.6] DBG: -> OK
4 - 2007-12-11 14:42:30 gpg-agent[6982.6] DBG: <- OPTION

xauthority=/tmp/.gdmO8Z02T

4 - 2007-12-11 14:42:30 gpg-agent[6982.6] DBG: -> ERR 67109038 Unbekannte Option 
4 - 2007-12-11 14:42:30 gpg-agent[6982.6] DBG: <- BYE
4 - 2007-12-11 14:42:30 gpg-agent[6982.6] DBG: -> OK closing connection
4 - 2007-12-11 14:42:30 gpg-agent[6982]: Handhabungsroutine 0x8091c78 für den

fd 6 beendet

As I understand it this is caused by the new error handling code.

Event Timeline

You are using an old gpg-agent which does not support this option.
Below is the patch to allow using an old gpg-agent (I will commit it later).

  • asshelp.c (revision 4628)

+++ asshelp.c (working copy)
@@ -172,6 +172,8 @@

{
  err = send_one_option (ctx, errsource, "xauthority", 
                         opt_xauthority ? opt_xauthority : dft_xauthority);

+ if (gpg_err_code (err) == GPG_ERR_UNKNOWN_OPTION)
+ err = 0;

  if (err)
    return err;
}

@@ -183,6 +185,8 @@

err = send_one_option (ctx, errsource, "pinentry-user-data", 
                       opt_pinentry_user_data ?
                       opt_pinentry_user_data : dft_pinentry_user_data);

+ if (gpg_err_code (err) == GPG_ERR_UNKNOWN_OPTION)
+ err = 0;

  if (err)
    return err;
}

Upgrading from 2.0.7.svn4643-0kk1 and from 2.0.7-1kk2 to 2.0.8-0kk1 worked fine.
(tested on two machines, both having a running gpg-agent and then decrypting
OpenPGP and S/MIME messages)

thomas claimed this task.
thomas removed a project: Restricted Project.