From d6cd1f97cab9cbb08560825444c1f848ac45f840 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 8 Jan 2001 20:40:25 +0000 Subject: More changes and and some new functions --- tests/t-keylist.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'tests/t-keylist.c') diff --git a/tests/t-keylist.c b/tests/t-keylist.c index e07da463..d17c8da3 100644 --- a/tests/t-keylist.c +++ b/tests/t-keylist.c @@ -42,12 +42,32 @@ doit ( GpgmeCtx ctx, const char *pattern ) while ( !(err = gpgme_op_keylist_next ( ctx, &key )) ) { char *p; + const char *s; + int i; + printf ("\n", key ); p = gpgme_key_get_as_xml ( key ); - if ( p ) + if ( p ) { fputs ( p, stdout ); + free (p); + } else fputs("\n", stdout ); + + s = gpgme_key_get_string_attr (key, GPGME_ATTR_KEYID, NULL, 0 ); + printf ("\n", s ); + s = gpgme_key_get_string_attr (key, GPGME_ATTR_ALGO, NULL, 0 ); + printf ("\n", s ); + for (i=0; ; i++ ) { + s = gpgme_key_get_string_attr (key, GPGME_ATTR_NAME, NULL, i ); + if (!s) + break; + printf ("\n", i, s ); + s = gpgme_key_get_string_attr (key, GPGME_ATTR_EMAIL, NULL, i ); + printf ("\n", i, s ); + s = gpgme_key_get_string_attr (key, GPGME_ATTR_COMMENT, NULL, i ); + printf ("\n", i, s ); + } printf ("\n", key ); } if ( err != GPGME_EOF ) -- cgit v1.2.3