Re: OpenPGP card issues

2011-09-09 Thread David Robertson
> To start the agent you need to add the --daemon argument.  For
> testing you may use this:
> 
> gpg-agent --use-standard --daemon sh
> 
> which opens a new shell and sets up everything.  You need to make
> sure that no other agent is running and controlling the card.
> 
> You should also unset the GPG_AGENT_INFO ebvar which might have
> been set by another script.

I tried this:

david@david-desktop-debian:~$ unset GPG_AGENT_INFO
david@david-desktop-debian:~$ gpg-agent --use-standard --daemon sh
gpg-agent[7657]: a gpg-agent is already running - not starting a new one
david@david-desktop-debian:~$ pkill gpg-agent
david@david-desktop-debian:~$ gpg-agent --use-standard --daemon sh
$ gpg2 --card-status
gpg: selecting openpgp failed: Card error
gpg: OpenPGP card not available: Card error
$






-- 
Thanks,
David Robertson.

da...@davidr.me  |  djpeterrobert...@gmail.com

___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: OpenPGP card issues

2011-09-09 Thread Werner Koch
On Fri,  9 Sep 2011 00:14, djpeterrobert...@gmail.com said:

> david@david-desktop-debian:/$ gpg-agent --use-standard-socket

To start the agent you need to add the --daemon argument.  For testing
you may use this:

  gpg-agent --use-standard --daemon sh

which opens a new shell and sets up everything.  You need to make sure
that no other agent is running and controlling the card.

You should also unset the GPG_AGENT_INFO ebvar which might have been set
by another script.


Salam-Shalom,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.


___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: OpenPGP card issues

2011-09-08 Thread David Robertson
I don't have a ~/.gnupg/gpg-agent.conf and starting gpg-agent with
--use-standard-socket doesn't work:

david@david-desktop-debian:/$ gpg-agent --use-standard-socket
gpg-agent[4092]: can't connect to `/tmp/gpg-ZGPhgS/S.gpg-agent': No such
file or directory
gpg-agent[4092]: can't connect to `/home/david/.gnupg/S.gpg-agent': No such
file or directory
gpg-agent: can't connect to the agent: IPC connect call failed
david@david-desktop-debian:/$ sudo su
[sudo] password for david:
root@david-desktop-debian:/# gpg-agent --use-standard-socket
gpg-agent[4104]: can't connect to `/root/.gnupg/S.gpg-agent': No such file
or directory
gpg-agent: no gpg-agent running in this session

I've completely removed seahorse and that's done nothing either, so I've
reinstalled it for now. Also it seemed originally I only couldn't connect to
gpg-agent when I had SUed to root, now I seem to get this:

david@david-desktop-debian:/$ gpg2 --card-status
can't connect to `/tmp/gpg-ZGPhgS/S.gpg-agent': No such file or directory
gpg: can't connect to the agent - trying fall back
can't connect to `/home/david/.gnupg/S.gpg-agent': No such file or directory
scdaemon[4301]: PC/SC OPEN failed: comm error
gpg: selecting openpgp failed: Card error
gpg: OpenPGP card not available: Card error
david@david-desktop-debian:/$ scdaemon[4301]: scdaemon (GnuPG) 2.0.14
stopped



--
Thanks,
David Robertson.

djpeterrobert...@gmail.com
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: OpenPGP card issues

2011-09-07 Thread David Tomaschik
On 09/07/2011 04:13 PM, David Robertson wrote:
> I posted this earlier:
>
>> Hello,
>> I've just bought myself a Gemplus/Gemalto GemPC twin USB smartcard
>> reader and a V2.0 OpenPGP card. I'm running Debian Squeeze. I've set up
>> udev rules as described here
>> http://www.gnupg.org/howtos/card-howto/en/smartcard-howto-single.html .
>> However, when I insert my card and type gpg --card-status I get (gpg
>> 1.4.10)
>>
>> gpg: selecting openpgp failed: ec=6.108
>> gpg: OpenPGP card not available: general error
>>
>> Using gpg2 (2.0.14), I get
>>
>> gpg: selecting openpgp failed: Card error
>> gpg: OpenPGP card not available: Card error
>>
>> If i su into root, I get a different output for  gpg 1.4.10:
>>
>> gpg: pcsc_establish_context failed: no service (0x8010001d)
>> gpg: card reader not available
>> gpg: OpenPGP card not available: general error
>>
> I had it up and running since I posted this but yesterday it
> spontaneously stopped working again.
>
> I've since been emailing Martin Gollowitzer  from this
> list as he helped me get it to work in the first place, but he ran out
> of ideas of how to fix it.
>
> Anyway, some background info:
> * The reader is a Gemalto/gemplus GemPC twin (USB)
> * The card is an OpenPGP V2.0 bought from kernelconcepts
> * I'm pretty sure I've got all of the udev stuff set up fine, No changes
> were made to anything udev when it broke, and I tried removing the
> relevant rules and adding them with Martin's script from here
> http://download.fsfe.org/tools/cardreader/udev-howto-automatization.sh
> * Now, the outputs of gpg --card-status and gpg2 --card-status are as
> follows:
> david@david-desktop-debian:~$ gpg2 --card-status
> gpg: selecting openpgp failed: Card error
> gpg: OpenPGP card not available: Card error
> david@david-desktop-debian:~$ gpg --card-status
> gpg: selecting openpgp failed: ec=6.108
> gpg: OpenPGP card not available: general error
> david@david-desktop-debian:~$
> * And as root:
> david@david-desktop-debian:/$ sudo su
> [sudo] password for david:
> root@david-desktop-debian:/# gpg --card-status
> gpg: pcsc_establish_context failed: comm error (0x80100013)
> gpg: card reader not available
> gpg: OpenPGP card not available: general error
> root@david-desktop-debian:/# gpg2 --card-status
> can't connect to `/root/.gnupg/S.gpg-agent': No such file or directory
> scdaemon[6852]: PC/SC OPEN failed: comm error
> gpg: selecting openpgp failed: Card error
> gpg: OpenPGP card not available: Card error
> root@david-desktop-debian:/# scdaemon[6852]: scdaemon (GnuPG) 2.0.14
> stopped
> * pcscd and gpg-agent are definatly running
>
>
> Any ideas anyone?
>
I'd meant to respond to your first message when I saw it on my phone,
but then promptly forgot.  It looks like gpg2 can't find your gpg-agent
socket.  Try adding "use-standard-socket" to ~/.gnupg/gpg-agent.conf (or
starting gpg-agent with --use-standard-socket) and see if that helps.

Also, make sure seahorse and other gnome utilities aren't getting in the
way.  I've run into their "pseudo-gpg-agent" too many times.

David


-- 
David Tomaschik, RHCE, LPIC-1
System Administrator/Open Source Advocate
OpenPGP: 0x5DEA789B
http://systemoverlord.com
da...@systemoverlord.com


___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users