diff options
author | Werner Koch <wk@gnupg.org> | 2004-09-23 15:32:31 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2004-09-23 15:32:31 +0200 |
commit | 42c18de83a8eab8d4da3e4d4193a8750cf8ba6be (patch) | |
tree | 1ef5722c3febb23acd01cb49bf266dfd370a6047 /g10/keygen.c | |
parent | * mainproc.c (check_sig_and_print), keyedit.c (show_prefs, (diff) | |
download | gnupg2-42c18de83a8eab8d4da3e4d4193a8750cf8ba6be.tar.xz gnupg2-42c18de83a8eab8d4da3e4d4193a8750cf8ba6be.zip |
* 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.
Diffstat (limited to 'g10/keygen.c')
-rw-r--r-- | g10/keygen.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/g10/keygen.c b/g10/keygen.c index 44cfc00ec..23bbed1ee 100644 --- a/g10/keygen.c +++ b/g10/keygen.c @@ -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; |