Importar certificados con gpgsm: pinentry no se muestra

0

Recientemente instalé GnuPG 2.0.19 para usar GPGME con mutt (1.5.21).

gpg-agent.conf tiene

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

y .bash_profilecontiene export GPG_TTY=`tty`.

Al intentar importar un certificado (incluida una clave privada):

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 

- la interfaz de pinentry no se muestra. ps wauxmuestra que ambos gpg-protect-tooly pinentryse llaman -

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

- y gpg-agent.logtiene

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

El controlador finaliza manualmente (CTRL-C).

Cuando gpgsmo gpgse usan para generar claves, este problema no ocurre (es decir, se pinentrymuestra correctamente), como ocurre al firmar o descifrar archivos con gpg. ¿Qué puedo hacer para depurar esto?

janeden
fuente

Respuestas:

0

Tu tienes que hacer

export LC_TYPE=UTF-8

De hecho, en mi máquina OSX que está configurada por defecto.
(Aunque me resulta difícil descubrir si OSX realmente lo configura).

Tonny
fuente
Gracias por la pista. Lamentablemente, esto no ayuda. Ya intenté configurar LC_CTYPE en UTF-8 (y ahora LC_TYPE), pero el mensaje de error permanece sin cambios.
janeden