mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
* gpg.sgml: Document "addcardkey" and "keytocard".
* apdu.c (open_pcsc_reader): Do not print empty reader string. * keygen.c (ask_algo): Allow creation of AUTH keys. * keyid.c (usagestr_from_pk): New. * app-openpgp.c (app_openpgp_storekey): Call flush_cache. * keyedit.c (keyedit_menu): New command "keytocard" (keyedit_menu): Bad hack for the not_with_sk element. (show_key_with_all_names): Print the usage. (find_pk_from_sknode): New. * card-util.c (card_store_subkey): New. (copy_mpi): New. * cardglue.c (agent_openpgp_storekey): New.
This commit is contained in:
parent
d937ace2f8
commit
42c18de83a
15 changed files with 589 additions and 125 deletions
29
g10/keyid.c
29
g10/keyid.c
|
@ -535,6 +535,35 @@ revokestr_from_pk( PKT_public_key *pk )
|
|||
return mk_datestr (buffer, atime);
|
||||
}
|
||||
|
||||
|
||||
const char *
|
||||
usagestr_from_pk( PKT_public_key *pk )
|
||||
{
|
||||
static char buffer[10];
|
||||
int i = 0;
|
||||
unsigned int use = pk->pubkey_usage;
|
||||
|
||||
if ( use & PUBKEY_USAGE_SIG )
|
||||
{
|
||||
if (pk->is_primary)
|
||||
buffer[i++] = 'C';
|
||||
buffer[i++] = 'S';
|
||||
}
|
||||
|
||||
if ( use & PUBKEY_USAGE_ENC )
|
||||
buffer[i++] = 'E';
|
||||
|
||||
if ( (use & PUBKEY_USAGE_AUTH) )
|
||||
buffer[i++] = 'A';
|
||||
|
||||
while (i < 4)
|
||||
buffer[i++] = ' ';
|
||||
|
||||
buffer[i] = 0;
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
||||
const char *
|
||||
colon_strtime (u32 t)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue