[GPGME] Repeated decrypt fails

Randy Trinh trinh.randy at gmail.com
Wed May 16 16:54:52 CEST 2018


Hi everyone,

I'm fairly new to GnuPG and GPGME in general and I'm currently trying to
implement a process in which a file is uploaded from a website in which
case my program uses GPGME to decrypt the file returning true or false.

The first time I upload the file (a .tar.gz) and run
"gpgme_op_decrypt_start" and then "gpgme_wait", the file is decrypted
successfully in which case I can extract the contents, but if I upload the
SAME original file again or any amount of times after the first instance,
GPGME fails** to decrypt it. Is there anything I may be doing wrong?

**Fails:  GPGME returns an error of success and a "decrypted" .tar.gz file
that is empty -- The uploaded file in both instances can still be decrypted
by calling GnuPG from command line but the only way to get GPGME to
successfully decrypt after the first decryption is to restart my program.
(Is it also normal for GPGME to return an error of success for this
instance as it has clearly failed/produced a corrupted file? Similarly it
also returns an error result of success even when I upload a non-encrypted
.tar.gz whereas GnuPG outputs that no OpenPGP data is found and the decrypt
message has failed: eof)

Thanks,
Randy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20180516/2d110eb5/attachment.html>


More information about the Gnupg-users mailing list