gpgme.Context().export() does not allow arbitrary modes

Bug #1588893 reported by NewbiZ
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PyGPGME
New
Undecided
Unassigned

Bug Description

I need to export secret keys from my keyring.

GPGME provides the function `gpgme_op_export()` which allows the user to provide an export mode (see https://www.gnupg.org/documentation/manuals/gpgme/Exporting-Keys.html#Exporting-Keys).
This is particularly useful to export secret keys (e.g. using mode `GPGME_EXPORT_MODE_SECRET`, which is the equivalent of calling `gpg` with `--export-secret-key`).

Currently, `pygpgme` does not expose this flag in the `Context.export()` function.

Snippet from `pygpgme` implementing the export function (from `src/pygpgme-context.c`)

1202 Py_BEGIN_ALLOW_THREADS;
1203 err = gpgme_op_export_ext(self->ctx, (const char **)patterns, 0, keydata);
1204 Py_END_ALLOW_THREADS;

Here we see that the mode flags is hardcoded to 0.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.