0

I recently installed GnuPG 2.0.19 to use GPGME with mutt (1.5.21).

gpg-agent.conf has

log-file /Users/jan/gpg-agent.log
debug-level guru
debug 1024
verbose
lc-ctype UTF-8
keep-tty
keep-display

and .bash_profile contains export GPG_TTY=`tty`.

When trying to import a certificate (including a private key) –

jan$ eval `gpg-agent --daemon`
gpg-agent[823]: enabled debug flags: command mpi crypto memory cache memstat hashing assuan
jan$ gpgsm --import Backup/conf_home/certs/mycert.p12 

– the pinentry interface is not displayed. ps waux shows that both gpg-protect-tool and pinentry are called –

jan              827 100.0  0.0  2432948    848   ??  R     9:34AM   0:34.87 /usr/local/bin/pinentry
jan              826   0.0  0.0  2434032    896 s000  S+    9:34AM   0:00.00 gpg-protect-tool --homedir ~/.gnupg --p12-import --store --no-fail-on-exist --enable-status-msg --
jan              825   0.0  0.0  2434556   1112 s000  S+    9:34AM   0:00.01 gpgsm --import Backup/conf_home/certs/mycert.p12
jan              824   0.0  0.0  2434908    636   ??  Ss    9:33AM   0:00.01 gpg-agent --daemon

– and gpg-agent.log has

2013-05-24 09:33:57 gpg-agent[823] listening on socket `/tmp/gpg-830NIC/S.gpg-agent'
2013-05-24 09:33:57 gpg-agent[824] gpg-agent (GnuPG) 2.0.19 started
2013-05-24 09:34:06 gpg-agent[824] handler 0x7f8d93404b50 for fd 7 started
gpg-agent[824]: chan_7 -> OK Pleased to meet you
gpg-agent[824]: chan_7 <- RESET
gpg-agent[824]: chan_7 -> OK
gpg-agent[824]: chan_7 <- OPTION ttyname=/dev/ttys000
gpg-agent[824]: chan_7 -> OK
gpg-agent[824]: chan_7 <- OPTION ttytype=xterm-256color
gpg-agent[824]: chan_7 -> OK
gpg-agent[824]: chan_7 <- OPTION lc-ctype=en_US.UTF-8
gpg-agent[824]: chan_7 -> OK
gpg-agent[824]: chan_7 <- OPTION lc-messages=en_US.UTF-8
gpg-agent[824]: chan_7 -> OK
gpg-agent[824]: chan_7 <- OPTION allow-pinentry-notify
gpg-agent[824]: chan_7 -> OK
gpg-agent[824]: chan_7 <- NOP
gpg-agent[824]: chan_7 -> OK
2013-05-24 09:34:06 gpg-agent[824] handler 0x7f8d93404f50 for fd 8 started
gpg-agent[824]: chan_8 -> OK Pleased to meet you
gpg-agent[824]: chan_8 <- RESET
gpg-agent[824]: chan_8 -> OK
gpg-agent[824]: chan_8 <- OPTION allow-pinentry-notify
gpg-agent[824]: chan_8 -> OK
gpg-agent[824]: chan_8 <- GETINFO cmd_has_option GET_PASSPHRASE repeat
gpg-agent[824]: chan_8 -> OK
gpg-agent[824]: chan_8 <- GET_PASSPHRASE --data --repeat=0 -- X X Passphrase: Please+enter+the+passphrase+to+unprotect+the+PKCS#12+object.
2013-05-24 09:34:06 gpg-agent[824] starting a new PIN Entry
gpg-agent[824]: chan_9 <- OK Your orders please
2013-05-24 09:34:06 gpg-agent[824] DBG: connection to PIN entry established
gpg-agent[824]: chan_9 -> OPTION grab
gpg-agent[824]: chan_9 <- OK
gpg-agent[824]: chan_9 -> OPTION ttytype=xterm-256color
gpg-agent[824]: chan_9 <- OK
gpg-agent[824]: chan_9 -> OPTION lc-ctype=UTF-8
gpg-agent[824]: chan_9 <- OK
gpg-agent[824]: chan_9 -> OPTION default-ok=_OK
gpg-agent[824]: chan_9 <- OK
gpg-agent[824]: chan_9 -> OPTION default-cancel=_Cancel
gpg-agent[824]: chan_9 <- OK
gpg-agent[824]: chan_9 -> OPTION default-prompt=PIN:
gpg-agent[824]: chan_9 <- OK
gpg-agent[824]: chan_9 -> OPTION touch-file=/tmp/gpg-830NIC/S.gpg-agent
gpg-agent[824]: chan_9 <- OK
gpg-agent[824]: chan_9 -> GETINFO pid
gpg-agent[824]: chan_9 <- D 827
gpg-agent[824]: chan_9 <- OK
gpg-agent[824]: chan_8 -> INQUIRE PINENTRY_LAUNCHED 827
gpg-agent[824]: chan_8 <- END
gpg-agent[824]: chan_9 -> SETDESC Please enter the passphrase to unprotect the PKCS#12 object.
gpg-agent[824]: chan_9 <- OK
gpg-agent[824]: chan_9 -> SETPROMPT Passphrase:
gpg-agent[824]: chan_9 <- OK
gpg-agent[824]: chan_9 -> [[Confidential data not shown]]
gpg-agent[824]: chan_9 <- [[Confidential data not shown]]
gpg-agent[824]: chan_9 -> BYE
gpg-agent[824]: chan_7 <- [eof]
2013-05-24 09:35:52 gpg-agent[824] handler 0x7f8d93404b50 for fd 7 terminated
2013-05-24 09:35:58 gpg-agent[824] command get_passphrase failed: Invalid IPC response
gpg-agent[824]: chan_8 -> ERR 67109124 Invalid IPC response <GPG Agent>
2013-05-24 09:35:58 gpg-agent[824] Assuan processing failed: Broken pipe
2013-05-24 09:35:58 gpg-agent[824] handler 0x7f8d93404f50 for fd 8 terminated

The handler is terminated manually (CTRL-C).

When gpgsm or gpg are used for generating keys, this problem does not occur (i.e. pinentry shows up properly), as it does when signing or decrypting files with gpg. What can I do to debug this?

1 Answer 1

0

You have to do

export LC_TYPE=UTF-8

In fact on my OSX machine that is set by default.
(Although I have a hard time figuring out were OSX actually sets it.)

1
  • Thanks for the hint. Unfortunately, this does not help. I already tried to set LC_CTYPE to UTF-8 (and now LC_TYPE), but the error message remains unchanged.
    – janeden
    May 23, 2013 at 10:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .