Resetting an OpenPGP smart card "bricks" it

Werner Koch wk at gnupg.org
Tue Mar 11 17:10:12 CET 2014


On Tue, 11 Mar 2014 11:44, bootc at bootc.net said:

> reverse the last two APDUs (e6 then 44 rather than 44 then e6). I
> believe that E6 is 'TERMINATE DF' and 44 is 'ACTIVATE FILE', so the 2009
> instructions are probably correct while the 2013 ones are not.

IIRC, early v2 cards have a bug which partly reverses terminate and
activate.  Thus there should actually be 4 versions of the instructions.
Unfortunately I have never worked out the details.  My way of resetting
the card is using the commands several times while inbetween removing
the card from the reader.

> run on them, please? I can't even get gpg-connect-agent to talk to the
> cards now ("gpg: OpenPGP card not available: Not supported"), nor even
> tools like opensc-explorer.

There is a little trick here:

  > scd reset
  OK
  > scd serialno undefined
  S SERIALNO FF7F00 0

The SEARIALNO command takes an option argument to select the
application.  You may use 'undefined' followed by standard APDU
commands:

  @subsection The Undefined card application ``undefined''
  
  This is a stub application to allow the use of the APDU command even
  if no supported application is found on the card.  This application is
  not used automatically but must be explicitly requested using the
  SERIALNO command.
  

Shalom-Salam,

   Werner

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




More information about the Gnupg-users mailing list