From f66f856c89b7c02e368afe2343de7cce50e6109e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Fri, 14 Aug 2020 11:11:23 +0200 Subject: 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. GnuPG-bug-id: 4395 --- src/context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/context.h') diff --git a/src/context.h b/src/context.h index 25dfc792..7f745a52 100644 --- a/src/context.h +++ b/src/context.h @@ -39,7 +39,7 @@ typedef enum OPDATA_IMPORT, OPDATA_GENKEY, OPDATA_KEYLIST, OPDATA_EDIT, OPDATA_VERIFY, OPDATA_TRUSTLIST, OPDATA_ASSUAN, OPDATA_VFS_MOUNT, OPDATA_PASSWD, OPDATA_EXPORT, OPDATA_KEYSIGN, OPDATA_TOFU_POLICY, - OPDATA_QUERY_SWDB + OPDATA_QUERY_SWDB, OPDATA_SETEXPIRE } ctx_op_data_id_t; -- cgit v1.2.3