diff options
Diffstat (limited to 'tests/run-keylist.c')
-rw-r--r-- | tests/run-keylist.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/run-keylist.c b/tests/run-keylist.c index 0f2154a8..c0c72022 100644 --- a/tests/run-keylist.c +++ b/tests/run-keylist.c @@ -2,17 +2,17 @@ Copyright (C) 2008, 2009 g10 Code GmbH This file is part of GPGME. - + GPGME is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. - + GPGME is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this program; if not, see <http://www.gnu.org/licenses/>. */ @@ -57,7 +57,7 @@ show_usage (int ex) } -int +int main (int argc, char **argv) { int last_argc = -1; @@ -136,9 +136,9 @@ main (int argc, char **argv) } else if (!strncmp (*argv, "--", 2)) show_usage (1); - - } - + + } + if (argc > 1) show_usage (1); @@ -152,12 +152,12 @@ main (int argc, char **argv) err = gpgme_op_keylist_start (ctx, argc? argv[0]:NULL, 0); fail_if_err (err); - + while (!(err = gpgme_op_keylist_next (ctx, &key))) { gpgme_user_id_t uid; int nuids; - + printf ("keyid : %s\n", key->subkeys?nonnull (key->subkeys->keyid):"?"); printf ("fpr : %s\n", key->subkeys?nonnull (key->subkeys->fpr):"?"); @@ -176,7 +176,7 @@ main (int argc, char **argv) for (nuids=0, uid=key->uids; uid; uid = uid->next, nuids++) { printf ("userid %d: %s\n", nuids, nonnull(uid->uid)); - printf ("valid %d: %s\n", nuids, + printf ("valid %d: %s\n", nuids, uid->validity == GPGME_VALIDITY_UNKNOWN? "unknown": uid->validity == GPGME_VALIDITY_UNDEFINED? "undefined": uid->validity == GPGME_VALIDITY_NEVER? "never": |