gpgme optimisation for multiple checks

Eric Leblond eric at regit.org
Fri Jul 26 14:38:09 CEST 2013


Hello,

I'm a newbie in GPGME usage and I apologize in advance for that
question.

I would like to know how I can optimize a software that is doing
multiple verifications of signatures.
I'm reusing the context but it seems this is not enough and I observer a
fork of a gpg server for each signature verification. I've tried to use
the disable 'reset feature' available by patching and rebuilding gpgme
code but this does not seem to work.
--- gpgme1.0-1.4.2.orig/src/verify.c
+++ gpgme1.0-1.4.2/src/verify.c
@@ -884,7 +884,7 @@ gpgme_op_verify (gpgme_ctx_t ctx, gpgme_
   if (!ctx)
     return TRACE_ERR (gpg_error (GPG_ERR_INV_VALUE));
 
-  err = verify_start (ctx, 1, sig, signed_text, plaintext);
+  err = verify_start (ctx, 257, sig, signed_text, plaintext);
   if (!err)
     err = _gpgme_wait_one (ctx);
   return TRACE_ERR (err);

It works for a few signatures but then crash.

BR,
-- 
Eric Leblond <eric at regit.org>
Blog: https://home.regit.org/




More information about the Gnupg-devel mailing list