aboutsummaryrefslogtreecommitdiffstats
path: root/src/setexpire.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* core: Preserve more specific existing failure codeIngo Klöcker2023-11-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | * src/decrypt.c (_gpgme_decrypt_status_handler): Ignore received failure code if we already have a specific failure code. * src/encrypt.c (_gpgme_encrypt_status_handler): Ditto. * src/export.c (export_status_handler): Ditto. * src/genkey.c (genkey_status_handler): Ditto. * src/keylist.c (keylist_status_handler): Ditto. * src/keysign.c (keysign_status_handler): Ditto. * src/passwd.c (passwd_status_handler): Ditto. * src/revsig.c (revsig_status_handler): Ditto. * src/setexpire.c (setexpire_status_handler): Ditto. * src/sign.c (_gpgme_sign_status_handler): Ditto. * src/tofupolicy.c (tofu_policy_status_handler): Ditto. * src/verify.c (_gpgme_verify_status_handler): Ditto. -- Usually, a process emits at most one failure code. But some operations like the creation of an encrypted archive involve multiple chained processes, so that multiple failure codes can be received. We want to keep the first specific failure code we received. Further failure codes are only parsed if we received just an unspecific "general error" so far. GnuPG-bug-id: 6575
* core: Add error handling to setexpireIngo Klöcker2020-08-141-0/+193
* src/genkey.c (setexpire, gpgme_op_setexpire_start, gpgme_op_setexpire): Move to ... * src/setexpire.c: New. * src/Makefile.am (main_sources): Add that file. * src/context.h (ctx_op_data_id_t): Add OPDATA_SETEXPIRE. * lang/qt/tests/t-various.cpp (testSetExpire): Test error handling. -- Errors (and failures) emitted via status-fd need to be handled explicitly, i.e. we need to provide an appropriate status handler with corresponding op_data_t. Additionally, we need to set a passphrase command handler if a passphrase callback is set in the context, e.g. during tests. GnuPG-bug-id: 4395