[GPGME] Repeated decrypt fails

Randy Trinh trinh.randy at gmail.com
Fri May 18 18:31:54 CEST 2018


On Fri, May 18, 2018 at 5:58 AM, Werner Koch <wk at gnupg.org> wrote:

>
Here you show the result of the start operation which is usuallay
success.  What you need to check here instead is STAT as returned by
gpgme_wait.


Thanks for that! I just fixed that and now the error I get the second time
I upload is the "NO_DATA" error (which is reasonable as it decrypts anyways
with no data), Again the file that is obtained through the upload can still
be decrypted via the command line just fine.

>
Is there a reason why you use the asynchronous operaions and not the
synchronous?  Your code would not work with multiple threads because
gpgme_wait may only be called by one thread.


The only reason I have it as asynchronous would be because the file that is
being decrypted is then unzipped and its contents loaded elsewhere - but
rather than using a library (as of current), I just called a system() to
execute the zip and without this.

>
gpgme has a function to figure this out:

  /* Get the information about the configured engines.  A pointer to the
   * first engine in the statically allocated linked list is returned.
   * The returned data is valid until the next gpgme_ctx_set_engine_info.
*/
  gpgme_engine_info_t gpgme_ctx_get_engine_info (gpgme_ctx_t ctx);

With this I can confirm its using 2.0.22.

>
Cheers,
Randy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20180518/7fb387f7/attachment.html>


More information about the Gnupg-users mailing list