Remove SERIALNO as an identifier to select keys
Open, HighPublic

Description

In the stub file, we have SERIALNO. That has been so, until today.

This information is not needed any more, except the interaction to user asking insertion of card. And asking with SERIALNO does not help much.

Showing KEYGRIP when asking would not be better, but it is good to clean up the implementation.

I have a patch now, being attached.

gniibe created this task.Thu, Sep 5, 8:04 AM

I did too many things at once.
I'm going to divide up into pieces.

gniibe added a comment.Fri, Sep 6, 1:37 AM

By the change of rG9f39e0167d06: agent: Fix ask_for_card to allow a key on multiple cards., the SERIALNO in the stub is just an auxiliary information, not identifying the card. Now, it is the keygrip for key to identify/select the card.

gniibe lowered the priority of this task from Unbreak Now! to High.Fri, Sep 6, 1:37 AM
gniibe added a comment.Fri, Sep 6, 1:41 AM

Still there are two places where we use "SCD serialno --demand <SERIALNO>". One is g10/skclist.c where we list available keys, another is the funciton card_key_available in agent/command-ssh.c .

Those parts could/should be changed by using "SCD KEYINFO --list".

BTW: I have the problem that I want to know the keys of all cards. "getinfo card_list" along with --demand can be used for this. gpg-card works this way. It does not work if plug in addtional cards becuase card_list shows only the cards for which a SERIALNO command has been used. A new feature to scan the buses for all readers and cards would be quite useful.