Home GnuPG
Diffusion GnuPG cc5aa68b6310

scd:p15: Fix last commit and improve D-TRUST detection.

Description

scd:p15: Fix last commit and improve D-TRUST detection.

* scd/app-p15.c (read_p15_info): Improve D-TRUST card detection.
(do_getattr): Fix faulty code for the last commit.  Append the product
name to MANUFACTURER.
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Apr 25 2021, 4:35 PM
Parents
rG21e3f750bd7d: scd:p15: Shorten the displayed s/n of RSCS cards
Branches
Unknown
Tags
Unknown

Event Timeline

ikloecker added inline comments.
/scd/app-p15.c
4582

This condition seems wrong. It prints manufacturer_id followed by [] (empty pair of brackets) if card_product is 0 (unknown) and manufacturer_id contains a [.

I think

if (app->app_local->manufacturer_id
    && !strchr (app->app_local->manufacturer_id, '[')
    && app->app_local->card_product)

makes much more sense, i.e. print manufacturer_id followed by card_product in brackets, if manufacturer_id does not already contain [ and if the card_product is known.

I fully agree. That was actually my itention - not sure why the coded ended up as it is.