gpgme function idea: gpgme_signers_len()

Hans-Christoph Steiner hans at guardianproject.info
Thu Jun 6 00:01:58 CEST 2013


I have found that it was necessary to check whether there are any Signers in
the GnuPGContext in order to select whether to run gpgme_op_encrypt() vs
gpgme_op_encrypt_sign().  This makes it possible to have gnupg-for-java's
encrypt() method automatically sign if there are signers present in the
GnuPGContext.

The implementation would be trivial:

int gpgme_signers_len(gpgme_ctx_t ctx)
{
  TRACE2 (DEBUG_CTX, "gpgme_signers_len", ctx, "ctx->signers_len=%i",
	  ctx->signers_len);
    return ctx->signers_len;
}

.hc



More information about the Gnupg-devel mailing list