1
0
Fork 0
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:
Werner Koch 2004-09-23 13:32:31 +00:00
parent d937ace2f8
commit 42c18de83a
15 changed files with 589 additions and 125 deletions

View file

@ -1177,6 +1177,14 @@ ask_algo (int addmode, unsigned int *r_usage)
tty_printf( _(" (%d) RSA (encrypt only)\n"), 5 );
if (opt.expert)
tty_printf( _(" (%d) RSA (sign and encrypt)\n"), 6 );
if (opt.expert && addmode)
tty_printf( _(" (%d) RSA (auth only)\n"), 7 );
if (opt.expert)
tty_printf( _(" (%d) RSA (sign and auth)\n"), 8 );
if (opt.expert && addmode)
tty_printf( _(" (%d) RSA (encrypt and auth)\n"), 9 );
if (opt.expert)
tty_printf( _(" (%d) RSA (sign, encrypt and auth)\n"), 10 );
for(;;) {
answer = cpr_get("keygen.algo",_("Your selection? "));
@ -1187,6 +1195,26 @@ ask_algo (int addmode, unsigned int *r_usage)
algo = 0; /* create both keys */
break;
}
else if( algo == 10 && opt.expert ) {
algo = PUBKEY_ALGO_RSA;
*r_usage = PUBKEY_USAGE_ENC | PUBKEY_USAGE_SIG | PUBKEY_USAGE_AUTH;
break;
}
else if( algo == 9 && opt.expert && addmode) {
algo = PUBKEY_ALGO_RSA;
*r_usage = PUBKEY_USAGE_ENC | PUBKEY_USAGE_AUTH;
break;
}
else if( algo == 8 && opt.expert ) {
algo = PUBKEY_ALGO_RSA;
*r_usage = PUBKEY_USAGE_SIG | PUBKEY_USAGE_AUTH;
break;
}
else if( algo == 7 && opt.expert && addmode) {
algo = PUBKEY_ALGO_RSA;
*r_usage = PUBKEY_USAGE_AUTH;
break;
}
else if( algo == 6 && opt.expert ) {
algo = PUBKEY_ALGO_RSA;
*r_usage = PUBKEY_USAGE_ENC | PUBKEY_USAGE_SIG;