Mailing List Archive

GPA and OpenPGP Cryptocard
Hello everyone,

I just got my new smartcard reader and the OpenPGP Crypto Card
today. The installation went quite smooth as well as the
personalization of the smartcard itself. So crypting files using the
smartcard and GnuPG (version 1.4.1) works just as simple as going the
normal way with a locally stored encryption key. But unfortunately any
application using GPGME (just like GPA and Sylpheed) don't seem to work
with this new setup. It just hangs up when i try to crypt/sign a file.
A `ps aux | grep gpg` shows the following command, during the hang:

gpg --no-sk-comment --status-fd 8 --no-tty --charset utf8 --
enable- progress-filter --command-fd 9 --sign --detach --armor --
textmode

For me the issue seems to be gpgme-specific, because any tool depending
on gpgme hangs while other applications which speak to gpg "natively"
work just like a charm...

Thank you in advance for your help!

mario

--
Mario Fürderer <mario@codehack.org>
Re: GPA and OpenPGP Cryptocard [ In reply to ]
Hi Mario,

On Mon, May 16, 2005 at 11:26:45PM +0200, Mario Fuerderer wrote:
> I just got my new smartcard reader and the OpenPGP Crypto Card
> today. The installation went quite smooth as well as the
> personalization of the smartcard itself. So crypting files using the
> smartcard and GnuPG (version 1.4.1) works just as simple as going the
> normal way with a locally stored encryption key. But unfortunately any
> application using GPGME (just like GPA and Sylpheed) don't seem to work
> with this new setup. It just hangs up when i try to crypt/sign a file.

you could try gnupg-1.4.2rc1 which was released recently
and see if the problems persist.

If so, can you also check the debugging output?
Re: GPA and OpenPGP Cryptocard [ In reply to ]
Hi Bernhard,

On Tue, 31 May 2005 18:03:22 +0200
Bernhard Reiter <bernhard@intevation.de> wrote:

> you could try gnupg-1.4.2rc1 which was released recently
> and see if the problems persist.

I just tried using the following constellation:

- sylpheed 1.9.12
- GnuPG 1.4.2rc1
- GPGME 0.9.0
- GPA 0.7.0

unfortunately I experienced the same problem again.
For me it looks like gpg is waiting for the passphrase/pin, that should
be supplied by sylpheed/gpa. But in fact, the tools liked against gpgme,
don't even prompt for a passphrase/pin...


> If so, can you also check the debugging output?

Here it comes:

(...snip...)
gpgme_debug: level=5
posix-io.c:135: closing fd 7
posix-io.c:72: fd 6: about to read 79 bytes
posix-io.c:79: fd 6: got 79 bytes
fd 6: got `gpg (GnuPG) 1.4.2rc1
NOTE: THIS IS A DEVELOPMENT VERSION!
It is only intended f'
posix-io.c:135: closing fd 6
posix-io.c:157: set notification for fd 7
posix-io.c:157: set notification for fd 9
posix-io.c:157: set notification for fd 10
posix-io.c:157: set notification for fd 11
posix-io.c:157: set notification for fd 12
posix-io.c:157: set notification for fd 13
posix-io.c:157: set notification for fd 14
posix-io.c:157: set notification for fd 15
posix-io.c:135: closing fd 9
posix-io.c:135: closing fd 10
posix-io.c:135: closing fd 12
posix-io.c:135: closing fd 15
posix-io.c:329: gpgme:select on [ r7 w13 r14 ]
posix-io.c:375: select OK [ r7 w13 ]
posix-io.c:72: fd 7: about to read 1024 bytes
posix-io.c:79: fd 7: got 30 bytes
fd 7: got `[GNUPG:] PROGRESS stdin ? 0 0
'
posix-io.c:93: fd 13: about to write 126 bytes
fd 13: write `Content-Type: text/plain; charset=US-ASCII^M
Content-Disposition: inline^M
Content-Transfer-Encoding: quoted-printable^M
^M
test^M
'
posix-io.c:101: fd 13: wrote 126 bytes
posix-io.c:329: gpgme:select on [ r7 w13 r14 ]
posix-io.c:375: select OK [ w13 ]
posix-io.c:135: closing fd 13
wait.c:160: setting fd 13 (item=0x8303718) done
posix-io.c:329: gpgme:select on [ r7 r14 ]
posix-io.c:375: select OK [ r7 ]
posix-io.c:72: fd 7: about to read 1024 bytes
posix-io.c:79: fd 7: got 32 bytes
fd 7: got `[GNUPG:] PROGRESS stdin ? 126 0
'
posix-io.c:329: gpgme:select on [ r7 r14 ]
posix-io.c:375: select OK [ r7 ]
posix-io.c:72: fd 7: about to read 1024 bytes
posix-io.c:79: fd 7: got 53 bytes
fd 7: got `[GNUPG:] CARDCTRL 3 D2760001240101010001000004C70000
'
posix-io.c:329: gpgme:select on [ r7 r14 ]
posix-io.c:375: select OK [ r7 ]
posix-io.c:72: fd 7: about to read 1024 bytes
posix-io.c:79: fd 7: got 78 bytes
fd 7: got `[GNUPG:] NEED_PASSPHRASE_PIN OPENPGP 1
[GNUPG:] GET_HIDDEN passphrase.pin.ask
'
posix-io.c:329: gpgme:select on [ r7 w11 r14 ]
posix-io.c:375: select OK [ w11 ]
wait.c:160: setting fd 11 (item=0x8303398) done
posix-io.c:329: gpgme:select on [ r7 r14 ]
posix-io.c:375: select OK [ ]
posix-io.c:329: gpgme:select on [ r7 r14 ]
posix-io.c:375: select OK [ ]
posix-io.c:329: gpgme:select on [ r7 r14 ]
posix-io.c:375: select OK [ ]
posix-io.c:329: gpgme:select on [ r7 r14 ]
posix-io.c:375: select OK [ ]
posix-io.c:329: gpgme:select on [ r7 r14 ]
posix-io.c:375: select OK [ ]
posix-io.c:329: gpgme:select on [ r7 r14 ]
posix-io.c:375: select OK [ ]
posix-io.c:329: gpgme:select on [ r7 r14 ]
posix-io.c:375: select OK [ ]
posix-io.c:329: gpgme:select on [ r7 r14 ]
posix-io.c:375: select OK [ ]
posix-io.c:329: gpgme:select on [ r7 r14 ]
(...snip...)


Mario

--
Mario Fürderer <mario@codehack.org>
Re: GPA and OpenPGP Cryptocard [ In reply to ]
On Tue, 31 May 2005 19:06:22 +0200, Mario Fuerderer said:

> fd 7: got `[GNUPG:] NEED_PASSPHRASE_PIN OPENPGP 1

2004-10-15 Werner Koch <wk@g10code.com>

* status.h (STATUS_NEED_PASSPHRASE_PIN): New.
* status.c (get_status_string): Added.
* passphrase.c (ask_passphrase): Moved status printing to ..
* cardglue.c (pin_cb): .. here and issue new status message.

So it is my fault. Someone requested to have a new status message for
PIN and I have implemented this without thinking about possible
breaking other code. In particular gpgme does not know about this new
status message and is thus won't call the passphrase callback. I will
change this in gpgme.

The workaround and preferable soultion is to use gpg-agent.


Shalom-Salam,

Werner
Re: GPA and OpenPGP Cryptocard [ In reply to ]
Hi!

would you mind to check out the latest gpgme from CVS? It should
allow you to enter the PIN.

I have commited the changes to HEAD as well as the gpgme-1-0-branch.

cvs -d :pserver:anoncvs@cvs.gnupg.org:/cvs/gnupg co gpgme


Salam-Shalom,

Werner
Re: GPA and OpenPGP Cryptocard [ In reply to ]
Hi,

On Thu, 02 Jun 2005 13:17:18 +0200
Werner Koch <wk@gnupg.org> wrote:

> cvs -d :pserver:anoncvs@cvs.gnupg.org:/cvs/gnupg co gpgme

thanks, for the quick fix in the cvs, Werner! :-)
GPA as well as Sylpheed are working like a charm now...

greetings

Mario

--
Mario Fürderer <mario@codehack.org>