1 /* t-trustlist.c - Regression test.
2 * Copyright (C) 2000 Werner Koch (dd9jn)
3 * Copyright (C) 2001, 2003, 2004 g10 Code GmbH
5 * This file is part of GPGME.
7 * GPGME is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
12 * GPGME is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this program; if not, see <https://gnu.org/licenses/>.
19 * SPDX-License-Identifier: LGPL-2.1-or-later
22 /* We need to include config.h so that we know whether we are building
23 with large file system (LFS) support. */
34 #include "t-support.h"
38 main (int argc, char *argv[])
42 gpgme_trust_item_t item;
47 init_gpgme (GPGME_PROTOCOL_OpenPGP);
49 err = gpgme_new (&ctx);
52 err = gpgme_op_trustlist_start (ctx, "alice", 0);
55 while (!(err = gpgme_op_trustlist_next (ctx, &item)))
57 printf ("l=%d k=%s t=%d o=%s v=%s u=%s\n",
58 item->level, item->keyid, item->type, item->owner_trust,
59 item->validity, item->name);
60 gpgme_trust_item_unref (item);
62 if (gpgme_err_code (err) != GPG_ERR_EOF)