diff options
author | Timo Schulz <[email protected]> | 2002-10-18 15:41:33 +0000 |
---|---|---|
committer | Timo Schulz <[email protected]> | 2002-10-18 15:41:33 +0000 |
commit | aa853f1eb5c75f5c8f4b99a271a4c225887db7c8 (patch) | |
tree | d7c332e8739b86e42df01672d44a3071734956ac /g10/revoke.c | |
parent | Bumped version number for cvs version (diff) | |
download | gnupg-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 '')
-rw-r--r-- | g10/revoke.c | 52 |
1 files changed, 12 insertions, 40 deletions
diff --git a/g10/revoke.c b/g10/revoke.c index b6e9e6398..662487901 100644 --- a/g10/revoke.c +++ b/g10/revoke.c @@ -260,35 +260,16 @@ gen_desig_revoke( const char *uname ) /* We have the revocation key */ if(!rc) { - size_t n; - char *p; - u32 sk_keyid[2]; - PKT_signature *revkey=NULL; - - any=1; - keyid_from_sk(sk,sk_keyid); - - tty_printf("\npub %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"); - - tty_printf(_("To be revoked by:\n")); - - tty_printf("\nsec %4u%c/%08lX %s ", - nbits_from_sk( sk ), - pubkey_letter( sk->pubkey_algo ), - (ulong)sk_keyid[1], datestr_from_sk(sk) ); - - p = get_user_id( sk_keyid, &n ); - tty_print_utf8_string( p, n ); - m_free(p); - tty_printf("\n"); + PKT_signature *revkey = NULL; + + any = 1; + + print_pubkey_info (pk); + tty_printf ("\n"); + + tty_printf (_("To be revoked by:\n")); + print_seckey_info (sk); + if(pk->revkey[i].class&0x40) tty_printf(_("(This is a sensitive revocation key)\n")); tty_printf("\n"); @@ -464,17 +445,8 @@ gen_revoke( const char *uname ) * it's used all over the source */ sk = node->pkt->pkt.secret_key; keyid_from_sk( sk, sk_keyid ); - tty_printf("\nsec %4u%c/%08lX %s ", - nbits_from_sk( sk ), - pubkey_letter( sk->pubkey_algo ), - (ulong)sk_keyid[1], datestr_from_sk(sk) ); - { - size_t n; - char *p = get_user_id( sk_keyid, &n ); - tty_print_utf8_string( p, n ); - m_free(p); - tty_printf("\n"); - } + print_seckey_info (sk); + pk = m_alloc_clear( sizeof *pk ); /* FIXME: We should get the public key direct from the secret one */ |