Home GnuPG
Diffusion GPGME f66f856c89b7

core: Add error handling to setexpire

Description

core: Add error handling to setexpire

* 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.

Details

Provenance
ikloeckerAuthored on Aug 14 2020, 11:11 AM
Parents
rM4f2cd3a0c6a8: qt: Support changing expiry of subkeys
Branches
Unknown
Tags
Unknown
Tasks
T4395: Kleopatra: Missing error handling when changing expiry