Page MenuHome GnuPG

gpgsm: Fix output of card serial numbers in colon listing
AbandonedPublic

Authored by ikloecker on Thu, Nov 6, 3:06 PM.

Details

Reviewers
werner
Summary

The code filling the cache assumes that s points to the end of the
key grip. We have to set it back after we have parsed the serial
number (where we temporarily set s to the start of the serial number).

GnuPG-bug-id: 7914

Without the fix no serial numbers are listed because the hexgrips in the keyinfo_cache all end with " T " which breaks the lookup of the keygrips in the cache.

Test Plan

Run gpgsm -k --with-secret --with-colons. The lines starting with crt should contain the serial numbers of the smartcards that the certificates are stored on in field 15 of the colon-separated list.

Diff Detail

Repository
rG GnuPG
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

ikloecker created this revision.
ikloecker retitled this revision from Fix output of card serial numbers in colon listing to gpgsm: Fix output of card serial numbers in colon listing.Mon, Nov 10, 8:39 AM
ikloecker mentioned this in Unknown Object (Maniphest Task).Mon, Nov 10, 9:01 AM

The revision was actually applied (rG0947a20c28cf: gpgsm: Fix output of card serial number in colon listing.), but Phabricator doesn't allow me to set it as applied because not all reviewers have approved it.