aboutsummaryrefslogtreecommitdiffstats
path: root/src/verify.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2025-02-21 09:28:46 +0000
committerWerner Koch <[email protected]>2025-02-21 09:42:30 +0000
commitd54d6eaa642ba6de179ef280930525c7367c9b88 (patch)
treeb2c346be23a7981bd71322c1c0240ed42809b364 /src/verify.c
parentNEWS: Fix typos (diff)
downloadgpgme-d54d6eaa642ba6de179ef280930525c7367c9b88.tar.gz
gpgme-d54d6eaa642ba6de179ef280930525c7367c9b88.zip
Remove long deprecated functions.
* src/gpgme.h.in (GPGME_EXPORT_MODE_NOUID): Remove. This was a left-over from an experiment. (gpgme_attr_t,_gpgme_attr_t) Remove. Deprecated sinze 2003. (gpgme_get_sig_ulong_attr): Ditto. (gpgme_get_sig_string_attr): Ditto. (gpgme_key_get_string_attr): Ditto. (gpgme_key_get_ulong_attr): Ditto. (gpgme_key_sig_get_string_attr): Ditto. (gpgme_key_sig_get_ulong_attr): Ditto. (gpgme_trust_item_get_string_attr): Ditto. (gpgme_trust_item_get_int_attr): Ditto. * src/gpgme.def: Remove them here too. * src/libgpgme.vers: Ditto. * src/trust-item.c: Remove corresponding implementations. * src/verify.c: Ditto. * src/key.c: Ditto.
Diffstat (limited to '')
-rw-r--r--src/verify.c106
1 files changed, 0 insertions, 106 deletions
diff --git a/src/verify.c b/src/verify.c
index 8d87cad3..19ac5d71 100644
--- a/src/verify.c
+++ b/src/verify.c
@@ -1309,109 +1309,3 @@ gpgme_get_sig_status (gpgme_ctx_t ctx, int idx,
*r_created = sig->timestamp;
return sig->fpr;
}
-
-
-/* Retrieve certain attributes of a signature. IDX is the index
- number of the signature after a successful verify operation. WHAT
- is an attribute where GPGME_ATTR_EXPIRE is probably the most useful
- one. WHATIDX is to be passed as 0 for most attributes . */
-unsigned long
-gpgme_get_sig_ulong_attr (gpgme_ctx_t ctx, int idx,
- _gpgme_attr_t what, int whatidx)
-{
- gpgme_verify_result_t result;
- gpgme_signature_t sig;
-
- (void)whatidx;
-
- result = gpgme_op_verify_result (ctx);
- sig = result->signatures;
-
- while (sig && idx)
- {
- sig = sig->next;
- idx--;
- }
- if (!sig || idx)
- return 0;
-
- switch (what)
- {
- case GPGME_ATTR_CREATED:
- return sig->timestamp;
-
- case GPGME_ATTR_EXPIRE:
- return sig->exp_timestamp;
-
- case GPGME_ATTR_VALIDITY:
- return (unsigned long) sig->validity;
-
- case GPGME_ATTR_SIG_STATUS:
- switch (gpg_err_code (sig->status))
- {
- case GPG_ERR_NO_ERROR:
- return GPGME_SIG_STAT_GOOD;
-
- case GPG_ERR_BAD_SIGNATURE:
- return GPGME_SIG_STAT_BAD;
-
- case GPG_ERR_NO_PUBKEY:
- return GPGME_SIG_STAT_NOKEY;
-
- case GPG_ERR_NO_DATA:
- return GPGME_SIG_STAT_NOSIG;
-
- case GPG_ERR_SIG_EXPIRED:
- return GPGME_SIG_STAT_GOOD_EXP;
-
- case GPG_ERR_KEY_EXPIRED:
- return GPGME_SIG_STAT_GOOD_EXPKEY;
-
- default:
- return GPGME_SIG_STAT_ERROR;
- }
-
- case GPGME_ATTR_SIG_SUMMARY:
- return sig->summary;
-
- default:
- break;
- }
- return 0;
-}
-
-
-const char *
-gpgme_get_sig_string_attr (gpgme_ctx_t ctx, int idx,
- _gpgme_attr_t what, int whatidx)
-{
- gpgme_verify_result_t result;
- gpgme_signature_t sig;
-
- result = gpgme_op_verify_result (ctx);
- sig = result->signatures;
-
- while (sig && idx)
- {
- sig = sig->next;
- idx--;
- }
- if (!sig || idx)
- return NULL;
-
- switch (what)
- {
- case GPGME_ATTR_FPR:
- return sig->fpr;
-
- case GPGME_ATTR_ERRTOK:
- if (whatidx == 1)
- return sig->wrong_key_usage ? "Wrong_Key_Usage" : "";
- else
- return "";
- default:
- break;
- }
-
- return NULL;
-}