aboutsummaryrefslogtreecommitdiffstats
path: root/g10/delkey.c
diff options
context:
space:
mode:
authorTimo Schulz <[email protected]>2002-10-18 15:41:33 +0000
committerTimo Schulz <[email protected]>2002-10-18 15:41:33 +0000
commitaa853f1eb5c75f5c8f4b99a271a4c225887db7c8 (patch)
treed7c332e8739b86e42df01672d44a3071734956ac /g10/delkey.c
parentBumped version number for cvs version (diff)
downloadgnupg-aa853f1eb5c75f5c8f4b99a271a4c225887db7c8.tar.gz
gnupg-aa853f1eb5c75f5c8f4b99a271a4c225887db7c8.zip
2002-10-18 Timo Schulz <[email protected]>
* keylist.c: (print_pubkey_info): New. (print_seckey_info): New. * main.h: Prototypes for the new functions. * delkey.c (do_delete_key): Use it here. * revoke.c (gen_desig_revoke): Ditto.
Diffstat (limited to 'g10/delkey.c')
-rw-r--r--g10/delkey.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/g10/delkey.c b/g10/delkey.c
index ca578a590..e4cada3f5 100644
--- a/g10/delkey.c
+++ b/g10/delkey.c
@@ -127,23 +127,11 @@ do_delete_key( const char *username, int secret, int *r_sec_avail )
log_info (_("(unless you specify the key by fingerprint)\n"));
}
else {
- char *p;
- size_t n;
-
- if( secret )
- tty_printf("sec %4u%c/%08lX %s ",
- nbits_from_sk( sk ),
- pubkey_letter( sk->pubkey_algo ),
- (ulong)keyid[1], datestr_from_sk(sk) );
- else
- tty_printf("pub %4u%c/%08lX %s ",
- nbits_from_pk( pk ),
- pubkey_letter( pk->pubkey_algo ),
- (ulong)keyid[1], datestr_from_pk(pk) );
- p = get_user_id( keyid, &n );
- tty_print_utf8_string( p, n );
- m_free(p);
- tty_printf("\n\n");
+ if( secret )
+ print_seckey_info( sk );
+ else
+ print_pubkey_info( pk );
+ tty_printf( "\n" );
yes = cpr_get_answer_is_yes( secret? "delete_key.secret.okay"
: "delete_key.okay",