Re: OpenPGP card not available

2024-04-09 Thread Dan Fandrich
On Tue, Apr 09, 2024 at 12:11:31PM +0200, Werner Koch wrote:
> By default we are not using PC/SC on Linux but direct access to the
> reader via USB.  Now if pcscd is already running and has access to the
> reader scdaemon won't be able to access the reader via USB.
> 
> 2.2 falls back to PC/SC if it can't use the reader via USB.

That explains the difference it nicely.

> Either shutdown pcscd or add
> 
> disable-ccid-driver
> 
> to ~/.gnupg/scdaemon.conf

Shutting down pcscd fixed it!  But I have other software that needs pcscd to
access the card, so I added "disable-ccid" to scdaemon.conf and gpg now works
even though pcscd is running.  Thanks for the help.

Dan

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


OpenPGP card not available

2024-04-09 Thread Dan Fandrich
Running "gpg --card-status" with a configured Yubikey plugged in on an x86_64
Linux machine just gives me these errors when running 2.4.5:

gpg: selecting card failed: No such device
gpg: OpenPGP card not available: No such device

However, leaving everything else the same and just running 2.2.42 (& earlier
2.2.x) gives me the output I'd expect with that command.  I've tried some of
the advice I've found of adding "reader-port Yubico Yubi" and "pcsc-shared" to
scdaemon.conf didn't make a difference. Enabling some scdaemon logging shows
this interesting bit in the log file:

2024-04-08 16:45:28 scdaemon[62168] DBG: chan_7 <- SERIALNO
2024-04-08 16:45:28 scdaemon[62168] DBG: apdu_open_reader: BAI=70202
2024-04-08 16:45:28 scdaemon[62168] DBG: apdu_open_reader: new device=70202
2024-04-08 16:45:28 scdaemon[62168] ccid open error: skip
2024-04-08 16:45:28 scdaemon[62168] DBG: chan_7 -> ERR 100696144 No such device 


With 2.2.42, I see this (with an actual serial number) and all works well:

2024-04-08 16:38:43 scdaemon[36563] DBG: chan_7 <- SERIALNO
2024-04-08 16:38:43 scdaemon[36563] DBG: apdu_open_reader: BAI=70202
2024-04-08 16:38:43 scdaemon[36563] DBG: apdu_open_reader: new device=70202
2024-04-08 16:38:43 scdaemon[36563] ccid open error: skip
2024-04-08 16:38:43 scdaemon[36563] DBG: chan_7 -> S SERIALNO 
D000
2024-04-08 16:38:43 scdaemon[36563] DBG: chan_7 -> OK
...

Running "echo SERIALNO | scd/scdaemon --server" is enough.  I've tried both
pcsc-lite 1.9.9 and 2.0.3 without a difference.  I'm not sure how to drill
down to figure out further to figure out what else could be causing the
failure. One obvious difference is that the working version is linked against
libpthread.so.0 but the failing one is linked against libnpth.so.0, but that
seems to have to do with locking which I wouldn't expect to make difference
with a simple local test.

I was hoping to bisect to the problem except that the 2.3 and 2.4 branches fail
at their .0 versions. Does someone have a suggestion to debug further?

Dan

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


Re: OpenPGP card not available

2024-04-09 Thread Werner Koch via Gnupg-users
On Mon,  8 Apr 2024 21:50, Dan Fandrich said:

> Running "echo SERIALNO | scd/scdaemon --server" is enough.  I've tried both
> pcsc-lite 1.9.9 and 2.0.3 without a difference.  I'm not sure how to drill

By default we are not using PC/SC on Linux but direct access to the
reader via USB.  Now if pcscd is already running and has access to the
reader scdaemon won't be able to access the reader via USB.

2.2 falls back to PC/SC if it can't use the reader via USB.

Either shutdown pcscd or add

disable-ccid-driver

to ~/.gnupg/scdaemon.conf

More debug output can be logged by adding

debug cardio
debug-ccid-reader


Shalom-Salam,

   Werner


-- 
The pioneers of a warless world are the youth that
refuse military service. - A. Einstein


openpgp-digital-signature.asc
Description: PGP signature
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users


OpenPGP card not available

2024-04-08 Thread Dan Fandrich
Running "gpg --card-status" with a configured Yubikey plugged in on an x86_64
Linux machine just gives me these errors when running 2.4.5:

gpg: selecting card failed: No such device
gpg: OpenPGP card not available: No such device

However, leaving everything else the same and just running 2.2.42 (& earlier
2.2.x) gives me the output I'd expect with that command.  I've tried some of
the advice I've found of adding "reader-port Yubico Yubi" and "pcsc-shared" to
scdaemon.conf didn't make a difference. Enabling some scdaemon logging shows
this interesting bit in the log file:

2024-04-08 16:45:28 scdaemon[62168] DBG: chan_7 <- SERIALNO
2024-04-08 16:45:28 scdaemon[62168] DBG: apdu_open_reader: BAI=70202
2024-04-08 16:45:28 scdaemon[62168] DBG: apdu_open_reader: new device=70202
2024-04-08 16:45:28 scdaemon[62168] ccid open error: skip
2024-04-08 16:45:28 scdaemon[62168] DBG: chan_7 -> ERR 100696144 No such device 


With 2.2.42, I see this (with an actual serial number) and all works well:

2024-04-08 16:38:43 scdaemon[36563] DBG: chan_7 <- SERIALNO
2024-04-08 16:38:43 scdaemon[36563] DBG: apdu_open_reader: BAI=70202
2024-04-08 16:38:43 scdaemon[36563] DBG: apdu_open_reader: new device=70202
2024-04-08 16:38:43 scdaemon[36563] ccid open error: skip
2024-04-08 16:38:43 scdaemon[36563] DBG: chan_7 -> S SERIALNO 
D000
2024-04-08 16:38:43 scdaemon[36563] DBG: chan_7 -> OK
...

Running "echo SERIALNO | scd/scdaemon --server" is enough.  I've tried both
pcsc-lite 1.9.9 and 2.0.3 without a difference.  I'm not sure how to drill
down to figure out further to figure out what else could be causing the
failure. One obvious difference is that the working version is linked against
libpthread.so.0 but the failing one is linked against libnpth.so.0, but that
seems to have to do with locking which I wouldn't expect to make difference
with a simple local test.

I was hoping to bisect to the problem except that the 2.3 and 2.4 branches fail
at their .0 versions. Does someone have a suggestion to debug further?

Dan

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


OpenPGP card not available- Card error

2010-01-15 Thread taurus

Hi list,

Change to a new macbook pro and my card reader is not recognized by  
gpg2.

In the old notebook is fine. OS is the same in both; Mac OSX 10.5.8

i_terminal

computer:~$ pcsctest

MUSCLE PC/SC Lite Test Program

Testing SCardEstablishContext: Command successful.
Testing SCardGetStatusChange
Please insert a working reader   : Command successful.
Testing SCardListReaders : Command successful.
Reader 01: Gemplus GemPC Twin 00 00
Enter the reader number  : 01
Waiting for card insertion
 : Command successful.
Testing SCardConnect : Command successful.
Testing SCardStatus  : Command successful.
Current Reader Name  : Gemplus GemPC Twin 00 00
Current Reader State : 0x34
Current Reader Protocol  : 0x1
Current Reader ATR Size  : 20 (0x14)
Current Reader ATR Value : 3B FA 13 00 FF 81 31 80 45 00 31 C1  
73 C0 01 00 00 90 00 B1

Testing SCardDisconnect  : Command successful.
Testing SCardReleaseContext  : Command successful.
Testing SCardEstablishContext: Command successful.
Testing SCardGetStatusChange
Please insert a working reader   : Command successful.
Testing SCardListReaders : Command successful.
Reader 01: Gemplus GemPC Twin 00 00
Enter the reader number  : 01
Waiting for card insertion
 : Command successful.
Testing SCardConnect : Command successful.
Testing SCardStatus  : Command successful.
Current Reader Name  : Gemplus GemPC Twin 00 00
Current Reader State : 0x34
Current Reader Protocol  : 0x1
Current Reader ATR Size  : 20 (0x14)
Current Reader ATR Value : 3B FA 13 00 FF 81 31 80 45 00 31 C1  
73 C0 01 00 00 90 00 B1

Testing SCardDisconnect  : Command successful.
Testing SCardReleaseContext  : Command successful.

PC/SC Test Completed Successfully !
~$ gpg --card-status
gpg: selecting openpgp failed: Card error
gpg: OpenPGP card not available: Card error
computer:~$

/_terminal


Any idea?

TIA.



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


Re: OpenPGP card not available- Card error

2010-01-15 Thread Benjamin Donnachie
2010/1/15 taurus taurus...@gmail.com:
 Change to a new macbook pro and my card reader is not recognized by gpg2.
 In the old notebook is fine. OS is the same in both; Mac OSX 10.5.8

Are you using MacGPG2, http://macgpg2.sourceforge.net/ ?

Ben

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


Re: OpenPGP card not available- Card error

2010-01-15 Thread taurus


On 16 January 2010, at 00:39, Benjamin Donnachie wrote:


2010/1/16 taurus taurus...@gmail.com:

Are you using MacGPG2, http://macgpg2.sourceforge.net/ ?

Yes, and is working fine in both notebooks.


But you're having trouble with the OpenPGP cards?


Could it be  related to the fact that in the new macbook I have
installed the software for the ID card (pt)?

Link:
http://www.cartaodecidadao.pt/index.php?option=com_contenttask=viewid=102Itemid=44lang=pt




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


Re: gpg: OpenPGP card not available: Assuan server fault

2006-03-07 Thread Felix E. Klee
At Mon, 13 Feb 2006 14:47:51 +0100,
Werner Koch wrote:
  As I'm at it, a minor complaint: In order to get the gpg2 binary, I
  had to do:
 
 You shall not build gpg2.  Configure does not enable this option for a
 reason.  Use gpg 1.4.2 (or the cvs version) for OpenPGP.  This is
 stated at several places.

But I don't want to do OpenPGP: I want to do SSH with the OpenPGP card.
I roughly followed the howto behind the following URL:

  http://cyphertext.de/ssh-openpgpcard-howto.txt

This howto mentions the use of gpg2.

-- 
Felix E. Klee

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


gpg: OpenPGP card not available: Assuan server fault

2006-02-12 Thread Felix E. Klee
Today, I tried out GnuPG 1.9.21 (from CVS) and GnuPG 1.9.20, in order to
access OpenPGP cards with my SPR532 card reader, but without success -
see below.  Any idea what I may be doing wrong?  I tried it out with two
different cards, at least one of which is yet unused.

As I'm at it, a minor complaint: In order to get the gpg2 binary, I had
to do:

  gnupg-1.9.20/g10# make
  gnupg-1.9.20/g10# make install

It was not sufficient to do:

  gnupg-1.9.20# make
  gnupg-1.9.20# make install

AFAICS, the above additional step is not documented anywhere.

Details:

* Messages with 1.9.20:

  # gpgsm --learn-card
  gpgsm: NOTE: THIS IS A DEVELOPMENT VERSION!
  gpgsm: It is only intended for test purposes and should NOT be
  gpgsm: used in a production environment or with production keys!
  gpgsm: can't connect to `/root/.gnupg/S.gpg-agent': No such file or directory
  scdaemon[13949]: NOTE: this is a development version!
  scdaemon[13949]: reading public key failed: Missing item in object
  scdaemon[13949]: reading public key failed: Missing item in object
  scdaemon[13949]: reading public key failed: Missing item in object
  gpg-agent[13948]: card has S/N: D276000124010101000105B6
  # scdaemon[13949]: scdaemon (GnuPG) 1.9.20 stopped
  
  # gpg2 --card-edit
  gpg: NOTE: THIS IS A DEVELOPMENT VERSION!
  gpg: It is only intended for test purposes and should NOT be
  gpg: used in a production environment or with production keys!
  gpg: WARNING: This version of gpg is not very matured and
  gpg: WARNING: only intended for testing.  Please keep using
  gpg: WARNING: gpg 1.2.x, 1.3.x or 1.4.x for OpenPGP
  
  gpg: DBG: connection to agent established
  scdaemon[13961]: NOTE: this is a development version!
  scdaemon[13961]: reading public key failed: Missing item in object
  scdaemon[13961]: reading public key failed: Missing item in object
  scdaemon[13961]: reading public key failed: Missing item in object
  gpg-agent[13960]: card has S/N: D276000124010101000105B6
  Application ID ...: D276000124010101000105B6
  Version ..: 1.1
  Manufacturer .: PPC Card Systems
  Serial number : 05B6
  Name of cardholder: [not set]
  Language prefs ...: de
  Sex ..: unspecified
  URL of public key : [not set]
  Login data ...: [not set]
  Signature PIN : forced
  Max. PIN lengths .: 254 254 254
  PIN retry counter : 3 3 3
  Signature counter : 0
  Signature key : [none]
  Encryption key: [none]
  Authentication key: [none]
  General key info..: [none]
  
  Command scdaemon[13961]: updating status of slot 0 to 0x0007
  scdaemon[13961]: client pid is 13960, sending signal 12
  scdaemon[13961]: scdaemon (GnuPG) 1.9.20 stopped
  
   
  gpg: OpenPGP card not available: Assuan server fault

* Messages with 1.9.21 from CVS:

  # gpgsm --learn-card
  gpgsm: NOTE: THIS IS A DEVELOPMENT VERSION!
  gpgsm: It is only intended for test purposes and should NOT be
  gpgsm: used in a production environment or with production keys!
  gpgsm: can't connect to `/root/.gnupg/S.gpg-agent': No such file or directory
  scdaemon[15326]: NOTE: this is a development version!
  scdaemon[15326]: reading public key failed: Missing item in object
  scdaemon[15326]: reading public key failed: Missing item in object
  scdaemon[15326]: reading public key failed: Missing item in object
  gpg-agent[15325]: card has S/N: D276000124010101000105B6
  # scdaemon[15326]: scdaemon (GnuPG) 1.9.21-cvs3973 stopped
  
  # gpg2 --card-edit
  gpg: NOTE: THIS IS A DEVELOPMENT VERSION!
  gpg: It is only intended for test purposes and should NOT be
  gpg: used in a production environment or with production keys!
  gpg: WARNING: This version of gpg is not very matured and
  gpg: WARNING: only intended for testing.  Please keep using
  gpg: WARNING: gpg 1.2.x, 1.3.x or 1.4.x for OpenPGP
  
  gpg: DBG: connection to agent established
  scdaemon[15355]: NOTE: this is a development version!
  scdaemon[15355]: reading public key failed: Missing item in object
  scdaemon[15355]: reading public key failed: Missing item in object
  scdaemon[15355]: reading public key failed: Missing item in object
  gpg-agent[15354]: card has S/N: D276000124010101000105B6
  Application ID ...: D276000124010101000105B6
  Version ..: 1.1
  Manufacturer .: PPC Card Systems
  Serial number : 05B6
  Name of cardholder: [not set]
  Language prefs ...: de
  Sex ..: unspecified
  URL of public key : [not set]
  Login data ...: [not set]
  Signature PIN : forced
  Max. PIN lengths .: 254 254 254
  PIN retry counter : 3 3 3
  Signature counter : 0
  Signature key : [none]
  Encryption key: [none]
  Authentication key: [none]
  General key info..: [none]
  
  Command scdaemon[15355]: updating status of slot 0 to 0x0007
  scdaemon[15355]: client pid is 15354, sending signal 12
  scdaemon[15355]: scdaemon (GnuPG) 1.9.21-cvs3973 stopped
  
   
  gpg: OpenPGP