1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

scd: New getinfo subcommand "manufacturer"

* scd/command.c (cmd_getinfo): Add subcommand "manufacturer".
* scd/app-openpgp.c (get_manufacturer): Rename to ...
(app_openpgp_manufacturer): this and make global.
--

Example:

  $ gpg-connect-agent 'scd getinfo manufacturer 42' /bye
  D Magrathea
  OK

Backported-from-master: a8cef7ebc2
This commit is contained in:
Werner Koch 2024-08-07 11:20:59 +02:00
parent dfc400a2d9
commit 1d0874c3d2
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
3 changed files with 24 additions and 15 deletions

View file

@ -279,8 +279,8 @@ static gpg_error_t change_keyattr_from_string
/* Return the OpenPGP card manufacturer name. */
static const char *
get_manufacturer (unsigned int no)
const char *
app_openpgp_manufacturer (unsigned int no)
{
/* Note: Make sure that there is no colon or linefeed in the string. */
switch (no)
@ -1207,7 +1207,7 @@ do_getattr (app_t app, ctrl_t ctrl, const char *name)
return send_status_printf
(ctrl, table[idx].name, "%u %s",
app->app_local->manufacturer,
get_manufacturer (app->app_local->manufacturer));
app_openpgp_manufacturer (app->app_local->manufacturer));
}
if (table[idx].special == -9)
{