mirror of
git://git.gnupg.org/gnupg.git
synced 2024-10-31 20:08:43 +01:00
scd:openpgp: New KEY-STATUS attribute.
* scd/app-openpgp.c (do_getattr): Return KEY-STATUS
This commit is contained in:
parent
08310849a2
commit
2149676122
@ -1178,6 +1178,14 @@ pkd:0:1024:B665B1435F4C2 .... FF26ABB:
|
|||||||
name of the manufacturer is also given as <string>; spaces are not
|
name of the manufacturer is also given as <string>; spaces are not
|
||||||
escaped. For PKCS#15 cards <string> is TokenInfo.manufactorerID.
|
escaped. For PKCS#15 cards <string> is TokenInfo.manufactorerID.
|
||||||
|
|
||||||
|
*** KEY-STATUS <keyref> <status>
|
||||||
|
This is the response from scdaemon on GETATTR KEY-STATUS for
|
||||||
|
OpenPGP cards. <keyref> is the usual keyref (e.g. OPENPGP.1 or
|
||||||
|
OPENPGP.129) and <status> is an integer describing the status of
|
||||||
|
the key: 0 = key is not present, 1 = key generated on card, 2 =
|
||||||
|
key imported. See section 4.4.3.8 of the OpenPGP Smart Card
|
||||||
|
Application V3.4.
|
||||||
|
|
||||||
* Format of the --attribute-fd output
|
* Format of the --attribute-fd output
|
||||||
|
|
||||||
When --attribute-fd is set, during key listings (--list-keys,
|
When --attribute-fd is set, during key listings (--list-keys,
|
||||||
|
@ -1080,9 +1080,10 @@ do_getattr (app_t app, ctrl_t ctrl, const char *name)
|
|||||||
{ "UIF-1", 0x00D6, 0 },
|
{ "UIF-1", 0x00D6, 0 },
|
||||||
{ "UIF-2", 0x00D7, 0 },
|
{ "UIF-2", 0x00D7, 0 },
|
||||||
{ "UIF-3", 0x00D8, 0 },
|
{ "UIF-3", 0x00D8, 0 },
|
||||||
{ "UIF", 0x0000, -9 }, /* Shortcut for all UIF */
|
|
||||||
{ "KDF", 0x00F9, 5 },
|
{ "KDF", 0x00F9, 5 },
|
||||||
{ "MANUFACTURER", 0x0000, -8 },
|
{ "MANUFACTURER", 0x0000, -8 },
|
||||||
|
{ "UIF", 0x0000, -9 }, /* Shortcut for all UIF */
|
||||||
|
{ "KEY-STATUS", 0x00DE, 6 },
|
||||||
{ NULL, 0 }
|
{ NULL, 0 }
|
||||||
};
|
};
|
||||||
int idx, i, rc;
|
int idx, i, rc;
|
||||||
@ -1234,6 +1235,14 @@ do_getattr (app_t app, ctrl_t ctrl, const char *name)
|
|||||||
|
|
||||||
send_status_info (ctrl, table[idx].name, value, valuelen, NULL, 0);
|
send_status_info (ctrl, table[idx].name, value, valuelen, NULL, 0);
|
||||||
}
|
}
|
||||||
|
else if (table[idx].special == 6)
|
||||||
|
{
|
||||||
|
for (i=0,rc=0; !rc && i+1 < valuelen; i += 2)
|
||||||
|
rc = send_status_printf (ctrl, table[idx].name, "OPENPGP.%u %u",
|
||||||
|
value[i], value[i+1]);
|
||||||
|
if (gpg_err_code (rc) == GPG_ERR_NO_OBJ)
|
||||||
|
rc = gpg_error (GPG_ERR_NOT_SUPPORTED);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
send_status_info (ctrl, table[idx].name, value, valuelen, NULL, 0);
|
send_status_info (ctrl, table[idx].name, value, valuelen, NULL, 0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user