diff options
author | Werner Koch <[email protected]> | 2025-02-21 09:56:00 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2025-02-21 10:01:28 +0000 |
commit | 7e6a65e66a96278bed5fed6d0b75887c0f032c4e (patch) | |
tree | 25605585dad3d04e4a24d4cef3c4c43bbfb41416 /src/trust-item.c | |
parent | Remove long deprecated functions. (diff) | |
download | gpgme-7e6a65e66a96278bed5fed6d0b75887c0f032c4e.tar.gz gpgme-7e6a65e66a96278bed5fed6d0b75887c0f032c4e.zip |
Remove the long deprecated and never working trust list functions.
* src/trust-item.c: Remove file.
* src/trustlist.c: Remove file.
* src/Makefile.am (main_sources): Remove those files.
* src/gpgme.h.in (GPGME_EVENT_NEXT_TRUSTITEM): Remove.
(gpgme_trust_item_t, GpgmeTrustItem): Remove.
(gpgme_op_trustlist_start): Remove.
(gpgme_op_trustlist_next): Remove.
(gpgme_op_trustlist_end): Remove.
(gpgme_trust_item_ref): Remove.
(gpgme_trust_item_unref, gpgme_trust_item_release): Remove.
* src/gpgme.def: Remove removed functions.
* src/libgpgme.vers: Ditto.
--
The GPGME_ATTR_foo based functions are deprecated since 2003 and it is
time to remove them now.
The trustlist functions never worked:
This never worked in reality because the required feature has been
removed from GnuPG version 1.3.2 soon after introduction of this
feature in gpgme in 2003. It was anyway marked as experimental.
They even returned GPG_ERR_NOT_IMPLEMENTED since gpgme 1.14.0 (summer
2000) instead of failing with a incomprehensible error code.
GnuPG-bug-id: 4834
Diffstat (limited to 'src/trust-item.c')
-rw-r--r-- | src/trust-item.c | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/src/trust-item.c b/src/trust-item.c deleted file mode 100644 index c9eea03c..00000000 --- a/src/trust-item.c +++ /dev/null @@ -1,101 +0,0 @@ -/* trust-item.c - Trust item objects. - * Copyright (C) 2000 Werner Koch (dd9jn) - * Copyright (C) 2001, 2002, 2003, 2004 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 <https://gnu.org/licenses/>. - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#if HAVE_CONFIG_H -#include <config.h> -#endif -#include <stdlib.h> -#include <string.h> -#include <assert.h> -#include <errno.h> - -#include "util.h" -#include "ops.h" -#include "sema.h" -#include "debug.h" - - -/* Protects all reference counters in trust items. All other accesses - to a trust item are either read only or happen before the trust - item is available to the user. */ -DEFINE_STATIC_LOCK (trust_item_ref_lock); - - -/* Create a new trust item. */ -gpgme_error_t -_gpgme_trust_item_new (gpgme_trust_item_t *r_item) -{ - gpgme_trust_item_t item; - - item = calloc (1, sizeof *item); - if (!item) - return gpg_error_from_syserror (); - item->_refs = 1; - item->keyid = item->_keyid; - item->_keyid[16] = '\0'; - item->owner_trust = item->_owner_trust; - item->_owner_trust[1] = '\0'; - item->validity = item->_validity; - item->_validity[1] = '\0'; - *r_item = item; - return 0; -} - - -/* Acquire a reference to ITEM. */ -void -gpgme_trust_item_ref (gpgme_trust_item_t item) -{ - LOCK (trust_item_ref_lock); - item->_refs++; - UNLOCK (trust_item_ref_lock); -} - - -/* gpgme_trust_item_unref releases the trust item object. Note that - this function may not do an actual release if there are other - shallow copies of the object. You have to call this function for - every newly created trust item object as well as for every - gpgme_trust_item_ref() done on the trust item object. */ -void -gpgme_trust_item_unref (gpgme_trust_item_t item) -{ - LOCK (trust_item_ref_lock); - assert (item->_refs > 0); - if (--item->_refs) - { - UNLOCK (trust_item_ref_lock); - return; - } - UNLOCK (trust_item_ref_lock); - - if (item->name) - free (item->name); - free (item); -} - - -/* Compatibility interfaces. */ -void -gpgme_trust_item_release (gpgme_trust_item_t item) -{ - gpgme_trust_item_unref (item); -} |