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/keylist.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 'g10/keylist.c')
| -rw-r--r-- | g10/keylist.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/g10/keylist.c b/g10/keylist.c index a1a0e4c13..e33f000dd 100644 --- a/g10/keylist.c +++ b/g10/keylist.c @@ -73,6 +73,48 @@ secret_key_list( STRLIST list ) } void +print_seckey_info (PKT_secret_key *sk) +{ + u32 sk_keyid[2]; + size_t n; + char *p; + + 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)); + + p = get_user_id (sk_keyid, &n); + tty_print_utf8_string (p, n); + m_free (p); + + tty_printf ("\n"); +} + +void +print_pubkey_info (PKT_public_key *pk) +{ + u32 pk_keyid[2]; + size_t n; + char *p; + + keyid_from_pk (pk, pk_keyid); + tty_printf ("\npub %4u%c/%08lX %s ", + nbits_from_pk (pk), + pubkey_letter (pk->pubkey_algo), + (ulong)pk_keyid[1], datestr_from_pk (pk)); + + + p = get_user_id (pk_keyid, &n); + tty_print_utf8_string (p, n); + m_free (p); + + tty_printf ("\n\n"); +} + + +void show_policy_url(PKT_signature *sig,int indent) { const byte *p; |
