Merge lp:~daniele-athome/pygpgme/pygpgme into lp:pygpgme

Proposed by daniele_athome
Status: Needs review
Proposed branch: lp:~daniele-athome/pygpgme/pygpgme
Merge into: lp:pygpgme
Diff against target: 49 lines (+9/-2)
2 files modified
src/pygpgme-constants.c (+6/-0)
src/pygpgme-context.c (+3/-2)
To merge this branch: bzr merge lp:~daniele-athome/pygpgme/pygpgme
Reviewer Review Type Date Requested Status
James Henstridge Pending
Review via email: mp+173333@code.launchpad.net

Description of the change

Support for key export mode

To post a comment you must log in.
Revision history for this message
daniele_athome (daniele-athome) wrote :

I deleted the previous merge request and created this one which includes the previously added ECDSA constants.

Revision history for this message
Muelli (ubuntu-bugs-auftrags-killer) wrote :

I'd like to see this patch being merged to be able to do a minimal export of keys.

Revision history for this message
AndreiM (andrei-macavei89) wrote :

I would also like this patch to be merged. It can also be updated with the newest release of GPGME where there is an option to export secret key now:
http://lists.gnupg.org/pipermail/gnupg-devel/2015-August/030236.html

Unmerged revisions

94. By Daniele <email address hidden>

Support for key export mode

93. By Daniele <email address hidden>

Add PK_ECDSA/PK_ECDH constants

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/pygpgme-constants.c'
--- src/pygpgme-constants.c 2013-02-13 02:17:54 +0000
+++ src/pygpgme-constants.c 2013-07-06 21:48:26 +0000
@@ -40,6 +40,8 @@
40 CONST(PK_ELG_E),40 CONST(PK_ELG_E),
41 CONST(PK_DSA),41 CONST(PK_DSA),
42 CONST(PK_ELG),42 CONST(PK_ELG),
43 CONST(PK_ECDSA),
44 CONST(PK_ECDH),
4345
44 /* gpgme_hash_algo_t */46 /* gpgme_hash_algo_t */
45 CONST(MD_NONE),47 CONST(MD_NONE),
@@ -87,6 +89,10 @@
87 CONST(PINENTRY_MODE_ERROR),89 CONST(PINENTRY_MODE_ERROR),
88 CONST(PINENTRY_MODE_LOOPBACK),90 CONST(PINENTRY_MODE_LOOPBACK),
8991
92 /* gpgme_export_mode_t */
93 CONST(EXPORT_MODE_EXTERN),
94 CONST(EXPORT_MODE_MINIMAL),
95
90 /* gpgme_status_code_t */96 /* gpgme_status_code_t */
91 CONST(STATUS_EOF),97 CONST(STATUS_EOF),
92 CONST(STATUS_ENTER),98 CONST(STATUS_ENTER),
9399
=== modified file 'src/pygpgme-context.c'
--- src/pygpgme-context.c 2013-02-13 02:18:22 +0000
+++ src/pygpgme-context.c 2013-07-06 21:48:26 +0000
@@ -1184,10 +1184,11 @@
1184{1184{
1185 PyObject *py_pattern, *py_keydata;1185 PyObject *py_pattern, *py_keydata;
1186 char **patterns = NULL;1186 char **patterns = NULL;
1187 int export_mode = 0;
1187 gpgme_data_t keydata;1188 gpgme_data_t keydata;
1188 gpgme_error_t err;1189 gpgme_error_t err;
11891190
1190 if (!PyArg_ParseTuple(args, "OO", &py_pattern, &py_keydata))1191 if (!PyArg_ParseTuple(args, "OO|i", &py_pattern, &py_keydata, &export_mode))
1191 return NULL;1192 return NULL;
11921193
1193 if (parse_key_patterns(py_pattern, &patterns) < 0)1194 if (parse_key_patterns(py_pattern, &patterns) < 0)
@@ -1200,7 +1201,7 @@
1200 }1201 }
12011202
1202 Py_BEGIN_ALLOW_THREADS;1203 Py_BEGIN_ALLOW_THREADS;
1203 err = gpgme_op_export_ext(self->ctx, (const char **)patterns, 0, keydata);1204 err = gpgme_op_export_ext(self->ctx, (const char **)patterns, export_mode, keydata);
1204 Py_END_ALLOW_THREADS;1205 Py_END_ALLOW_THREADS;
12051206
1206 if (patterns)1207 if (patterns)

Subscribers

People subscribed via source and target branches