gnupg/g10 (ChangeLog keygen.c)
cvs user dshaw
cvs at cvs.gnupg.org
Thu Dec 9 16:41:31 CET 2004
Date: Thursday, December 9, 2004 @ 16:49:47
Author: dshaw
Path: /cvs/gnupg/gnupg/g10
Modified: ChangeLog keygen.c
* keygen.c (ask_algo): Add a choose-your-own-capabilities option for DSA.
-----------+
ChangeLog | 5 +++++
keygen.c | 23 +++++++++++++++--------
2 files changed, 20 insertions(+), 8 deletions(-)
Index: gnupg/g10/ChangeLog
diff -u gnupg/g10/ChangeLog:1.647 gnupg/g10/ChangeLog:1.648
--- gnupg/g10/ChangeLog:1.647 Tue Dec 7 18:58:35 2004
+++ gnupg/g10/ChangeLog Thu Dec 9 16:49:46 2004
@@ -1,3 +1,8 @@
+2004-12-09 David Shaw <dshaw at jabberwocky.com>
+
+ * keygen.c (ask_algo): Add a choose-your-own-capabilities option
+ for DSA.
+
2004-12-07 David Shaw <dshaw at jabberwocky.com>
* keygen.c (ask_keysize): Change strings to always use %u instead
Index: gnupg/g10/keygen.c
diff -u gnupg/g10/keygen.c:1.136 gnupg/g10/keygen.c:1.137
--- gnupg/g10/keygen.c:1.136 Tue Dec 7 18:58:35 2004
+++ gnupg/g10/keygen.c Thu Dec 9 16:49:47 2004
@@ -1349,13 +1349,15 @@
if( !addmode )
tty_printf(_(" (%d) DSA and Elgamal (default)\n"), 1 );
tty_printf( _(" (%d) DSA (sign only)\n"), 2 );
+ if (opt.expert)
+ tty_printf( _(" (%d) DSA (set your own capabilities)\n"), 3 );
if( addmode )
- tty_printf( _(" (%d) Elgamal (encrypt only)\n"), 3 );
- tty_printf( _(" (%d) RSA (sign only)\n"), 4 );
+ tty_printf(_(" (%d) Elgamal (encrypt only)\n"), 4 );
+ tty_printf( _(" (%d) RSA (sign only)\n"), 5 );
if (addmode)
- tty_printf( _(" (%d) RSA (encrypt only)\n"), 5 );
+ tty_printf(_(" (%d) RSA (encrypt only)\n"), 6 );
if (opt.expert)
- tty_printf( _(" (%d) RSA (set your own capabilities)\n"), 6 );
+ tty_printf( _(" (%d) RSA (set your own capabilities)\n"), 7 );
for(;;) {
answer = cpr_get("keygen.algo",_("Your selection? "));
@@ -1366,26 +1368,31 @@
algo = 0; /* create both keys */
break;
}
- else if( algo == 6 && opt.expert ) {
+ else if( algo == 7 && opt.expert ) {
algo = PUBKEY_ALGO_RSA;
*r_usage=ask_key_flags(algo);
break;
}
- else if( algo == 5 && addmode ) {
+ else if( algo == 6 && addmode ) {
algo = PUBKEY_ALGO_RSA;
*r_usage = PUBKEY_USAGE_ENC;
break;
}
- else if( algo == 4 ) {
+ else if( algo == 5 ) {
algo = PUBKEY_ALGO_RSA;
*r_usage = PUBKEY_USAGE_SIG;
break;
}
- else if( algo == 3 && addmode ) {
+ else if( algo == 4 && addmode ) {
algo = PUBKEY_ALGO_ELGAMAL_E;
*r_usage = PUBKEY_USAGE_ENC;
break;
}
+ else if( algo == 3 && opt.expert ) {
+ algo = PUBKEY_ALGO_DSA;
+ *r_usage=ask_key_flags(algo);
+ break;
+ }
else if( algo == 2 ) {
algo = PUBKEY_ALGO_DSA;
*r_usage = PUBKEY_USAGE_SIG;
More information about the Gnupg-commits
mailing list