aboutsummaryrefslogtreecommitdiffstats
path: root/src/export.c
diff options
context:
space:
mode:
authorIngo Klöcker <[email protected]>2022-01-10 11:32:32 +0000
committerIngo Klöcker <[email protected]>2022-01-10 11:34:49 +0000
commita527bd7cf58563d07c89bec458c8967ab1b3e60f (patch)
treeeff3a819e3ec07966e4256117a0bd2e424c5a446 /src/export.c
parentdoc: Update NEWS (diff)
downloadgpgme-a527bd7cf58563d07c89bec458c8967ab1b3e60f.tar.gz
gpgme-a527bd7cf58563d07c89bec458c8967ab1b3e60f.zip
core: Return an error for secret key export operations
src/export.c (export_status_handler): Handle "export_keys.secret". -- This allows callers of the synchronous export operations to react properly to errors (e.g. wrong passphrase) during the export of secret keys. GnuPG-bug-id: 5766
Diffstat (limited to 'src/export.c')
-rw-r--r--src/export.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/export.c b/src/export.c
index c5bcca6e..155085ff 100644
--- a/src/export.c
+++ b/src/export.c
@@ -105,7 +105,8 @@ export_status_handler (void *priv, gpgme_status_code_t code, char *args)
return err;
else if (opd->err)
; /* We only want to report the first error. */
- else if (!strcmp (loc, "keyserver_send"))
+ else if (!strcmp (loc, "keyserver_send")
+ || !strcmp (loc, "export_keys.secret"))
opd->err = err;
break;