From f2eeccbdfaf855a81abb92abe5ab4c702712bac7 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 18 Jun 2013 10:27:46 +0200 Subject: Add function gpgme_signers_count. * src/signers.c (gpgme_signers_count): New. * src/libgpgme.vers, src/gpgme.def: Add as external symbol. * src/gpgme.h.in: Add prototype. --- src/signers.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/signers.c') diff --git a/src/signers.c b/src/signers.c index 88f923c5..f43fafc7 100644 --- a/src/signers.c +++ b/src/signers.c @@ -93,6 +93,14 @@ gpgme_signers_add (gpgme_ctx_t ctx, const gpgme_key_t key) } +/* Return the number of signers in CTX. */ +unsigned int +gpgme_signers_count (const gpgme_ctx_t ctx) +{ + return ctx? ctx->signers_len : 0; +} + + /* Return the SEQth signer's key in CTX with one reference. */ gpgme_key_t gpgme_signers_enum (const gpgme_ctx_t ctx, int seq) -- cgit v1.2.3