summaryrefslogtreecommitdiffstats
path: root/g10/getkey.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-12-10 20:20:47 +0100
committerWerner Koch <wk@gnupg.org>1998-12-10 20:20:47 +0100
commitaf6e96e4f918169508acd8a710309cf617eff3c1 (patch)
treebe313d86fcf1e63ae95686216e149e3aac770749 /g10/getkey.c
parentSee ChangeLog: Wed Dec 9 13:41:06 CET 1998 Werner Koch (diff)
downloadgnupg2-af6e96e4f918169508acd8a710309cf617eff3c1.tar.xz
gnupg2-af6e96e4f918169508acd8a710309cf617eff3c1.zip
See ChangeLog: Thu Dec 10 20:15:36 CET 1998 Werner Koch
Diffstat (limited to 'g10/getkey.c')
-rw-r--r--g10/getkey.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/g10/getkey.c b/g10/getkey.c
index 762c4da20..65c0ae495 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -1414,6 +1414,27 @@ get_user_id_string( u32 *keyid )
}
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 )
{
user_id_db_t r;