Re: [GPGME] Repeated decrypt fails

2018-05-18 Thread Randy Trinh
On Fri, May 18, 2018 at 12:31 PM, Randy Trinh wrote: > > 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

Re: [GPGME] Repeated decrypt fails

2018-05-18 Thread Randy Trinh
On Fri, May 18, 2018 at 5:58 AM, Werner Koch 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

Re: [GPGME] Repeated decrypt fails

2018-05-18 Thread Werner Koch
On Thu, 17 May 2018 20:48, trinh.ra...@gmail.com said: > err = gpgme_op_decrypt_start(ctx, fileEncrypted, fileDecrypted); > ctx = gpgme_wait(ctx, , 1); > > std::cout << "Decrypt Status: " << gpgme_strerror(err) << std::endl; Here you show the result of the start operation which is usuallay

Re: [GPGME] Repeated decrypt fails

2018-05-17 Thread Randy Trinh
On Thu, May 17, 2018 at 11:35 AM, Ben McGinnes wrote: > > > Does the website encrypt the file uploaded by (eventually) some end > > user or do they encrypt the file first and then upload that which your > > code subsequently decrypts? The file is encrypted first by the user

Re: [GPGME] Repeated decrypt fails

2018-05-17 Thread Ben McGinnes
On Wed, May 16, 2018 at 10:54:52AM -0400, Randy Trinh wrote: > Hi everyone, > > I'm fairly new to GnuPG and GPGME in general and I'm currently Firstly, kudos for going straight to GPGME instead of wrapping the GPG binary.  > trying to implement a process in which a file is uploaded from a >

[GPGME] Repeated decrypt fails

2018-05-16 Thread Randy Trinh
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