From af6e96e4f918169508acd8a710309cf617eff3c1 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 10 Dec 1998 19:20:47 +0000 Subject: See ChangeLog: Thu Dec 10 20:15:36 CET 1998 Werner Koch --- g10/getkey.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'g10/getkey.c') diff --git a/g10/getkey.c b/g10/getkey.c index 762c4da20..65c0ae495 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -1413,6 +1413,27 @@ get_user_id_string( u32 *keyid ) return p; } +char* +get_long_user_id_string( u32 *keyid ) +{ + user_id_db_t r; + char *p; + int pass=0; + /* try it two times; second pass reads from key resources */ + do { + for(r=user_id_db; r; r = r->next ) + if( r->keyid[0] == keyid[0] && r->keyid[1] == keyid[1] ) { + p = m_alloc( r->len + 20 ); + sprintf(p, "%08lX%08lX %.*s", + (ulong)keyid[0], (ulong)keyid[1], r->len, r->name ); + return p; + } + } while( ++pass < 2 && !get_pubkey( NULL, keyid ) ); + p = m_alloc( 25 ); + sprintf(p, "%08lX%08lX [?]", (ulong)keyid[0], (ulong)keyid[1] ); + return p; +} + char* get_user_id( u32 *keyid, size_t *rn ) { -- cgit v1.2.3