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

Proposed by daniele_athome on 2013-07-06
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 2013-07-06 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.
daniele_athome (daniele-athome) wrote :

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

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

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> on 2013-07-06

Support for key export mode

93. By Daniele <email address hidden> on 2013-06-20

Add PK_ECDSA/PK_ECDH constants

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/pygpgme-constants.c'
2--- src/pygpgme-constants.c 2013-02-13 02:17:54 +0000
3+++ src/pygpgme-constants.c 2013-07-06 21:48:26 +0000
4@@ -40,6 +40,8 @@
5 CONST(PK_ELG_E),
6 CONST(PK_DSA),
7 CONST(PK_ELG),
8+ CONST(PK_ECDSA),
9+ CONST(PK_ECDH),
10
11 /* gpgme_hash_algo_t */
12 CONST(MD_NONE),
13@@ -87,6 +89,10 @@
14 CONST(PINENTRY_MODE_ERROR),
15 CONST(PINENTRY_MODE_LOOPBACK),
16
17+ /* gpgme_export_mode_t */
18+ CONST(EXPORT_MODE_EXTERN),
19+ CONST(EXPORT_MODE_MINIMAL),
20+
21 /* gpgme_status_code_t */
22 CONST(STATUS_EOF),
23 CONST(STATUS_ENTER),
24
25=== modified file 'src/pygpgme-context.c'
26--- src/pygpgme-context.c 2013-02-13 02:18:22 +0000
27+++ src/pygpgme-context.c 2013-07-06 21:48:26 +0000
28@@ -1184,10 +1184,11 @@
29 {
30 PyObject *py_pattern, *py_keydata;
31 char **patterns = NULL;
32+ int export_mode = 0;
33 gpgme_data_t keydata;
34 gpgme_error_t err;
35
36- if (!PyArg_ParseTuple(args, "OO", &py_pattern, &py_keydata))
37+ if (!PyArg_ParseTuple(args, "OO|i", &py_pattern, &py_keydata, &export_mode))
38 return NULL;
39
40 if (parse_key_patterns(py_pattern, &patterns) < 0)
41@@ -1200,7 +1201,7 @@
42 }
43
44 Py_BEGIN_ALLOW_THREADS;
45- err = gpgme_op_export_ext(self->ctx, (const char **)patterns, 0, keydata);
46+ err = gpgme_op_export_ext(self->ctx, (const char **)patterns, export_mode, keydata);
47 Py_END_ALLOW_THREADS;
48
49 if (patterns)

Subscribers

People subscribed via source and target branches