<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gpgme/src/export.c, branch gniibe/t8264</title>
<subtitle>GnuPG Made Easy.</subtitle>
<id>http://git.bktus.com/gpgfrontend/gpgme/atom?h=gniibe%2Ft8264</id>
<link rel='self' href='http://git.bktus.com/gpgfrontend/gpgme/atom?h=gniibe%2Ft8264'/>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/'/>
<updated>2026-01-14T15:09:19Z</updated>
<entry>
<title>Allow setting export filters when exporting keys</title>
<updated>2026-01-14T15:09:19Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2026-01-14T12:58:49Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=1823e06216f2e9eee302ae1233d635a4a92c03f6'/>
<id>urn:sha1:1823e06216f2e9eee302ae1233d635a4a92c03f6</id>
<content type='text'>
* src/context.h (struct gpgme_context): New field export_filter.
* src/engine-backend.h (struct engine_ops): Add arg export_filter to
field 'export' and field 'export_ext'.
* src/engine-gpg.c (export_common): Add arg export_filter and pass
option --export-filter with argument value to gpg.
(gpg_export, gpg_export_ext): Add arg export_filter and pass it to
export_common. Adjust all callers of the two functions.
* src/engine-gpgsm.c (gpgsm_export, gpgsm_export_ext): Add dummy arg
export_filter.
* src/gpgme.c (gpgme_release): Free 'export_filter'.
(gpgme_set_ctx_flag, gpgme_get_ctx_flag): New flag "export-filter".

* tests/run-export.c (main): Add option --export-filter.
--

This makes the --export-filter option available in the GPGME API for
key exports.

GnuPG-bug-id: 8033
</content>
</entry>
<entry>
<title>core: Preserve more specific existing failure code</title>
<updated>2023-11-14T12:51:24Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2023-11-14T12:48:48Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=77e982579ccadb20ee865337ada9579ac41164e1'/>
<id>urn:sha1:77e982579ccadb20ee865337ada9579ac41164e1</id>
<content type='text'>
* 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
</content>
</entry>
<entry>
<title>core: Check STATUS_FAILURE in export operations.</title>
<updated>2023-10-05T12:17:21Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2023-09-20T10:05:41Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=349a69b5ea77c334c1c59b56f283bb65dc54a590'/>
<id>urn:sha1:349a69b5ea77c334c1c59b56f283bb65dc54a590</id>
<content type='text'>
* src/export.c (op_data_t): Add failure_code.
(export_status_handler): Set it.
(gpgme_op_export_ext, gpgme_op_export_keys): Also check the failure
code.
--

That is just in case we missed an error code.  For example with older
gpg versions (e.g. 2.3.8) and exporting to a keyserver.
</content>
</entry>
<entry>
<title>core: Return an error for secret key export operations</title>
<updated>2022-01-10T11:34:49Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2022-01-10T11:32:32Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=a527bd7cf58563d07c89bec458c8967ab1b3e60f'/>
<id>urn:sha1:a527bd7cf58563d07c89bec458c8967ab1b3e60f</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>core: New export mode to export secret subkeys.</title>
<updated>2022-01-04T08:23:40Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2022-01-03T15:25:40Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=0e19c4879193ed7fa61ad5d488f237b2b5b5d1d7'/>
<id>urn:sha1:0e19c4879193ed7fa61ad5d488f237b2b5b5d1d7</id>
<content type='text'>
* src/gpgme.h.in (GPGME_EXPORT_MODE_SECRET_SUBKEY): New.
* src/export.c (check_mode): Allow new mode and check for invalid
combinations.
(export_keys_start): Return error if new mode flag is set.
* src/engine-gpg.c (export_common): Implement.
* src/gpgme-tool.c (cmd_export): New option --secret-subkey.
* tests/run-export.c (main): New option --secret-subkey.
--

This adds support for exporting secret subkeys (via gpg's
--export-secret-subkeys) to gpgme_op_export[_ext][_start].
The flag is not supported by gpgme_op_export_keys[_start] because
there is no way to specify which subkey(s) to export with these
functions.

GnuPG-bug-id: 5757
</content>
</entry>
<entry>
<title>core: Check for combination of ssh mode with other mode flags</title>
<updated>2022-01-04T08:22:25Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2022-01-03T13:49:40Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=c0581adabe7f5f63c0b96dac449790aa6ac4c291'/>
<id>urn:sha1:c0581adabe7f5f63c0b96dac449790aa6ac4c291</id>
<content type='text'>
* src/export.c (check_mode): Return error if ssh mode is combined with
another mode flag.
--

The SSH mode flag cannot be used in combination with other flags.

GnuPG-bug-id: 5757
</content>
</entry>
<entry>
<title>core: Factor out the check for valid export mode flags.</title>
<updated>2022-01-04T08:21:37Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2022-01-03T13:41:19Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=326857511587fa7878757d3884f91bf7eb86771c'/>
<id>urn:sha1:326857511587fa7878757d3884f91bf7eb86771c</id>
<content type='text'>
* src/export.c (check_mode): New.
(export_start, export_ext_start): Call check_mode.
--

GnuPG-bug-id: 5757
</content>
</entry>
<entry>
<title>core: Remove experimental feature GPGME_EXPORT_MODE_NOUID.</title>
<updated>2021-02-01T15:48:30Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2021-02-01T15:47:46Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=c8fd8870b3bf089f99156448b7d1e59c1150f994'/>
<id>urn:sha1:c8fd8870b3bf089f99156448b7d1e59c1150f994</id>
<content type='text'>
* src/export.c (export_start): Remove GPGME_EXPORT_MODE_NOUID check.
* src/engine-gpg.c (export_common): Ditto.
--

Note that this constant was never announed and used only for internal
tests.  It made it into some release only by accident.

The constants is kept in gpgme.h to not break any code but it is
non-fucntionals.  We do not consider this an ABI break.

GnuPG-bug-id: 5284
</content>
</entry>
<entry>
<title>core: Call _gpgme_passphrase_status_handler when exporting keys.</title>
<updated>2020-11-24T06:00:27Z</updated>
<author>
<name>NIIBE Yutaka</name>
<email>gniibe@fsij.org</email>
</author>
<published>2020-11-24T05:56:28Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=53ac732bae46e1f883998e987fc84d4cababde12'/>
<id>urn:sha1:53ac732bae46e1f883998e987fc84d4cababde12</id>
<content type='text'>
* src/export.c (export_status_handler): Call the handler.

--

Fixes-commit: 3382ecb17eb5d2a373cf2eccb301854fff42f6aa
Signed-off-by: NIIBE Yutaka &lt;gniibe@fsij.org&gt;
</content>
</entry>
<entry>
<title>core: Support exporting secret keys.</title>
<updated>2020-11-12T04:11:08Z</updated>
<author>
<name>NIIBE Yutaka</name>
<email>gniibe@fsij.org</email>
</author>
<published>2020-11-12T04:11:08Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=3382ecb17eb5d2a373cf2eccb301854fff42f6aa'/>
<id>urn:sha1:3382ecb17eb5d2a373cf2eccb301854fff42f6aa</id>
<content type='text'>
* src/export.c (export_start): Set command handler for passphrase
interaction for the case when it's secret keys.
(export_ext_start): Likewise.

--

GnuPG-bug-id: 5046
Co-authored-by: Louis Dupré Bertoni
Signed-off-by: NIIBE Yutaka &lt;gniibe@fsij.org&gt;
</content>
</entry>
</feed>
