Cancel operation does not return error code
Schultschik, Sven
sven.schultschik at siemens.com
Thu Mar 10 14:30:29 CET 2022
Hi,
if your using gpgme with interactive password entry on the command line and
the user cancels the operation, shouldn't there be an error returned?
Following code
err = gpgme_op_encrypt(ctx, NULL, GPGME_ENCRYPT_SYMMETRIC, in, out);
fprintf(stdout, "DEBUG ERROR Code = \%d \%s \%s\n" , gpgme_err_code(err),
gpgme_strsource(err) , gpgme_strerror(err));
If user cancel on the passwort screen, the following error code is returned
ERROR Code = 0 Unspecified source Success
If I look at the docu and search through the net, there is always said that
GPG_ERR_CANCELED should be returned.
https://www.gnupg.org/documentation/manuals/gpgme/Error-Codes.html
Why this is important?
The output stream already created the output file and if the users cancel
the operation I need an indicator to do a cleanup afterwards.
Thx
Regards
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20220310/42acbe4a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 14944 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20220310/42acbe4a/attachment-0001.bin>
More information about the Gnupg-users
mailing list