Merge lp:~noskcaj/ubuntu/trusty/gpgme1.0/1.4.3 into lp:ubuntu/trusty/gpgme1.0
- Trusty (14.04)
- 1.4.3
- Merge into trusty
Proposed by
Jackson Doak
Status: | Merged |
---|---|
Merge reported by: | Martin Pitt |
Merged at revision: | not available |
Proposed branch: | lp:~noskcaj/ubuntu/trusty/gpgme1.0/1.4.3 |
Merge into: | lp:ubuntu/trusty/gpgme1.0 |
Diff against target: |
4204 lines (+1933/-793) 43 files modified
ChangeLog (+92/-0) NEWS (+18/-0) VERSION (+1/-1) config.h.in (+5/-1) configure (+257/-219) configure.ac (+155/-113) debian/changelog (+25/-3) debian/control (+2/-2) debian/libgpgme11.symbols (+4/-0) doc/gpgme.info (+112/-111) doc/gpgme.info-1 (+76/-14) doc/gpgme.info-2 (+21/-8) doc/gpgme.texi (+57/-1) doc/stamp-vti (+4/-4) doc/uiserver.texi (+20/-18) doc/version.texi (+4/-4) gpgme.spec (+1/-1) lang/cl/gpgme.asd (+1/-1) src/Makefile.am (+3/-2) src/Makefile.in (+71/-62) src/data-identify.c (+247/-0) src/dirinfo.c (+147/-23) src/engine-g13.c (+4/-4) src/engine-gpg.c (+4/-4) src/engine-gpgconf.c (+3/-3) src/engine-gpgsm.c (+6/-4) src/engine-uiserver.c (+2/-2) src/gpgme-tool.c (+66/-7) src/gpgme.def (+4/-0) src/gpgme.h.in (+22/-0) src/libgpgme.vers (+2/-0) src/parsetlv.c (+103/-0) src/parsetlv.h (+48/-0) src/posix-util.c (+1/-23) src/signers.c (+8/-0) src/sys-util.h (+29/-0) src/util.h (+5/-6) src/w32-util.c (+179/-118) tests/gpg/Makefile.am (+35/-14) tests/gpg/Makefile.in (+36/-20) tests/gpg/final.test (+4/-0) tests/gpg/initial.test (+4/-0) tests/gpg/start-stop-agent (+45/-0) |
To merge this branch: | bzr merge lp:~noskcaj/ubuntu/trusty/gpgme1.0/1.4.3 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Pitt | Approve | ||
Review via email: mp+192293@code.launchpad.net |
Commit message
Description of the change
Merge from debian
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'ChangeLog' | |||
2 | --- ChangeLog 2013-05-29 18:33:42 +0000 | |||
3 | +++ ChangeLog 2013-10-23 07:14:02 +0000 | |||
4 | @@ -1,3 +1,95 @@ | |||
5 | 1 | 2013-08-12 Werner Koch <wk@gnupg.org> | ||
6 | 2 | |||
7 | 3 | Release 1.4.3. | ||
8 | 4 | * configure.ac: Change LT version to C22/A11/R0. | ||
9 | 5 | |||
10 | 6 | Make test suite workable with GnuPG 2.1. | ||
11 | 7 | * tests/gpg/start-stop-agent: New. | ||
12 | 8 | * tests/gpg/initial.test: New. | ||
13 | 9 | * tests/gpg/final.test: New. | ||
14 | 10 | * tests/gpg/Makefile.am (c_tests): New. | ||
15 | 11 | (TESTS): Move all to c_tests. Add initial.test, final.test, and | ||
16 | 12 | c_tests. | ||
17 | 13 | (TESTS_ENVIRONMENT): Add C_ALL=C | ||
18 | 14 | (private_keys): New. | ||
19 | 15 | (EXTRA_DIST): Add new files. | ||
20 | 16 | (./private-keys-v1.d/gpg-sample.stamp): Copy private keys. | ||
21 | 17 | (all-local): Depend on gpg-sample.stamp. | ||
22 | 18 | * tests/gpg/13CBE3758AFE42B5E5E2AE4CED27AFA455E3F87F: New. | ||
23 | 19 | * tests/gpg/13CD0F3BDF24BE53FE192D62F18737256FF6E4FD: New. | ||
24 | 20 | * tests/gpg/76F7E2B35832976B50A27A282D9B87E44577EB66: New. | ||
25 | 21 | * tests/gpg/7A030357C0F253A5BBCD282FFC4E521B37558F5C: New. | ||
26 | 22 | * tests/gpg/A0747D5F9425E6664F4FFBEED20FBCA79FDED2BD: New. | ||
27 | 23 | |||
28 | 24 | Improve detection of default gpg by configure. | ||
29 | 25 | * configure.ac: Move test for gpgconf before test for gpg. | ||
30 | 26 | (GPG, GPGSM, G13): Use gpgconf instead of AC_PATH_PROG if possible. | ||
31 | 27 | |||
32 | 28 | 2013-08-09 Werner Koch <wk@gnupg.org> | ||
33 | 29 | |||
34 | 30 | Add function gpgme_data_identify. | ||
35 | 31 | * src/gpgme.h.in (gpgme_data_type_t): New. | ||
36 | 32 | (gpgme_data_identify): New prototype. | ||
37 | 33 | * src/data-identify.c: New. | ||
38 | 34 | * src/parsetlv.c, src/parsetlv.h: New. Take from gpa. | ||
39 | 35 | * src/libgpgme.vers, src/gpgme.def: Add gpgme_data_identify. | ||
40 | 36 | * src/gpgme-tool.c (status): Add STATUS_IDENTIFY_RESULT. | ||
41 | 37 | (gt_identify): New. | ||
42 | 38 | (cmd_identify): New. | ||
43 | 39 | |||
44 | 40 | (hlp_passwd): Move close to cmd_passwd. | ||
45 | 41 | |||
46 | 42 | 2013-08-02 Werner Koch <wk@gnupg.org> | ||
47 | 43 | |||
48 | 44 | Prefer GnuPG-2 engines over GnuPG-1. | ||
49 | 45 | * src/util.h: Move some prototypes to ... | ||
50 | 46 | * src/sys-util.h: New. | ||
51 | 47 | * src/Makefile.am (main_sources): Add sys-util.h. | ||
52 | 48 | * configure.ac (AH_VERBATIM): Add DIRSEP_C and DIRSEP_S. | ||
53 | 49 | * src/dirinfo.c: Include sys-util.h. | ||
54 | 50 | (WANT_GPG_NAME, WANT_GPGSM_NAME, WANT_G13_NAME) | ||
55 | 51 | (WANT_UISRV_SOCKET): New. | ||
56 | 52 | (dirinfo): Add corresponding fields. | ||
57 | 53 | (parse_output): Add arg COMPONENTS and set new fields. | ||
58 | 54 | (read_gpgconf_dirs): Add arg components and act upon it. | ||
59 | 55 | (get_gpgconf_item): Call read_gpgconf_dirs two times. Add debug | ||
60 | 56 | output. | ||
61 | 57 | (_gpgme_get_default_gpg_name): New. | ||
62 | 58 | (_gpgme_get_default_gpgsm_name): New. | ||
63 | 59 | (_gpgme_get_default_g13_name): New. | ||
64 | 60 | (_gpgme_get_default_gpgconf_name): New. | ||
65 | 61 | (_gpgme_get_default_uisrv_socket): New. | ||
66 | 62 | * src/engine-gpg.c, src/engine-g13.c, src/engine-gpgconf.c | ||
67 | 63 | * src/engine-gpgsm.c, src/engine-uiserver.c: Change to use | ||
68 | 64 | _gpgme_get_default_ instead of those from sys-util.h. | ||
69 | 65 | * src/posix-util.c (_gpgme_get_gpg_path): Include sys-util.h. | ||
70 | 66 | (_gpgme_get_uiserver_socket_path): Remove. | ||
71 | 67 | * src/w32-util.c (_gpgme_get_gpg_path): Include sys-util.h. | ||
72 | 68 | (_gpgme_get_uiserver_socket_path): Remove. | ||
73 | 69 | |||
74 | 70 | w32: Try to locate gpg in the gpgme installation dir. | ||
75 | 71 | * src/w32-util.c (my_hmodule): New. | ||
76 | 72 | (wchar_to_utf8): New. | ||
77 | 73 | (DllMain): New. | ||
78 | 74 | (_gpgme_get_inst_dir): New. | ||
79 | 75 | (find_program_in_dir): New. | ||
80 | 76 | (find_program_in_inst_dir): Add arg INST_DIR. | ||
81 | 77 | (_gpgme_get_gpg_path): Get inst_dir before acquiring the lock. | ||
82 | 78 | (_gpgme_get_gpgconf_path): Ditto. | ||
83 | 79 | (_gpgme_get_g13_path): Ditto. | ||
84 | 80 | (_gpgme_get_w32spawn_path): Ditto. | ||
85 | 81 | |||
86 | 82 | 2013-07-31 Werner Koch <wk@gnupg.org> | ||
87 | 83 | |||
88 | 84 | doc: Add --binary option for the OUTPUT command of an uiserver. | ||
89 | 85 | |||
90 | 86 | 2013-06-18 Werner Koch <wk@gnupg.org> | ||
91 | 87 | |||
92 | 88 | Add function gpgme_signers_count. | ||
93 | 89 | * src/signers.c (gpgme_signers_count): New. | ||
94 | 90 | * src/libgpgme.vers, src/gpgme.def: Add as external symbol. | ||
95 | 91 | * src/gpgme.h.in: Add prototype. | ||
96 | 92 | |||
97 | 1 | 2013-05-28 Werner Koch <wk@gnupg.org> | 93 | 2013-05-28 Werner Koch <wk@gnupg.org> |
98 | 2 | 94 | ||
99 | 3 | Release 1.4.2. | 95 | Release 1.4.2. |
100 | 4 | 96 | ||
101 | === modified file 'NEWS' | |||
102 | --- NEWS 2013-05-29 18:33:42 +0000 | |||
103 | +++ NEWS 2013-10-23 07:14:02 +0000 | |||
104 | @@ -1,3 +1,21 @@ | |||
105 | 1 | Noteworthy changes in version 1.4.3 (2013-08-12) | ||
106 | 2 | ------------------------------------------------ | ||
107 | 3 | |||
108 | 4 | * The default engine names are now taken from the output of gpgconf. | ||
109 | 5 | If gpgconf is not found the use of gpg 1 is assumed. | ||
110 | 6 | |||
111 | 7 | * Under Windows the default engines names are first searched in the | ||
112 | 8 | installation directory of the gpgme DLL. | ||
113 | 9 | |||
114 | 10 | * New function gpgme_data_identify to detect the type of a message. | ||
115 | 11 | |||
116 | 12 | * Interface changes relative to the 1.4.2 release: | ||
117 | 13 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
118 | 14 | gpgme_signers_count NEW. | ||
119 | 15 | gpgme_data_type_t NEW. | ||
120 | 16 | gpgme_data_identify NEW. | ||
121 | 17 | |||
122 | 18 | |||
123 | 1 | Noteworthy changes in version 1.4.2 (2013-05-28) | 19 | Noteworthy changes in version 1.4.2 (2013-05-28) |
124 | 2 | ------------------------------------------------ | 20 | ------------------------------------------------ |
125 | 3 | 21 | ||
126 | 4 | 22 | ||
127 | === modified file 'VERSION' | |||
128 | --- VERSION 2013-05-29 18:33:42 +0000 | |||
129 | +++ VERSION 2013-10-23 07:14:02 +0000 | |||
130 | @@ -1,1 +1,1 @@ | |||
132 | 1 | 1.4.2 | 1 | 1.4.3 |
133 | 2 | 2 | ||
134 | === modified file 'config.h.in' | |||
135 | --- config.h.in 2013-05-14 20:29:20 +0000 | |||
136 | +++ config.h.in 2013-10-23 07:14:02 +0000 | |||
137 | @@ -205,11 +205,15 @@ | |||
138 | 205 | #undef REPLACE_TTYNAME_R | 205 | #undef REPLACE_TTYNAME_R |
139 | 206 | 206 | ||
140 | 207 | 207 | ||
142 | 208 | /* Separators as used in $PATH. */ | 208 | /* Separators as used in $PATH and file name. */ |
143 | 209 | #ifdef HAVE_DOSISH_SYSTEM | 209 | #ifdef HAVE_DOSISH_SYSTEM |
144 | 210 | #define PATHSEP_C ';' | 210 | #define PATHSEP_C ';' |
145 | 211 | #define DIRSEP_C '\\' | ||
146 | 212 | #define DIRSEP_S "\\" | ||
147 | 211 | #else | 213 | #else |
148 | 212 | #define PATHSEP_C ':' | 214 | #define PATHSEP_C ':' |
149 | 215 | #define DIRSEP_C '/' | ||
150 | 216 | #define DIRSEP_S "/" | ||
151 | 213 | #endif | 217 | #endif |
152 | 214 | 218 | ||
153 | 215 | 219 | ||
154 | 216 | 220 | ||
155 | === modified file 'configure' | |||
156 | --- configure 2013-05-29 18:33:42 +0000 | |||
157 | +++ configure 2013-10-23 07:14:02 +0000 | |||
158 | @@ -1,6 +1,6 @@ | |||
159 | 1 | #! /bin/sh | 1 | #! /bin/sh |
160 | 2 | # Guess values for system-dependent variables and create Makefiles. | 2 | # Guess values for system-dependent variables and create Makefiles. |
162 | 3 | # Generated by GNU Autoconf 2.69 for gpgme 1.4.2. | 3 | # Generated by GNU Autoconf 2.69 for gpgme 1.4.3. |
163 | 4 | # | 4 | # |
164 | 5 | # Report bugs to <http://bugs.gnupg.org>. | 5 | # Report bugs to <http://bugs.gnupg.org>. |
165 | 6 | # | 6 | # |
166 | @@ -590,8 +590,8 @@ | |||
167 | 590 | # Identity of this package. | 590 | # Identity of this package. |
168 | 591 | PACKAGE_NAME='gpgme' | 591 | PACKAGE_NAME='gpgme' |
169 | 592 | PACKAGE_TARNAME='gpgme' | 592 | PACKAGE_TARNAME='gpgme' |
172 | 593 | PACKAGE_VERSION='1.4.2' | 593 | PACKAGE_VERSION='1.4.3' |
173 | 594 | PACKAGE_STRING='gpgme 1.4.2' | 594 | PACKAGE_STRING='gpgme 1.4.3' |
174 | 595 | PACKAGE_BUGREPORT='http://bugs.gnupg.org' | 595 | PACKAGE_BUGREPORT='http://bugs.gnupg.org' |
175 | 596 | PACKAGE_URL='' | 596 | PACKAGE_URL='' |
176 | 597 | 597 | ||
177 | @@ -652,11 +652,6 @@ | |||
178 | 652 | HAVE_G13_FALSE | 652 | HAVE_G13_FALSE |
179 | 653 | HAVE_G13_TRUE | 653 | HAVE_G13_TRUE |
180 | 654 | G13 | 654 | G13 |
181 | 655 | RUN_GPGCONF_TESTS_FALSE | ||
182 | 656 | RUN_GPGCONF_TESTS_TRUE | ||
183 | 657 | HAVE_GPGCONF_FALSE | ||
184 | 658 | HAVE_GPGCONF_TRUE | ||
185 | 659 | GPGCONF | ||
186 | 660 | RUN_GPGSM_TESTS_FALSE | 655 | RUN_GPGSM_TESTS_FALSE |
187 | 661 | RUN_GPGSM_TESTS_TRUE | 656 | RUN_GPGSM_TESTS_TRUE |
188 | 662 | HAVE_GPGSM_FALSE | 657 | HAVE_GPGSM_FALSE |
189 | @@ -666,6 +661,11 @@ | |||
190 | 666 | RUN_GPG_TESTS_FALSE | 661 | RUN_GPG_TESTS_FALSE |
191 | 667 | RUN_GPG_TESTS_TRUE | 662 | RUN_GPG_TESTS_TRUE |
192 | 668 | GPG | 663 | GPG |
193 | 664 | RUN_GPGCONF_TESTS_FALSE | ||
194 | 665 | RUN_GPGCONF_TESTS_TRUE | ||
195 | 666 | HAVE_GPGCONF_FALSE | ||
196 | 667 | HAVE_GPGCONF_TRUE | ||
197 | 668 | GPGCONF | ||
198 | 669 | HAVE_ASSUAN_FALSE | 669 | HAVE_ASSUAN_FALSE |
199 | 670 | HAVE_ASSUAN_TRUE | 670 | HAVE_ASSUAN_TRUE |
200 | 671 | LIBASSUAN_LIBS | 671 | LIBASSUAN_LIBS |
201 | @@ -857,12 +857,12 @@ | |||
202 | 857 | with_gpgsm_version | 857 | with_gpgsm_version |
203 | 858 | with_gpgconf_version | 858 | with_gpgconf_version |
204 | 859 | with_g13_version | 859 | with_g13_version |
205 | 860 | with_gpgconf | ||
206 | 861 | enable_gpgconf_test | ||
207 | 860 | with_gpg | 862 | with_gpg |
208 | 861 | enable_gpg_test | 863 | enable_gpg_test |
209 | 862 | with_gpgsm | 864 | with_gpgsm |
210 | 863 | enable_gpgsm_test | 865 | enable_gpgsm_test |
211 | 864 | with_gpgconf | ||
212 | 865 | enable_gpgconf_test | ||
213 | 866 | with_g13 | 866 | with_g13 |
214 | 867 | enable_g13_test | 867 | enable_g13_test |
215 | 868 | enable_fd_passing | 868 | enable_fd_passing |
216 | @@ -1420,7 +1420,7 @@ | |||
217 | 1420 | # Omit some internal or obsolete options to make the list less imposing. | 1420 | # Omit some internal or obsolete options to make the list less imposing. |
218 | 1421 | # This message is too long to be a string in the A/UX 3.1 sh. | 1421 | # This message is too long to be a string in the A/UX 3.1 sh. |
219 | 1422 | cat <<_ACEOF | 1422 | cat <<_ACEOF |
221 | 1423 | \`configure' configures gpgme 1.4.2 to adapt to many kinds of systems. | 1423 | \`configure' configures gpgme 1.4.3 to adapt to many kinds of systems. |
222 | 1424 | 1424 | ||
223 | 1425 | Usage: $0 [OPTION]... [VAR=VALUE]... | 1425 | Usage: $0 [OPTION]... [VAR=VALUE]... |
224 | 1426 | 1426 | ||
225 | @@ -1490,7 +1490,7 @@ | |||
226 | 1490 | 1490 | ||
227 | 1491 | if test -n "$ac_init_help"; then | 1491 | if test -n "$ac_init_help"; then |
228 | 1492 | case $ac_init_help in | 1492 | case $ac_init_help in |
230 | 1493 | short | recursive ) echo "Configuration of gpgme 1.4.2:";; | 1493 | short | recursive ) echo "Configuration of gpgme 1.4.3:";; |
231 | 1494 | esac | 1494 | esac |
232 | 1495 | cat <<\_ACEOF | 1495 | cat <<\_ACEOF |
233 | 1496 | 1496 | ||
234 | @@ -1511,9 +1511,9 @@ | |||
235 | 1511 | --enable-w32-glib build GPGME Glib for W32 | 1511 | --enable-w32-glib build GPGME Glib for W32 |
236 | 1512 | --enable-w32-qt build GPGME Qt for W32 | 1512 | --enable-w32-qt build GPGME Qt for W32 |
237 | 1513 | --disable-largefile omit support for large files | 1513 | --disable-largefile omit support for large files |
238 | 1514 | --disable-gpgconf-test disable GPGCONF run test | ||
239 | 1514 | --disable-gpg-test disable GPG run test | 1515 | --disable-gpg-test disable GPG run test |
240 | 1515 | --disable-gpgsm-test disable GPGSM run test | 1516 | --disable-gpgsm-test disable GPGSM run test |
241 | 1516 | --disable-gpgconf-test disable GPGCONF run test | ||
242 | 1517 | --disable-g13-test disable G13 run test | 1517 | --disable-g13-test disable G13 run test |
243 | 1518 | --disable-fd-passing do not use FD passing | 1518 | --disable-fd-passing do not use FD passing |
244 | 1519 | 1519 | ||
245 | @@ -1536,9 +1536,9 @@ | |||
246 | 1536 | --with-gpgconf-version=VER | 1536 | --with-gpgconf-version=VER |
247 | 1537 | require GPGCONF version VER | 1537 | require GPGCONF version VER |
248 | 1538 | --with-g13-version=VER require G13 version VER | 1538 | --with-g13-version=VER require G13 version VER |
249 | 1539 | --with-gpgconf=PATH use gpgconf binary at PATH | ||
250 | 1539 | --with-gpg=PATH use GnuPG binary at PATH | 1540 | --with-gpg=PATH use GnuPG binary at PATH |
251 | 1540 | --with-gpgsm=PATH use GpgSM binary at PATH | 1541 | --with-gpgsm=PATH use GpgSM binary at PATH |
252 | 1541 | --with-gpgconf=PATH use gpgconf binary at PATH | ||
253 | 1542 | --with-g13=PATH use g13 binary at PATH | 1542 | --with-g13=PATH use g13 binary at PATH |
254 | 1543 | 1543 | ||
255 | 1544 | Some influential environment variables: | 1544 | Some influential environment variables: |
256 | @@ -1620,7 +1620,7 @@ | |||
257 | 1620 | test -n "$ac_init_help" && exit $ac_status | 1620 | test -n "$ac_init_help" && exit $ac_status |
258 | 1621 | if $ac_init_version; then | 1621 | if $ac_init_version; then |
259 | 1622 | cat <<\_ACEOF | 1622 | cat <<\_ACEOF |
261 | 1623 | gpgme configure 1.4.2 | 1623 | gpgme configure 1.4.3 |
262 | 1624 | generated by GNU Autoconf 2.69 | 1624 | generated by GNU Autoconf 2.69 |
263 | 1625 | 1625 | ||
264 | 1626 | Copyright (C) 2012 Free Software Foundation, Inc. | 1626 | Copyright (C) 2012 Free Software Foundation, Inc. |
265 | @@ -2450,7 +2450,7 @@ | |||
266 | 2450 | This file contains any messages produced by compilers while | 2450 | This file contains any messages produced by compilers while |
267 | 2451 | running configure, to aid debugging if configure makes a mistake. | 2451 | running configure, to aid debugging if configure makes a mistake. |
268 | 2452 | 2452 | ||
270 | 2453 | It was created by gpgme $as_me 1.4.2, which was | 2453 | It was created by gpgme $as_me 1.4.3, which was |
271 | 2454 | generated by GNU Autoconf 2.69. Invocation command line was | 2454 | generated by GNU Autoconf 2.69. Invocation command line was |
272 | 2455 | 2455 | ||
273 | 2456 | $ $0 $@ | 2456 | $ $0 $@ |
274 | @@ -2813,10 +2813,10 @@ | |||
275 | 2813 | # (Interfaces added: AGE++) | 2813 | # (Interfaces added: AGE++) |
276 | 2814 | # (Interfaces removed/changed: AGE=0) | 2814 | # (Interfaces removed/changed: AGE=0) |
277 | 2815 | # | 2815 | # |
279 | 2816 | LIBGPGME_LT_CURRENT=21 | 2816 | LIBGPGME_LT_CURRENT=22 |
280 | 2817 | # Subtract 2 from this value if you want to make the LFS transition an | 2817 | # Subtract 2 from this value if you want to make the LFS transition an |
281 | 2818 | # ABI break. [Note to self: Remove this comment with the next regular break.] | 2818 | # ABI break. [Note to self: Remove this comment with the next regular break.] |
283 | 2819 | LIBGPGME_LT_AGE=10 | 2819 | LIBGPGME_LT_AGE=11 |
284 | 2820 | LIBGPGME_LT_REVISION=0 | 2820 | LIBGPGME_LT_REVISION=0 |
285 | 2821 | 2821 | ||
286 | 2822 | # If the API is changed in an incompatible way: increment the next counter. | 2822 | # If the API is changed in an incompatible way: increment the next counter. |
287 | @@ -2864,6 +2864,8 @@ | |||
288 | 2864 | 2864 | ||
289 | 2865 | ac_config_headers="$ac_config_headers config.h" | 2865 | ac_config_headers="$ac_config_headers config.h" |
290 | 2866 | 2866 | ||
291 | 2867 | # Note: For automake 1.13 add the option | ||
292 | 2868 | # serial-tests | ||
293 | 2867 | am__api_version='1.11' | 2869 | am__api_version='1.11' |
294 | 2868 | 2870 | ||
295 | 2869 | # Find a good install program. We prefer a C program (faster), | 2871 | # Find a good install program. We prefer a C program (faster), |
296 | @@ -3302,7 +3304,7 @@ | |||
297 | 3302 | 3304 | ||
298 | 3303 | # Define the identity of the package. | 3305 | # Define the identity of the package. |
299 | 3304 | PACKAGE='gpgme' | 3306 | PACKAGE='gpgme' |
301 | 3305 | VERSION='1.4.2' | 3307 | VERSION='1.4.3' |
302 | 3306 | 3308 | ||
303 | 3307 | 3309 | ||
304 | 3308 | cat >>confdefs.h <<_ACEOF | 3310 | cat >>confdefs.h <<_ACEOF |
305 | @@ -5995,7 +5997,7 @@ | |||
306 | 5995 | #define VERSION "$VERSION" | 5997 | #define VERSION "$VERSION" |
307 | 5996 | _ACEOF | 5998 | _ACEOF |
308 | 5997 | 5999 | ||
310 | 5998 | VERSION_NUMBER=0x010402 | 6000 | VERSION_NUMBER=0x010403 |
311 | 5999 | 6001 | ||
312 | 6000 | 6002 | ||
313 | 6001 | # Don't default to build static libs. | 6003 | # Don't default to build static libs. |
314 | @@ -17323,7 +17325,7 @@ | |||
315 | 17323 | # | 17325 | # |
316 | 17324 | # Provide information about the build. | 17326 | # Provide information about the build. |
317 | 17325 | # | 17327 | # |
319 | 17326 | BUILD_REVISION="009e26a" | 17328 | BUILD_REVISION="d788c35" |
320 | 17327 | 17329 | ||
321 | 17328 | 17330 | ||
322 | 17329 | cat >>confdefs.h <<_ACEOF | 17331 | cat >>confdefs.h <<_ACEOF |
323 | @@ -17332,7 +17334,7 @@ | |||
324 | 17332 | 17334 | ||
325 | 17333 | 17335 | ||
326 | 17334 | BUILD_FILEVERSION=`echo "$PACKAGE_VERSION"|sed 's/\([0-9.]*\).*/\1./;s/\./,/g'` | 17336 | BUILD_FILEVERSION=`echo "$PACKAGE_VERSION"|sed 's/\([0-9.]*\).*/\1./;s/\./,/g'` |
328 | 17335 | BUILD_FILEVERSION="${BUILD_FILEVERSION}158" | 17337 | BUILD_FILEVERSION="${BUILD_FILEVERSION}55176" |
329 | 17336 | 17338 | ||
330 | 17337 | 17339 | ||
331 | 17338 | BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date` | 17340 | BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date` |
332 | @@ -18737,6 +18739,11 @@ | |||
333 | 18737 | 18739 | ||
334 | 18738 | 18740 | ||
335 | 18739 | cat >>confdefs.h <<_ACEOF | 18741 | cat >>confdefs.h <<_ACEOF |
336 | 18742 | #define NEED_GPGCONF_VERSION "$NEED_GPGCONF_VERSION" | ||
337 | 18743 | _ACEOF | ||
338 | 18744 | |||
339 | 18745 | |||
340 | 18746 | cat >>confdefs.h <<_ACEOF | ||
341 | 18740 | #define NEED_GPG_VERSION "$NEED_GPG_VERSION" | 18747 | #define NEED_GPG_VERSION "$NEED_GPG_VERSION" |
342 | 18741 | _ACEOF | 18748 | _ACEOF |
343 | 18742 | 18749 | ||
344 | @@ -18747,16 +18754,190 @@ | |||
345 | 18747 | 18754 | ||
346 | 18748 | 18755 | ||
347 | 18749 | cat >>confdefs.h <<_ACEOF | 18756 | cat >>confdefs.h <<_ACEOF |
348 | 18750 | #define NEED_GPGCONF_VERSION "$NEED_GPGCONF_VERSION" | ||
349 | 18751 | _ACEOF | ||
350 | 18752 | |||
351 | 18753 | |||
352 | 18754 | cat >>confdefs.h <<_ACEOF | ||
353 | 18755 | #define NEED_G13_VERSION "$NEED_G13_VERSION" | 18757 | #define NEED_G13_VERSION "$NEED_G13_VERSION" |
354 | 18756 | _ACEOF | 18758 | _ACEOF |
355 | 18757 | 18759 | ||
356 | 18758 | 18760 | ||
358 | 18759 | 18761 | # | |
359 | 18762 | # Check for GPGCONF | ||
360 | 18763 | # | ||
361 | 18764 | gpgconf_usable_for_test=no | ||
362 | 18765 | NO_OVERRIDE=no | ||
363 | 18766 | |||
364 | 18767 | # Check whether --with-gpgconf was given. | ||
365 | 18768 | if test "${with_gpgconf+set}" = set; then : | ||
366 | 18769 | withval=$with_gpgconf; GPGCONF=$withval | ||
367 | 18770 | else | ||
368 | 18771 | NO_OVERRIDE=yes | ||
369 | 18772 | fi | ||
370 | 18773 | |||
371 | 18774 | if test "$NO_OVERRIDE" = "yes" || test "$GPGCONF" = "yes"; then | ||
372 | 18775 | GPGCONF= | ||
373 | 18776 | NO_OVERRIDE=yes | ||
374 | 18777 | if test "$cross_compiling" != "yes"; then | ||
375 | 18778 | # Extract the first word of "gpgconf", so it can be a program name with args. | ||
376 | 18779 | set dummy gpgconf; ac_word=$2 | ||
377 | 18780 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
378 | 18781 | $as_echo_n "checking for $ac_word... " >&6; } | ||
379 | 18782 | if ${ac_cv_path_GPGCONF+:} false; then : | ||
380 | 18783 | $as_echo_n "(cached) " >&6 | ||
381 | 18784 | else | ||
382 | 18785 | case $GPGCONF in | ||
383 | 18786 | [\\/]* | ?:[\\/]*) | ||
384 | 18787 | ac_cv_path_GPGCONF="$GPGCONF" # Let the user override the test with a path. | ||
385 | 18788 | ;; | ||
386 | 18789 | *) | ||
387 | 18790 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
388 | 18791 | for as_dir in $PATH | ||
389 | 18792 | do | ||
390 | 18793 | IFS=$as_save_IFS | ||
391 | 18794 | test -z "$as_dir" && as_dir=. | ||
392 | 18795 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
393 | 18796 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
394 | 18797 | ac_cv_path_GPGCONF="$as_dir/$ac_word$ac_exec_ext" | ||
395 | 18798 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
396 | 18799 | break 2 | ||
397 | 18800 | fi | ||
398 | 18801 | done | ||
399 | 18802 | done | ||
400 | 18803 | IFS=$as_save_IFS | ||
401 | 18804 | |||
402 | 18805 | ;; | ||
403 | 18806 | esac | ||
404 | 18807 | fi | ||
405 | 18808 | GPGCONF=$ac_cv_path_GPGCONF | ||
406 | 18809 | if test -n "$GPGCONF"; then | ||
407 | 18810 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GPGCONF" >&5 | ||
408 | 18811 | $as_echo "$GPGCONF" >&6; } | ||
409 | 18812 | else | ||
410 | 18813 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
411 | 18814 | $as_echo "no" >&6; } | ||
412 | 18815 | fi | ||
413 | 18816 | |||
414 | 18817 | |||
415 | 18818 | fi | ||
416 | 18819 | if test -z "$GPGCONF"; then | ||
417 | 18820 | GPGCONF="$GPGCONF_DEFAULT" | ||
418 | 18821 | fi | ||
419 | 18822 | fi | ||
420 | 18823 | if test "$GPGCONF" = no; then | ||
421 | 18824 | if test "$NO_OVERRIDE" = "yes"; then | ||
422 | 18825 | if test "$cross_compiling" != "yes"; then | ||
423 | 18826 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | ||
424 | 18827 | *** | ||
425 | 18828 | *** Could not find gpgconf, install gpgconf or use --with-gpgconf=PATH to enable it | ||
426 | 18829 | ***" >&5 | ||
427 | 18830 | $as_echo "$as_me: WARNING: | ||
428 | 18831 | *** | ||
429 | 18832 | *** Could not find gpgconf, install gpgconf or use --with-gpgconf=PATH to enable it | ||
430 | 18833 | ***" >&2;} | ||
431 | 18834 | else | ||
432 | 18835 | as_fn_error $? " | ||
433 | 18836 | *** | ||
434 | 18837 | *** Can not determine path to gpgconf when cross-compiling, use --with-gpgconf=PATH | ||
435 | 18838 | ***" "$LINENO" 5 | ||
436 | 18839 | fi | ||
437 | 18840 | fi | ||
438 | 18841 | else | ||
439 | 18842 | |||
440 | 18843 | cat >>confdefs.h <<_ACEOF | ||
441 | 18844 | #define GPGCONF_PATH "$GPGCONF" | ||
442 | 18845 | _ACEOF | ||
443 | 18846 | |||
444 | 18847 | |||
445 | 18848 | $as_echo "#define ENABLE_GPGCONF 1" >>confdefs.h | ||
446 | 18849 | |||
447 | 18850 | fi | ||
448 | 18851 | if test "$GPGCONF" != "no"; then | ||
449 | 18852 | HAVE_GPGCONF_TRUE= | ||
450 | 18853 | HAVE_GPGCONF_FALSE='#' | ||
451 | 18854 | else | ||
452 | 18855 | HAVE_GPGCONF_TRUE='#' | ||
453 | 18856 | HAVE_GPGCONF_FALSE= | ||
454 | 18857 | fi | ||
455 | 18858 | |||
456 | 18859 | |||
457 | 18860 | GPGCONF_VERSION=unknown | ||
458 | 18861 | ok=maybe | ||
459 | 18862 | if test -z "$GPGCONF" -o "x$GPGCONF" = "xno"; then | ||
460 | 18863 | ok=no | ||
461 | 18864 | else | ||
462 | 18865 | if test "$cross_compiling" = "yes"; then | ||
463 | 18866 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GPGCONF version can not be checked when cross compiling" >&5 | ||
464 | 18867 | $as_echo "$as_me: WARNING: GPGCONF version can not be checked when cross compiling" >&2;} | ||
465 | 18868 | ok=no | ||
466 | 18869 | else | ||
467 | 18870 | if test ! -x "$GPGCONF"; then | ||
468 | 18871 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GPGCONF not executable, version check disabled" >&5 | ||
469 | 18872 | $as_echo "$as_me: WARNING: GPGCONF not executable, version check disabled" >&2;} | ||
470 | 18873 | ok=no | ||
471 | 18874 | fi | ||
472 | 18875 | fi | ||
473 | 18876 | fi | ||
474 | 18877 | if test "$ok" = "maybe"; then | ||
475 | 18878 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GPGCONF >= $NEED_GPGCONF_VERSION" >&5 | ||
476 | 18879 | $as_echo_n "checking for GPGCONF >= $NEED_GPGCONF_VERSION... " >&6; } | ||
477 | 18880 | req_major=`echo $NEED_GPGCONF_VERSION | \ | ||
478 | 18881 | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'` | ||
479 | 18882 | req_minor=`echo $NEED_GPGCONF_VERSION | \ | ||
480 | 18883 | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'` | ||
481 | 18884 | req_micro=`echo $NEED_GPGCONF_VERSION | \ | ||
482 | 18885 | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'` | ||
483 | 18886 | GPGCONF_VERSION=`$GPGCONF --version | sed -n '1 s/[^0-9]*\(.*\)/\1/p'` | ||
484 | 18887 | major=`echo $GPGCONF_VERSION | \ | ||
485 | 18888 | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/'` | ||
486 | 18889 | minor=`echo $GPGCONF_VERSION | \ | ||
487 | 18890 | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/'` | ||
488 | 18891 | micro=`echo $GPGCONF_VERSION | \ | ||
489 | 18892 | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/'` | ||
490 | 18893 | |||
491 | 18894 | if test "$major" -gt "$req_major"; then | ||
492 | 18895 | ok=yes | ||
493 | 18896 | else | ||
494 | 18897 | if test "$major" -eq "$req_major"; then | ||
495 | 18898 | if test "$minor" -gt "$req_minor"; then | ||
496 | 18899 | ok=yes | ||
497 | 18900 | else | ||
498 | 18901 | if test "$minor" -eq "$req_minor"; then | ||
499 | 18902 | if test "$micro" -ge "$req_micro"; then | ||
500 | 18903 | ok=yes | ||
501 | 18904 | fi | ||
502 | 18905 | fi | ||
503 | 18906 | fi | ||
504 | 18907 | fi | ||
505 | 18908 | fi | ||
506 | 18909 | if test "$ok" = "yes"; then | ||
507 | 18910 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
508 | 18911 | $as_echo "yes" >&6; } | ||
509 | 18912 | if test "$cross_compiling" != "yes"; then | ||
510 | 18913 | gpgconf_usable_for_test=yes | ||
511 | 18914 | fi | ||
512 | 18915 | else | ||
513 | 18916 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
514 | 18917 | $as_echo "no" >&6; } | ||
515 | 18918 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GPGCONF must be at least version $NEED_GPGCONF_VERSION" >&5 | ||
516 | 18919 | $as_echo "$as_me: WARNING: GPGCONF must be at least version $NEED_GPGCONF_VERSION" >&2;} | ||
517 | 18920 | fi | ||
518 | 18921 | fi | ||
519 | 18922 | run_gpgconf_test="$ok" | ||
520 | 18923 | # Check whether --enable-gpgconf-test was given. | ||
521 | 18924 | if test "${enable_gpgconf_test+set}" = set; then : | ||
522 | 18925 | enableval=$enable_gpgconf_test; run_gpgconf_test=$enableval | ||
523 | 18926 | fi | ||
524 | 18927 | |||
525 | 18928 | if test "$run_gpgconf_test" = "yes"; then | ||
526 | 18929 | RUN_GPGCONF_TESTS_TRUE= | ||
527 | 18930 | RUN_GPGCONF_TESTS_FALSE='#' | ||
528 | 18931 | else | ||
529 | 18932 | RUN_GPGCONF_TESTS_TRUE='#' | ||
530 | 18933 | RUN_GPGCONF_TESTS_FALSE= | ||
531 | 18934 | fi | ||
532 | 18935 | |||
533 | 18936 | |||
534 | 18937 | |||
535 | 18938 | # | ||
536 | 18939 | # Check for GPG | ||
537 | 18940 | # | ||
538 | 18760 | NO_OVERRIDE=no | 18941 | NO_OVERRIDE=no |
539 | 18761 | 18942 | ||
540 | 18762 | # Check whether --with-gpg was given. | 18943 | # Check whether --with-gpg was given. |
541 | @@ -18770,7 +18951,10 @@ | |||
542 | 18770 | GPG= | 18951 | GPG= |
543 | 18771 | NO_OVERRIDE=yes | 18952 | NO_OVERRIDE=yes |
544 | 18772 | if test "$cross_compiling" != "yes"; then | 18953 | if test "$cross_compiling" != "yes"; then |
546 | 18773 | # Extract the first word of "gpg", so it can be a program name with args. | 18954 | if test "$gpgconf_usable_for_test" = "yes"; then |
547 | 18955 | GPG="`$GPGCONF --list-components | grep ^gpg: | cut -d: -f 3`" | ||
548 | 18956 | else | ||
549 | 18957 | # Extract the first word of "gpg", so it can be a program name with args. | ||
550 | 18774 | set dummy gpg; ac_word=$2 | 18958 | set dummy gpg; ac_word=$2 |
551 | 18775 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | 18959 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
552 | 18776 | $as_echo_n "checking for $ac_word... " >&6; } | 18960 | $as_echo_n "checking for $ac_word... " >&6; } |
553 | @@ -18810,6 +18994,7 @@ | |||
554 | 18810 | fi | 18994 | fi |
555 | 18811 | 18995 | ||
556 | 18812 | 18996 | ||
557 | 18997 | fi | ||
558 | 18813 | fi | 18998 | fi |
559 | 18814 | if test -z "$GPG"; then | 18999 | if test -z "$GPG"; then |
560 | 18815 | GPG="$GPG_DEFAULT" | 19000 | GPG="$GPG_DEFAULT" |
561 | @@ -18916,6 +19101,10 @@ | |||
562 | 18916 | 19101 | ||
563 | 18917 | 19102 | ||
564 | 18918 | 19103 | ||
565 | 19104 | |||
566 | 19105 | # | ||
567 | 19106 | # Check for GPGSM | ||
568 | 19107 | # | ||
569 | 18919 | NO_OVERRIDE=no | 19108 | NO_OVERRIDE=no |
570 | 18920 | 19109 | ||
571 | 18921 | # Check whether --with-gpgsm was given. | 19110 | # Check whether --with-gpgsm was given. |
572 | @@ -18929,7 +19118,10 @@ | |||
573 | 18929 | GPGSM= | 19118 | GPGSM= |
574 | 18930 | NO_OVERRIDE=yes | 19119 | NO_OVERRIDE=yes |
575 | 18931 | if test "$cross_compiling" != "yes"; then | 19120 | if test "$cross_compiling" != "yes"; then |
577 | 18932 | # Extract the first word of "gpgsm", so it can be a program name with args. | 19121 | if test "$gpgconf_usable_for_test" = "yes"; then |
578 | 19122 | GPGSM="`$GPGCONF --list-components | grep ^gpgsm: | cut -d: -f 3`" | ||
579 | 19123 | else | ||
580 | 19124 | # Extract the first word of "gpgsm", so it can be a program name with args. | ||
581 | 18933 | set dummy gpgsm; ac_word=$2 | 19125 | set dummy gpgsm; ac_word=$2 |
582 | 18934 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | 19126 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
583 | 18935 | $as_echo_n "checking for $ac_word... " >&6; } | 19127 | $as_echo_n "checking for $ac_word... " >&6; } |
584 | @@ -18969,6 +19161,7 @@ | |||
585 | 18969 | fi | 19161 | fi |
586 | 18970 | 19162 | ||
587 | 18971 | 19163 | ||
588 | 19164 | fi | ||
589 | 18972 | fi | 19165 | fi |
590 | 18973 | if test -z "$GPGSM"; then | 19166 | if test -z "$GPGSM"; then |
591 | 18974 | GPGSM="$GPGSM_DEFAULT" | 19167 | GPGSM="$GPGSM_DEFAULT" |
592 | @@ -19087,176 +19280,9 @@ | |||
593 | 19087 | 19280 | ||
594 | 19088 | 19281 | ||
595 | 19089 | 19282 | ||
766 | 19090 | NO_OVERRIDE=no | 19283 | # |
767 | 19091 | 19284 | # Check for G13 | |
768 | 19092 | # Check whether --with-gpgconf was given. | 19285 | # |
599 | 19093 | if test "${with_gpgconf+set}" = set; then : | ||
600 | 19094 | withval=$with_gpgconf; GPGCONF=$withval | ||
601 | 19095 | else | ||
602 | 19096 | NO_OVERRIDE=yes | ||
603 | 19097 | fi | ||
604 | 19098 | |||
605 | 19099 | if test "$NO_OVERRIDE" = "yes" || test "$GPGCONF" = "yes"; then | ||
606 | 19100 | GPGCONF= | ||
607 | 19101 | NO_OVERRIDE=yes | ||
608 | 19102 | if test "$cross_compiling" != "yes"; then | ||
609 | 19103 | # Extract the first word of "gpgconf", so it can be a program name with args. | ||
610 | 19104 | set dummy gpgconf; ac_word=$2 | ||
611 | 19105 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
612 | 19106 | $as_echo_n "checking for $ac_word... " >&6; } | ||
613 | 19107 | if ${ac_cv_path_GPGCONF+:} false; then : | ||
614 | 19108 | $as_echo_n "(cached) " >&6 | ||
615 | 19109 | else | ||
616 | 19110 | case $GPGCONF in | ||
617 | 19111 | [\\/]* | ?:[\\/]*) | ||
618 | 19112 | ac_cv_path_GPGCONF="$GPGCONF" # Let the user override the test with a path. | ||
619 | 19113 | ;; | ||
620 | 19114 | *) | ||
621 | 19115 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
622 | 19116 | for as_dir in $PATH | ||
623 | 19117 | do | ||
624 | 19118 | IFS=$as_save_IFS | ||
625 | 19119 | test -z "$as_dir" && as_dir=. | ||
626 | 19120 | for ac_exec_ext in '' $ac_executable_extensions; do | ||
627 | 19121 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
628 | 19122 | ac_cv_path_GPGCONF="$as_dir/$ac_word$ac_exec_ext" | ||
629 | 19123 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
630 | 19124 | break 2 | ||
631 | 19125 | fi | ||
632 | 19126 | done | ||
633 | 19127 | done | ||
634 | 19128 | IFS=$as_save_IFS | ||
635 | 19129 | |||
636 | 19130 | ;; | ||
637 | 19131 | esac | ||
638 | 19132 | fi | ||
639 | 19133 | GPGCONF=$ac_cv_path_GPGCONF | ||
640 | 19134 | if test -n "$GPGCONF"; then | ||
641 | 19135 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GPGCONF" >&5 | ||
642 | 19136 | $as_echo "$GPGCONF" >&6; } | ||
643 | 19137 | else | ||
644 | 19138 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
645 | 19139 | $as_echo "no" >&6; } | ||
646 | 19140 | fi | ||
647 | 19141 | |||
648 | 19142 | |||
649 | 19143 | fi | ||
650 | 19144 | if test -z "$GPGCONF"; then | ||
651 | 19145 | GPGCONF="$GPGCONF_DEFAULT" | ||
652 | 19146 | fi | ||
653 | 19147 | fi | ||
654 | 19148 | if test "$GPGCONF" = no; then | ||
655 | 19149 | if test "$NO_OVERRIDE" = "yes"; then | ||
656 | 19150 | if test "$cross_compiling" != "yes"; then | ||
657 | 19151 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: | ||
658 | 19152 | *** | ||
659 | 19153 | *** Could not find gpgconf, install gpgconf or use --with-gpgconf=PATH to enable it | ||
660 | 19154 | ***" >&5 | ||
661 | 19155 | $as_echo "$as_me: WARNING: | ||
662 | 19156 | *** | ||
663 | 19157 | *** Could not find gpgconf, install gpgconf or use --with-gpgconf=PATH to enable it | ||
664 | 19158 | ***" >&2;} | ||
665 | 19159 | else | ||
666 | 19160 | as_fn_error $? " | ||
667 | 19161 | *** | ||
668 | 19162 | *** Can not determine path to gpgconf when cross-compiling, use --with-gpgconf=PATH | ||
669 | 19163 | ***" "$LINENO" 5 | ||
670 | 19164 | fi | ||
671 | 19165 | fi | ||
672 | 19166 | else | ||
673 | 19167 | |||
674 | 19168 | cat >>confdefs.h <<_ACEOF | ||
675 | 19169 | #define GPGCONF_PATH "$GPGCONF" | ||
676 | 19170 | _ACEOF | ||
677 | 19171 | |||
678 | 19172 | |||
679 | 19173 | $as_echo "#define ENABLE_GPGCONF 1" >>confdefs.h | ||
680 | 19174 | |||
681 | 19175 | fi | ||
682 | 19176 | if test "$GPGCONF" != "no"; then | ||
683 | 19177 | HAVE_GPGCONF_TRUE= | ||
684 | 19178 | HAVE_GPGCONF_FALSE='#' | ||
685 | 19179 | else | ||
686 | 19180 | HAVE_GPGCONF_TRUE='#' | ||
687 | 19181 | HAVE_GPGCONF_FALSE= | ||
688 | 19182 | fi | ||
689 | 19183 | |||
690 | 19184 | |||
691 | 19185 | GPGCONF_VERSION=unknown | ||
692 | 19186 | ok=maybe | ||
693 | 19187 | if test -z "$GPGCONF" -o "x$GPGCONF" = "xno"; then | ||
694 | 19188 | ok=no | ||
695 | 19189 | else | ||
696 | 19190 | if test "$cross_compiling" = "yes"; then | ||
697 | 19191 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GPGCONF version can not be checked when cross compiling" >&5 | ||
698 | 19192 | $as_echo "$as_me: WARNING: GPGCONF version can not be checked when cross compiling" >&2;} | ||
699 | 19193 | ok=no | ||
700 | 19194 | else | ||
701 | 19195 | if test ! -x "$GPGCONF"; then | ||
702 | 19196 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GPGCONF not executable, version check disabled" >&5 | ||
703 | 19197 | $as_echo "$as_me: WARNING: GPGCONF not executable, version check disabled" >&2;} | ||
704 | 19198 | ok=no | ||
705 | 19199 | fi | ||
706 | 19200 | fi | ||
707 | 19201 | fi | ||
708 | 19202 | if test "$ok" = "maybe"; then | ||
709 | 19203 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GPGCONF >= $NEED_GPGCONF_VERSION" >&5 | ||
710 | 19204 | $as_echo_n "checking for GPGCONF >= $NEED_GPGCONF_VERSION... " >&6; } | ||
711 | 19205 | req_major=`echo $NEED_GPGCONF_VERSION | \ | ||
712 | 19206 | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'` | ||
713 | 19207 | req_minor=`echo $NEED_GPGCONF_VERSION | \ | ||
714 | 19208 | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'` | ||
715 | 19209 | req_micro=`echo $NEED_GPGCONF_VERSION | \ | ||
716 | 19210 | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'` | ||
717 | 19211 | GPGCONF_VERSION=`$GPGCONF --version | sed -n '1 s/[^0-9]*\(.*\)/\1/p'` | ||
718 | 19212 | major=`echo $GPGCONF_VERSION | \ | ||
719 | 19213 | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/'` | ||
720 | 19214 | minor=`echo $GPGCONF_VERSION | \ | ||
721 | 19215 | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/'` | ||
722 | 19216 | micro=`echo $GPGCONF_VERSION | \ | ||
723 | 19217 | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/'` | ||
724 | 19218 | |||
725 | 19219 | if test "$major" -gt "$req_major"; then | ||
726 | 19220 | ok=yes | ||
727 | 19221 | else | ||
728 | 19222 | if test "$major" -eq "$req_major"; then | ||
729 | 19223 | if test "$minor" -gt "$req_minor"; then | ||
730 | 19224 | ok=yes | ||
731 | 19225 | else | ||
732 | 19226 | if test "$minor" -eq "$req_minor"; then | ||
733 | 19227 | if test "$micro" -ge "$req_micro"; then | ||
734 | 19228 | ok=yes | ||
735 | 19229 | fi | ||
736 | 19230 | fi | ||
737 | 19231 | fi | ||
738 | 19232 | fi | ||
739 | 19233 | fi | ||
740 | 19234 | if test "$ok" = "yes"; then | ||
741 | 19235 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
742 | 19236 | $as_echo "yes" >&6; } | ||
743 | 19237 | else | ||
744 | 19238 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
745 | 19239 | $as_echo "no" >&6; } | ||
746 | 19240 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GPGCONF must be at least version $NEED_GPGCONF_VERSION" >&5 | ||
747 | 19241 | $as_echo "$as_me: WARNING: GPGCONF must be at least version $NEED_GPGCONF_VERSION" >&2;} | ||
748 | 19242 | fi | ||
749 | 19243 | fi | ||
750 | 19244 | run_gpgconf_test="$ok" | ||
751 | 19245 | # Check whether --enable-gpgconf-test was given. | ||
752 | 19246 | if test "${enable_gpgconf_test+set}" = set; then : | ||
753 | 19247 | enableval=$enable_gpgconf_test; run_gpgconf_test=$enableval | ||
754 | 19248 | fi | ||
755 | 19249 | |||
756 | 19250 | if test "$run_gpgconf_test" = "yes"; then | ||
757 | 19251 | RUN_GPGCONF_TESTS_TRUE= | ||
758 | 19252 | RUN_GPGCONF_TESTS_FALSE='#' | ||
759 | 19253 | else | ||
760 | 19254 | RUN_GPGCONF_TESTS_TRUE='#' | ||
761 | 19255 | RUN_GPGCONF_TESTS_FALSE= | ||
762 | 19256 | fi | ||
763 | 19257 | |||
764 | 19258 | |||
765 | 19259 | |||
769 | 19260 | NO_OVERRIDE=no | 19286 | NO_OVERRIDE=no |
770 | 19261 | 19287 | ||
771 | 19262 | # Check whether --with-g13 was given. | 19288 | # Check whether --with-g13 was given. |
772 | @@ -19270,7 +19296,14 @@ | |||
773 | 19270 | G13= | 19296 | G13= |
774 | 19271 | NO_OVERRIDE=yes | 19297 | NO_OVERRIDE=yes |
775 | 19272 | if test "$cross_compiling" != "yes"; then | 19298 | if test "$cross_compiling" != "yes"; then |
777 | 19273 | # Extract the first word of "g13", so it can be a program name with args. | 19299 | if test "$gpgconf_usable_for_test" = "yes"; then |
778 | 19300 | G13="`$GPGCONF --list-components | grep ^g13: | cut -d: -f 3`" | ||
779 | 19301 | if test -z "$G13"; then | ||
780 | 19302 | # Use a hack if gpgconf has no support for g13. | ||
781 | 19303 | G13="`$GPGCONF --list-dirs | grep ^bindir: | cut -d: -f 2`/g13" | ||
782 | 19304 | fi | ||
783 | 19305 | else | ||
784 | 19306 | # Extract the first word of "g13", so it can be a program name with args. | ||
785 | 19274 | set dummy g13; ac_word=$2 | 19307 | set dummy g13; ac_word=$2 |
786 | 19275 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | 19308 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
787 | 19276 | $as_echo_n "checking for $ac_word... " >&6; } | 19309 | $as_echo_n "checking for $ac_word... " >&6; } |
788 | @@ -19310,6 +19343,7 @@ | |||
789 | 19310 | fi | 19343 | fi |
790 | 19311 | 19344 | ||
791 | 19312 | 19345 | ||
792 | 19346 | fi | ||
793 | 19313 | fi | 19347 | fi |
794 | 19314 | if test -z "$G13"; then | 19348 | if test -z "$G13"; then |
795 | 19315 | G13="$G13_DEFAULT" | 19349 | G13="$G13_DEFAULT" |
796 | @@ -19427,6 +19461,10 @@ | |||
797 | 19427 | 19461 | ||
798 | 19428 | 19462 | ||
799 | 19429 | 19463 | ||
800 | 19464 | # | ||
801 | 19465 | # Other checks | ||
802 | 19466 | # | ||
803 | 19467 | |||
804 | 19430 | # Check for funopen | 19468 | # Check for funopen |
805 | 19431 | for ac_func in funopen | 19469 | for ac_func in funopen |
806 | 19432 | do : | 19470 | do : |
807 | @@ -19889,6 +19927,14 @@ | |||
808 | 19889 | as_fn_error $? "conditional \"HAVE_ASSUAN\" was never defined. | 19927 | as_fn_error $? "conditional \"HAVE_ASSUAN\" was never defined. |
809 | 19890 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | 19928 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
810 | 19891 | fi | 19929 | fi |
811 | 19930 | if test -z "${HAVE_GPGCONF_TRUE}" && test -z "${HAVE_GPGCONF_FALSE}"; then | ||
812 | 19931 | as_fn_error $? "conditional \"HAVE_GPGCONF\" was never defined. | ||
813 | 19932 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | ||
814 | 19933 | fi | ||
815 | 19934 | if test -z "${RUN_GPGCONF_TESTS_TRUE}" && test -z "${RUN_GPGCONF_TESTS_FALSE}"; then | ||
816 | 19935 | as_fn_error $? "conditional \"RUN_GPGCONF_TESTS\" was never defined. | ||
817 | 19936 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | ||
818 | 19937 | fi | ||
819 | 19892 | if test -z "${RUN_GPG_TESTS_TRUE}" && test -z "${RUN_GPG_TESTS_FALSE}"; then | 19938 | if test -z "${RUN_GPG_TESTS_TRUE}" && test -z "${RUN_GPG_TESTS_FALSE}"; then |
820 | 19893 | as_fn_error $? "conditional \"RUN_GPG_TESTS\" was never defined. | 19939 | as_fn_error $? "conditional \"RUN_GPG_TESTS\" was never defined. |
821 | 19894 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | 19940 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
822 | @@ -19901,14 +19947,6 @@ | |||
823 | 19901 | as_fn_error $? "conditional \"RUN_GPGSM_TESTS\" was never defined. | 19947 | as_fn_error $? "conditional \"RUN_GPGSM_TESTS\" was never defined. |
824 | 19902 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | 19948 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
825 | 19903 | fi | 19949 | fi |
826 | 19904 | if test -z "${HAVE_GPGCONF_TRUE}" && test -z "${HAVE_GPGCONF_FALSE}"; then | ||
827 | 19905 | as_fn_error $? "conditional \"HAVE_GPGCONF\" was never defined. | ||
828 | 19906 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | ||
829 | 19907 | fi | ||
830 | 19908 | if test -z "${RUN_GPGCONF_TESTS_TRUE}" && test -z "${RUN_GPGCONF_TESTS_FALSE}"; then | ||
831 | 19909 | as_fn_error $? "conditional \"RUN_GPGCONF_TESTS\" was never defined. | ||
832 | 19910 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | ||
833 | 19911 | fi | ||
834 | 19912 | if test -z "${HAVE_G13_TRUE}" && test -z "${HAVE_G13_FALSE}"; then | 19950 | if test -z "${HAVE_G13_TRUE}" && test -z "${HAVE_G13_FALSE}"; then |
835 | 19913 | as_fn_error $? "conditional \"HAVE_G13\" was never defined. | 19951 | as_fn_error $? "conditional \"HAVE_G13\" was never defined. |
836 | 19914 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 | 19952 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
837 | @@ -20322,7 +20360,7 @@ | |||
838 | 20322 | # report actual input values of CONFIG_FILES etc. instead of their | 20360 | # report actual input values of CONFIG_FILES etc. instead of their |
839 | 20323 | # values after options handling. | 20361 | # values after options handling. |
840 | 20324 | ac_log=" | 20362 | ac_log=" |
842 | 20325 | This file was extended by gpgme $as_me 1.4.2, which was | 20363 | This file was extended by gpgme $as_me 1.4.3, which was |
843 | 20326 | generated by GNU Autoconf 2.69. Invocation command line was | 20364 | generated by GNU Autoconf 2.69. Invocation command line was |
844 | 20327 | 20365 | ||
845 | 20328 | CONFIG_FILES = $CONFIG_FILES | 20366 | CONFIG_FILES = $CONFIG_FILES |
846 | @@ -20388,7 +20426,7 @@ | |||
847 | 20388 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | 20426 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
848 | 20389 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" | 20427 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
849 | 20390 | ac_cs_version="\\ | 20428 | ac_cs_version="\\ |
851 | 20391 | gpgme config.status 1.4.2 | 20429 | gpgme config.status 1.4.3 |
852 | 20392 | configured by $0, generated by GNU Autoconf 2.69, | 20430 | configured by $0, generated by GNU Autoconf 2.69, |
853 | 20393 | with options \\"\$ac_cs_config\\" | 20431 | with options \\"\$ac_cs_config\\" |
854 | 20394 | 20432 | ||
855 | @@ -22682,16 +22720,16 @@ | |||
856 | 22682 | echo " | 22720 | echo " |
857 | 22683 | GPGME v${VERSION} has been configured as follows: | 22721 | GPGME v${VERSION} has been configured as follows: |
858 | 22684 | 22722 | ||
860 | 22685 | Revision: 009e26a (158) | 22723 | Revision: d788c35 (55176) |
861 | 22686 | Platform: $host | 22724 | Platform: $host |
862 | 22687 | 22725 | ||
870 | 22688 | GnuPG path: $GPG | 22726 | Gpgconf at: $GPGCONF |
871 | 22689 | GnuPG version: $GPG_VERSION, min. $NEED_GPG_VERSION | 22727 | Gpgconf version: $GPGCONF_VERSION, min. $NEED_GPGCONF_VERSION |
872 | 22690 | GpgSM path: $GPGSM | 22728 | GPG at: $GPG |
873 | 22691 | GpgSM version: $GPGSM_VERSION, min. $NEED_GPGSM_VERSION | 22729 | GPG version: $GPG_VERSION, min. $NEED_GPG_VERSION |
874 | 22692 | GpgConf path: $GPGCONF | 22730 | Gpgsm at: $GPGSM |
875 | 22693 | GpgConf version: $GPGCONF_VERSION, min. $NEED_GPGCONF_VERSION | 22731 | Gpgsm version: $GPGSM_VERSION, min. $NEED_GPGSM_VERSION |
876 | 22694 | G13 path: $G13 | 22732 | G13 at: $G13 |
877 | 22695 | G13 version: $G13_VERSION, min. $NEED_G13_VERSION | 22733 | G13 version: $G13_VERSION, min. $NEED_G13_VERSION |
878 | 22696 | 22734 | ||
879 | 22697 | Assuan version: $libassuan_config_version, min. $NEED_LIBASSUAN_VERSION | 22735 | Assuan version: $libassuan_config_version, min. $NEED_LIBASSUAN_VERSION |
880 | 22698 | 22736 | ||
881 | === modified file 'configure.ac' | |||
882 | --- configure.ac 2013-05-29 18:33:42 +0000 | |||
883 | +++ configure.ac 2013-10-23 07:14:02 +0000 | |||
884 | @@ -29,7 +29,7 @@ | |||
885 | 29 | # for the LT versions. | 29 | # for the LT versions. |
886 | 30 | m4_define(mym4_version_major, [1]) | 30 | m4_define(mym4_version_major, [1]) |
887 | 31 | m4_define(mym4_version_minor, [4]) | 31 | m4_define(mym4_version_minor, [4]) |
889 | 32 | m4_define(mym4_version_micro, [2]) | 32 | m4_define(mym4_version_micro, [3]) |
890 | 33 | 33 | ||
891 | 34 | # Below is m4 magic to extract and compute the revision number, the | 34 | # Below is m4 magic to extract and compute the revision number, the |
892 | 35 | # decimalized short revision number, a beta version string, and a flag | 35 | # decimalized short revision number, a beta version string, and a flag |
893 | @@ -55,10 +55,10 @@ | |||
894 | 55 | # (Interfaces added: AGE++) | 55 | # (Interfaces added: AGE++) |
895 | 56 | # (Interfaces removed/changed: AGE=0) | 56 | # (Interfaces removed/changed: AGE=0) |
896 | 57 | # | 57 | # |
898 | 58 | LIBGPGME_LT_CURRENT=21 | 58 | LIBGPGME_LT_CURRENT=22 |
899 | 59 | # Subtract 2 from this value if you want to make the LFS transition an | 59 | # Subtract 2 from this value if you want to make the LFS transition an |
900 | 60 | # ABI break. [Note to self: Remove this comment with the next regular break.] | 60 | # ABI break. [Note to self: Remove this comment with the next regular break.] |
902 | 61 | LIBGPGME_LT_AGE=10 | 61 | LIBGPGME_LT_AGE=11 |
903 | 62 | LIBGPGME_LT_REVISION=0 | 62 | LIBGPGME_LT_REVISION=0 |
904 | 63 | 63 | ||
905 | 64 | # If the API is changed in an incompatible way: increment the next counter. | 64 | # If the API is changed in an incompatible way: increment the next counter. |
906 | @@ -77,6 +77,8 @@ | |||
907 | 77 | AC_CONFIG_MACRO_DIR([m4]) | 77 | AC_CONFIG_MACRO_DIR([m4]) |
908 | 78 | AC_CONFIG_SRCDIR(src/gpgme.h.in) | 78 | AC_CONFIG_SRCDIR(src/gpgme.h.in) |
909 | 79 | AC_CONFIG_HEADER(config.h) | 79 | AC_CONFIG_HEADER(config.h) |
910 | 80 | # Note: For automake 1.13 add the option | ||
911 | 81 | # serial-tests | ||
912 | 80 | AM_INIT_AUTOMAKE | 82 | AM_INIT_AUTOMAKE |
913 | 81 | AM_MAINTAINER_MODE | 83 | AM_MAINTAINER_MODE |
914 | 82 | AC_CANONICAL_HOST | 84 | AC_CANONICAL_HOST |
915 | @@ -443,16 +445,121 @@ | |||
916 | 443 | NEED_G13_VERSION=0.0.0 | 445 | NEED_G13_VERSION=0.0.0 |
917 | 444 | fi | 446 | fi |
918 | 445 | 447 | ||
919 | 448 | AC_DEFINE_UNQUOTED(NEED_GPGCONF_VERSION, "$NEED_GPGCONF_VERSION", | ||
920 | 449 | [Min. needed GPGCONF version.]) | ||
921 | 446 | AC_DEFINE_UNQUOTED(NEED_GPG_VERSION, "$NEED_GPG_VERSION", | 450 | AC_DEFINE_UNQUOTED(NEED_GPG_VERSION, "$NEED_GPG_VERSION", |
922 | 447 | [Min. needed GnuPG version.]) | 451 | [Min. needed GnuPG version.]) |
923 | 448 | AC_DEFINE_UNQUOTED(NEED_GPGSM_VERSION, "$NEED_GPGSM_VERSION", | 452 | AC_DEFINE_UNQUOTED(NEED_GPGSM_VERSION, "$NEED_GPGSM_VERSION", |
924 | 449 | [Min. needed GPGSM version.]) | 453 | [Min. needed GPGSM version.]) |
925 | 450 | AC_DEFINE_UNQUOTED(NEED_GPGCONF_VERSION, "$NEED_GPGCONF_VERSION", | ||
926 | 451 | [Min. needed GPGCONF version.]) | ||
927 | 452 | AC_DEFINE_UNQUOTED(NEED_G13_VERSION, "$NEED_G13_VERSION", | 454 | AC_DEFINE_UNQUOTED(NEED_G13_VERSION, "$NEED_G13_VERSION", |
928 | 453 | [Min. needed G13 version.]) | 455 | [Min. needed G13 version.]) |
929 | 454 | 456 | ||
931 | 455 | 457 | # | |
932 | 458 | # Check for GPGCONF | ||
933 | 459 | # | ||
934 | 460 | gpgconf_usable_for_test=no | ||
935 | 461 | NO_OVERRIDE=no | ||
936 | 462 | AC_ARG_WITH(gpgconf, | ||
937 | 463 | AC_HELP_STRING([--with-gpgconf=PATH], | ||
938 | 464 | [use gpgconf binary at PATH]), | ||
939 | 465 | GPGCONF=$withval, NO_OVERRIDE=yes) | ||
940 | 466 | if test "$NO_OVERRIDE" = "yes" || test "$GPGCONF" = "yes"; then | ||
941 | 467 | GPGCONF= | ||
942 | 468 | NO_OVERRIDE=yes | ||
943 | 469 | if test "$cross_compiling" != "yes"; then | ||
944 | 470 | AC_PATH_PROG(GPGCONF, gpgconf) | ||
945 | 471 | fi | ||
946 | 472 | if test -z "$GPGCONF"; then | ||
947 | 473 | GPGCONF="$GPGCONF_DEFAULT" | ||
948 | 474 | fi | ||
949 | 475 | fi | ||
950 | 476 | if test "$GPGCONF" = no; then | ||
951 | 477 | if test "$NO_OVERRIDE" = "yes"; then | ||
952 | 478 | if test "$cross_compiling" != "yes"; then | ||
953 | 479 | AC_MSG_WARN([ | ||
954 | 480 | *** | ||
955 | 481 | *** Could not find gpgconf, install gpgconf or use --with-gpgconf=PATH to enable it | ||
956 | 482 | ***]) | ||
957 | 483 | else | ||
958 | 484 | AC_MSG_ERROR([ | ||
959 | 485 | *** | ||
960 | 486 | *** Can not determine path to gpgconf when cross-compiling, use --with-gpgconf=PATH | ||
961 | 487 | ***]) | ||
962 | 488 | fi | ||
963 | 489 | fi | ||
964 | 490 | else | ||
965 | 491 | AC_DEFINE_UNQUOTED(GPGCONF_PATH, "$GPGCONF", [Path to the GPGCONF binary.]) | ||
966 | 492 | AC_DEFINE(ENABLE_GPGCONF,1,[Whether GPGCONF support is enabled]) | ||
967 | 493 | fi | ||
968 | 494 | AM_CONDITIONAL(HAVE_GPGCONF, test "$GPGCONF" != "no") | ||
969 | 495 | |||
970 | 496 | dnl Check for GPGCONF version requirement. | ||
971 | 497 | GPGCONF_VERSION=unknown | ||
972 | 498 | ok=maybe | ||
973 | 499 | if test -z "$GPGCONF" -o "x$GPGCONF" = "xno"; then | ||
974 | 500 | ok=no | ||
975 | 501 | else | ||
976 | 502 | if test "$cross_compiling" = "yes"; then | ||
977 | 503 | AC_MSG_WARN([GPGCONF version can not be checked when cross compiling]) | ||
978 | 504 | ok=no | ||
979 | 505 | else | ||
980 | 506 | if test ! -x "$GPGCONF"; then | ||
981 | 507 | AC_MSG_WARN([GPGCONF not executable, version check disabled]) | ||
982 | 508 | ok=no | ||
983 | 509 | fi | ||
984 | 510 | fi | ||
985 | 511 | fi | ||
986 | 512 | if test "$ok" = "maybe"; then | ||
987 | 513 | AC_MSG_CHECKING(for GPGCONF >= $NEED_GPGCONF_VERSION) | ||
988 | 514 | req_major=`echo $NEED_GPGCONF_VERSION | \ | ||
989 | 515 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` | ||
990 | 516 | req_minor=`echo $NEED_GPGCONF_VERSION | \ | ||
991 | 517 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` | ||
992 | 518 | req_micro=`echo $NEED_GPGCONF_VERSION | \ | ||
993 | 519 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` | ||
994 | 520 | GPGCONF_VERSION=`$GPGCONF --version | sed -n '1 s/[[^0-9]]*\(.*\)/\1/p'` | ||
995 | 521 | major=`echo $GPGCONF_VERSION | \ | ||
996 | 522 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` | ||
997 | 523 | minor=`echo $GPGCONF_VERSION | \ | ||
998 | 524 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` | ||
999 | 525 | micro=`echo $GPGCONF_VERSION | \ | ||
1000 | 526 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` | ||
1001 | 527 | |||
1002 | 528 | if test "$major" -gt "$req_major"; then | ||
1003 | 529 | ok=yes | ||
1004 | 530 | else | ||
1005 | 531 | if test "$major" -eq "$req_major"; then | ||
1006 | 532 | if test "$minor" -gt "$req_minor"; then | ||
1007 | 533 | ok=yes | ||
1008 | 534 | else | ||
1009 | 535 | if test "$minor" -eq "$req_minor"; then | ||
1010 | 536 | if test "$micro" -ge "$req_micro"; then | ||
1011 | 537 | ok=yes | ||
1012 | 538 | fi | ||
1013 | 539 | fi | ||
1014 | 540 | fi | ||
1015 | 541 | fi | ||
1016 | 542 | fi | ||
1017 | 543 | if test "$ok" = "yes"; then | ||
1018 | 544 | AC_MSG_RESULT(yes) | ||
1019 | 545 | if test "$cross_compiling" != "yes"; then | ||
1020 | 546 | gpgconf_usable_for_test=yes | ||
1021 | 547 | fi | ||
1022 | 548 | else | ||
1023 | 549 | AC_MSG_RESULT(no) | ||
1024 | 550 | AC_MSG_WARN([GPGCONF must be at least version $NEED_GPGCONF_VERSION]) | ||
1025 | 551 | fi | ||
1026 | 552 | fi | ||
1027 | 553 | run_gpgconf_test="$ok" | ||
1028 | 554 | AC_ARG_ENABLE(gpgconf-test, | ||
1029 | 555 | AC_HELP_STRING([--disable-gpgconf-test], [disable GPGCONF run test]), | ||
1030 | 556 | run_gpgconf_test=$enableval) | ||
1031 | 557 | AM_CONDITIONAL(RUN_GPGCONF_TESTS, test "$run_gpgconf_test" = "yes") | ||
1032 | 558 | |||
1033 | 559 | |||
1034 | 560 | # | ||
1035 | 561 | # Check for GPG | ||
1036 | 562 | # | ||
1037 | 456 | NO_OVERRIDE=no | 563 | NO_OVERRIDE=no |
1038 | 457 | AC_ARG_WITH(gpg, | 564 | AC_ARG_WITH(gpg, |
1039 | 458 | AC_HELP_STRING([--with-gpg=PATH], [use GnuPG binary at PATH]), | 565 | AC_HELP_STRING([--with-gpg=PATH], [use GnuPG binary at PATH]), |
1040 | @@ -461,7 +568,11 @@ | |||
1041 | 461 | GPG= | 568 | GPG= |
1042 | 462 | NO_OVERRIDE=yes | 569 | NO_OVERRIDE=yes |
1043 | 463 | if test "$cross_compiling" != "yes"; then | 570 | if test "$cross_compiling" != "yes"; then |
1045 | 464 | AC_PATH_PROG(GPG, gpg) | 571 | if test "$gpgconf_usable_for_test" = "yes"; then |
1046 | 572 | GPG="`$GPGCONF --list-components | grep ^gpg: | cut -d: -f 3`" | ||
1047 | 573 | else | ||
1048 | 574 | AC_PATH_PROG(GPG, gpg) | ||
1049 | 575 | fi | ||
1050 | 465 | fi | 576 | fi |
1051 | 466 | if test -z "$GPG"; then | 577 | if test -z "$GPG"; then |
1052 | 467 | GPG="$GPG_DEFAULT" | 578 | GPG="$GPG_DEFAULT" |
1053 | @@ -546,6 +657,10 @@ | |||
1054 | 546 | AM_CONDITIONAL(RUN_GPG_TESTS, test "$run_gpg_test" = "yes") | 657 | AM_CONDITIONAL(RUN_GPG_TESTS, test "$run_gpg_test" = "yes") |
1055 | 547 | AC_SUBST(GPG_PATH) | 658 | AC_SUBST(GPG_PATH) |
1056 | 548 | 659 | ||
1057 | 660 | |||
1058 | 661 | # | ||
1059 | 662 | # Check for GPGSM | ||
1060 | 663 | # | ||
1061 | 549 | NO_OVERRIDE=no | 664 | NO_OVERRIDE=no |
1062 | 550 | AC_ARG_WITH(gpgsm, | 665 | AC_ARG_WITH(gpgsm, |
1063 | 551 | AC_HELP_STRING([--with-gpgsm=PATH], [use GpgSM binary at PATH]), | 666 | AC_HELP_STRING([--with-gpgsm=PATH], [use GpgSM binary at PATH]), |
1064 | @@ -554,7 +669,11 @@ | |||
1065 | 554 | GPGSM= | 669 | GPGSM= |
1066 | 555 | NO_OVERRIDE=yes | 670 | NO_OVERRIDE=yes |
1067 | 556 | if test "$cross_compiling" != "yes"; then | 671 | if test "$cross_compiling" != "yes"; then |
1069 | 557 | AC_PATH_PROG(GPGSM, gpgsm) | 672 | if test "$gpgconf_usable_for_test" = "yes"; then |
1070 | 673 | GPGSM="`$GPGCONF --list-components | grep ^gpgsm: | cut -d: -f 3`" | ||
1071 | 674 | else | ||
1072 | 675 | AC_PATH_PROG(GPGSM, gpgsm) | ||
1073 | 676 | fi | ||
1074 | 558 | fi | 677 | fi |
1075 | 559 | if test -z "$GPGSM"; then | 678 | if test -z "$GPGSM"; then |
1076 | 560 | GPGSM="$GPGSM_DEFAULT" | 679 | GPGSM="$GPGSM_DEFAULT" |
1077 | @@ -642,102 +761,9 @@ | |||
1078 | 642 | AM_CONDITIONAL(RUN_GPGSM_TESTS, test "$run_gpgsm_test" = "yes") | 761 | AM_CONDITIONAL(RUN_GPGSM_TESTS, test "$run_gpgsm_test" = "yes") |
1079 | 643 | 762 | ||
1080 | 644 | 763 | ||
1177 | 645 | NO_OVERRIDE=no | 764 | # |
1178 | 646 | AC_ARG_WITH(gpgconf, | 765 | # Check for G13 |
1179 | 647 | AC_HELP_STRING([--with-gpgconf=PATH], | 766 | # |
1084 | 648 | [use gpgconf binary at PATH]), | ||
1085 | 649 | GPGCONF=$withval, NO_OVERRIDE=yes) | ||
1086 | 650 | if test "$NO_OVERRIDE" = "yes" || test "$GPGCONF" = "yes"; then | ||
1087 | 651 | GPGCONF= | ||
1088 | 652 | NO_OVERRIDE=yes | ||
1089 | 653 | if test "$cross_compiling" != "yes"; then | ||
1090 | 654 | AC_PATH_PROG(GPGCONF, gpgconf) | ||
1091 | 655 | fi | ||
1092 | 656 | if test -z "$GPGCONF"; then | ||
1093 | 657 | GPGCONF="$GPGCONF_DEFAULT" | ||
1094 | 658 | fi | ||
1095 | 659 | fi | ||
1096 | 660 | if test "$GPGCONF" = no; then | ||
1097 | 661 | if test "$NO_OVERRIDE" = "yes"; then | ||
1098 | 662 | if test "$cross_compiling" != "yes"; then | ||
1099 | 663 | AC_MSG_WARN([ | ||
1100 | 664 | *** | ||
1101 | 665 | *** Could not find gpgconf, install gpgconf or use --with-gpgconf=PATH to enable it | ||
1102 | 666 | ***]) | ||
1103 | 667 | else | ||
1104 | 668 | AC_MSG_ERROR([ | ||
1105 | 669 | *** | ||
1106 | 670 | *** Can not determine path to gpgconf when cross-compiling, use --with-gpgconf=PATH | ||
1107 | 671 | ***]) | ||
1108 | 672 | fi | ||
1109 | 673 | fi | ||
1110 | 674 | else | ||
1111 | 675 | AC_DEFINE_UNQUOTED(GPGCONF_PATH, "$GPGCONF", [Path to the GPGCONF binary.]) | ||
1112 | 676 | AC_DEFINE(ENABLE_GPGCONF,1,[Whether GPGCONF support is enabled]) | ||
1113 | 677 | fi | ||
1114 | 678 | AM_CONDITIONAL(HAVE_GPGCONF, test "$GPGCONF" != "no") | ||
1115 | 679 | |||
1116 | 680 | dnl Check for GPGCONF version requirement. | ||
1117 | 681 | GPGCONF_VERSION=unknown | ||
1118 | 682 | ok=maybe | ||
1119 | 683 | if test -z "$GPGCONF" -o "x$GPGCONF" = "xno"; then | ||
1120 | 684 | ok=no | ||
1121 | 685 | else | ||
1122 | 686 | if test "$cross_compiling" = "yes"; then | ||
1123 | 687 | AC_MSG_WARN([GPGCONF version can not be checked when cross compiling]) | ||
1124 | 688 | ok=no | ||
1125 | 689 | else | ||
1126 | 690 | if test ! -x "$GPGCONF"; then | ||
1127 | 691 | AC_MSG_WARN([GPGCONF not executable, version check disabled]) | ||
1128 | 692 | ok=no | ||
1129 | 693 | fi | ||
1130 | 694 | fi | ||
1131 | 695 | fi | ||
1132 | 696 | if test "$ok" = "maybe"; then | ||
1133 | 697 | AC_MSG_CHECKING(for GPGCONF >= $NEED_GPGCONF_VERSION) | ||
1134 | 698 | req_major=`echo $NEED_GPGCONF_VERSION | \ | ||
1135 | 699 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` | ||
1136 | 700 | req_minor=`echo $NEED_GPGCONF_VERSION | \ | ||
1137 | 701 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` | ||
1138 | 702 | req_micro=`echo $NEED_GPGCONF_VERSION | \ | ||
1139 | 703 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` | ||
1140 | 704 | GPGCONF_VERSION=`$GPGCONF --version | sed -n '1 s/[[^0-9]]*\(.*\)/\1/p'` | ||
1141 | 705 | major=`echo $GPGCONF_VERSION | \ | ||
1142 | 706 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` | ||
1143 | 707 | minor=`echo $GPGCONF_VERSION | \ | ||
1144 | 708 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` | ||
1145 | 709 | micro=`echo $GPGCONF_VERSION | \ | ||
1146 | 710 | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` | ||
1147 | 711 | |||
1148 | 712 | if test "$major" -gt "$req_major"; then | ||
1149 | 713 | ok=yes | ||
1150 | 714 | else | ||
1151 | 715 | if test "$major" -eq "$req_major"; then | ||
1152 | 716 | if test "$minor" -gt "$req_minor"; then | ||
1153 | 717 | ok=yes | ||
1154 | 718 | else | ||
1155 | 719 | if test "$minor" -eq "$req_minor"; then | ||
1156 | 720 | if test "$micro" -ge "$req_micro"; then | ||
1157 | 721 | ok=yes | ||
1158 | 722 | fi | ||
1159 | 723 | fi | ||
1160 | 724 | fi | ||
1161 | 725 | fi | ||
1162 | 726 | fi | ||
1163 | 727 | if test "$ok" = "yes"; then | ||
1164 | 728 | AC_MSG_RESULT(yes) | ||
1165 | 729 | else | ||
1166 | 730 | AC_MSG_RESULT(no) | ||
1167 | 731 | AC_MSG_WARN([GPGCONF must be at least version $NEED_GPGCONF_VERSION]) | ||
1168 | 732 | fi | ||
1169 | 733 | fi | ||
1170 | 734 | run_gpgconf_test="$ok" | ||
1171 | 735 | AC_ARG_ENABLE(gpgconf-test, | ||
1172 | 736 | AC_HELP_STRING([--disable-gpgconf-test], [disable GPGCONF run test]), | ||
1173 | 737 | run_gpgconf_test=$enableval) | ||
1174 | 738 | AM_CONDITIONAL(RUN_GPGCONF_TESTS, test "$run_gpgconf_test" = "yes") | ||
1175 | 739 | |||
1176 | 740 | |||
1180 | 741 | NO_OVERRIDE=no | 767 | NO_OVERRIDE=no |
1181 | 742 | AC_ARG_WITH(g13, | 768 | AC_ARG_WITH(g13, |
1182 | 743 | AC_HELP_STRING([--with-g13=PATH], | 769 | AC_HELP_STRING([--with-g13=PATH], |
1183 | @@ -747,7 +773,15 @@ | |||
1184 | 747 | G13= | 773 | G13= |
1185 | 748 | NO_OVERRIDE=yes | 774 | NO_OVERRIDE=yes |
1186 | 749 | if test "$cross_compiling" != "yes"; then | 775 | if test "$cross_compiling" != "yes"; then |
1188 | 750 | AC_PATH_PROG(G13, g13) | 776 | if test "$gpgconf_usable_for_test" = "yes"; then |
1189 | 777 | G13="`$GPGCONF --list-components | grep ^g13: | cut -d: -f 3`" | ||
1190 | 778 | if test -z "$G13"; then | ||
1191 | 779 | # Use a hack if gpgconf has no support for g13. | ||
1192 | 780 | G13="`$GPGCONF --list-dirs | grep ^bindir: | cut -d: -f 2`/g13" | ||
1193 | 781 | fi | ||
1194 | 782 | else | ||
1195 | 783 | AC_PATH_PROG(G13, g13) | ||
1196 | 784 | fi | ||
1197 | 751 | fi | 785 | fi |
1198 | 752 | if test -z "$G13"; then | 786 | if test -z "$G13"; then |
1199 | 753 | G13="$G13_DEFAULT" | 787 | G13="$G13_DEFAULT" |
1200 | @@ -834,6 +868,10 @@ | |||
1201 | 834 | AM_CONDITIONAL(RUN_G13_TESTS, test "$run_g13_test" = "yes") | 868 | AM_CONDITIONAL(RUN_G13_TESTS, test "$run_g13_test" = "yes") |
1202 | 835 | 869 | ||
1203 | 836 | 870 | ||
1204 | 871 | # | ||
1205 | 872 | # Other checks | ||
1206 | 873 | # | ||
1207 | 874 | |||
1208 | 837 | # Check for funopen | 875 | # Check for funopen |
1209 | 838 | AC_CHECK_FUNCS(funopen) | 876 | AC_CHECK_FUNCS(funopen) |
1210 | 839 | if test $ac_cv_func_funopen != yes; then | 877 | if test $ac_cv_func_funopen != yes; then |
1211 | @@ -920,11 +958,15 @@ | |||
1212 | 920 | # Add a few constants to help porting to W32 | 958 | # Add a few constants to help porting to W32 |
1213 | 921 | AH_VERBATIM([SEPCONSTANTS], | 959 | AH_VERBATIM([SEPCONSTANTS], |
1214 | 922 | [ | 960 | [ |
1216 | 923 | /* Separators as used in $PATH. */ | 961 | /* Separators as used in $PATH and file name. */ |
1217 | 924 | #ifdef HAVE_DOSISH_SYSTEM | 962 | #ifdef HAVE_DOSISH_SYSTEM |
1218 | 925 | #define PATHSEP_C ';' | 963 | #define PATHSEP_C ';' |
1219 | 964 | #define DIRSEP_C '\\' | ||
1220 | 965 | #define DIRSEP_S "\\" | ||
1221 | 926 | #else | 966 | #else |
1222 | 927 | #define PATHSEP_C ':' | 967 | #define PATHSEP_C ':' |
1223 | 968 | #define DIRSEP_C '/' | ||
1224 | 969 | #define DIRSEP_S "/" | ||
1225 | 928 | #endif | 970 | #endif |
1226 | 929 | ]) | 971 | ]) |
1227 | 930 | 972 | ||
1228 | @@ -1025,13 +1067,13 @@ | |||
1229 | 1025 | Revision: mym4_revision (mym4_revision_dec) | 1067 | Revision: mym4_revision (mym4_revision_dec) |
1230 | 1026 | Platform: $host | 1068 | Platform: $host |
1231 | 1027 | 1069 | ||
1239 | 1028 | GnuPG path: $GPG | 1070 | Gpgconf at: $GPGCONF |
1240 | 1029 | GnuPG version: $GPG_VERSION, min. $NEED_GPG_VERSION | 1071 | Gpgconf version: $GPGCONF_VERSION, min. $NEED_GPGCONF_VERSION |
1241 | 1030 | GpgSM path: $GPGSM | 1072 | GPG at: $GPG |
1242 | 1031 | GpgSM version: $GPGSM_VERSION, min. $NEED_GPGSM_VERSION | 1073 | GPG version: $GPG_VERSION, min. $NEED_GPG_VERSION |
1243 | 1032 | GpgConf path: $GPGCONF | 1074 | Gpgsm at: $GPGSM |
1244 | 1033 | GpgConf version: $GPGCONF_VERSION, min. $NEED_GPGCONF_VERSION | 1075 | Gpgsm version: $GPGSM_VERSION, min. $NEED_GPGSM_VERSION |
1245 | 1034 | G13 path: $G13 | 1076 | G13 at: $G13 |
1246 | 1035 | G13 version: $G13_VERSION, min. $NEED_G13_VERSION | 1077 | G13 version: $G13_VERSION, min. $NEED_G13_VERSION |
1247 | 1036 | 1078 | ||
1248 | 1037 | Assuan version: $libassuan_config_version, min. $NEED_LIBASSUAN_VERSION | 1079 | Assuan version: $libassuan_config_version, min. $NEED_LIBASSUAN_VERSION |
1249 | 1038 | 1080 | ||
1250 | === modified file 'debian/changelog' | |||
1251 | --- debian/changelog 2013-07-30 10:34:24 +0000 | |||
1252 | +++ debian/changelog 2013-10-23 07:14:02 +0000 | |||
1253 | @@ -1,3 +1,28 @@ | |||
1254 | 1 | gpgme1.0 (1.4.3-0.1ubuntu1) trusty; urgency=low | ||
1255 | 2 | |||
1256 | 3 | * Merge from debian unstable. Remaining changes: | ||
1257 | 4 | - debian/rules: Switch back to using /usr/bin/gpg and add back gnupg build | ||
1258 | 5 | dependency, as we don't install gnupg2 by default. This was missing in the | ||
1259 | 6 | previous upload, and unbreaks nautilus-dropbox, seahorse, bzr, and other | ||
1260 | 7 | libgpgme consumers. | ||
1261 | 8 | - debian/control: Depends on "gnupg | gnupg2" rather than gnupg2, | ||
1262 | 9 | default to the old version since the new one depends on gpg-agent, | ||
1263 | 10 | pinentry-gtk2, and a bunch of other packages we don't need/want in the | ||
1264 | 11 | default installation | ||
1265 | 12 | |||
1266 | 13 | -- Jackson Doak <noskcaj@ubuntu.com> Wed, 23 Oct 2013 18:01:04 +1100 | ||
1267 | 14 | |||
1268 | 15 | gpgme1.0 (1.4.3-0.1) unstable; urgency=low | ||
1269 | 16 | |||
1270 | 17 | * NMU | ||
1271 | 18 | * New upstream release. | ||
1272 | 19 | * debian/control (Build-Depends): Dropped dirmngr (closes: #712813). It is | ||
1273 | 20 | not necessary for the build. | ||
1274 | 21 | (Vcs-Browser, Vcs-Svn): Fixed vcs-field-not-canonical. | ||
1275 | 22 | * debian/libgpgme11.symbols: Updated symbols file. | ||
1276 | 23 | |||
1277 | 24 | -- Daniel Leidert <dleidert@debian.org> Mon, 12 Aug 2013 22:33:16 +0200 | ||
1278 | 25 | |||
1279 | 1 | gpgme1.0 (1.4.2-0.1ubuntu3) saucy; urgency=low | 26 | gpgme1.0 (1.4.2-0.1ubuntu3) saucy; urgency=low |
1280 | 2 | 27 | ||
1281 | 3 | * debian/rules: Switch back to using /usr/bin/gpg and add back gnupg build | 28 | * debian/rules: Switch back to using /usr/bin/gpg and add back gnupg build |
1282 | @@ -536,6 +561,3 @@ | |||
1283 | 536 | 561 | ||
1284 | 537 | -- Jose Carlos Garcia Sogo <jose@jaimedelamo.eu.org> Mon, 30 Apr 2001 19:34:26 +0200 | 562 | -- Jose Carlos Garcia Sogo <jose@jaimedelamo.eu.org> Mon, 30 Apr 2001 19:34:26 +0200 |
1285 | 538 | 563 | ||
1286 | 539 | Local variables: | ||
1287 | 540 | mode: debian-changelog | ||
1288 | 541 | End: | ||
1289 | 542 | 564 | ||
1290 | === modified file 'debian/control' | |||
1291 | --- debian/control 2013-07-30 10:34:24 +0000 | |||
1292 | +++ debian/control 2013-10-23 07:14:02 +0000 | |||
1293 | @@ -14,8 +14,8 @@ | |||
1294 | 14 | scdaemon | 14 | scdaemon |
1295 | 15 | Standards-Version: 3.9.4 | 15 | Standards-Version: 3.9.4 |
1296 | 16 | Homepage: http://www.gnupg.org/gpgme.html | 16 | Homepage: http://www.gnupg.org/gpgme.html |
1299 | 17 | Vcs-Browser: http://svn.debian.org/wsvn/pkg-gnupg/gpgme/trunk/ | 17 | Vcs-Browser: http://anonscm.debian.org/viewvc/pkg-gnupg/gpgme/trunk/ |
1300 | 18 | Vcs-Svn: svn://svn.debian.org/svn/pkg-gnupg/gpgme/trunk/ | 18 | Vcs-Svn: svn://anonscm.debian.org/pkg-gnupg/gpgme/trunk/ |
1301 | 19 | 19 | ||
1302 | 20 | Package: libgpgme11-dev | 20 | Package: libgpgme11-dev |
1303 | 21 | Section: libdevel | 21 | Section: libdevel |
1304 | 22 | 22 | ||
1305 | === modified file 'debian/libgpgme11.symbols' | |||
1306 | --- debian/libgpgme11.symbols 2013-05-14 20:29:20 +0000 | |||
1307 | +++ debian/libgpgme11.symbols 2013-10-23 07:14:02 +0000 | |||
1308 | @@ -14,6 +14,7 @@ | |||
1309 | 14 | gpgme_ctx_set_engine_info@GPGME_1.1 1.1.6 | 14 | gpgme_ctx_set_engine_info@GPGME_1.1 1.1.6 |
1310 | 15 | gpgme_data_get_encoding@GPGME_1.0 1.1.2 | 15 | gpgme_data_get_encoding@GPGME_1.0 1.1.2 |
1311 | 16 | gpgme_data_get_file_name@GPGME_1.1 1.1.2 | 16 | gpgme_data_get_file_name@GPGME_1.1 1.1.2 |
1312 | 17 | gpgme_data_identify@GPGME_1.1 1.4.3 | ||
1313 | 17 | gpgme_data_new@GPGME_1.0 1.1.2 | 18 | gpgme_data_new@GPGME_1.0 1.1.2 |
1314 | 18 | gpgme_data_new_from_cbs@GPGME_1.0 1.1.2 | 19 | gpgme_data_new_from_cbs@GPGME_1.0 1.1.2 |
1315 | 19 | gpgme_data_new_from_fd@GPGME_1.0 1.1.2 | 20 | gpgme_data_new_from_fd@GPGME_1.0 1.1.2 |
1316 | @@ -148,6 +149,7 @@ | |||
1317 | 148 | gpgme_sig_notation_get@GPGME_1.1 1.1.2 | 149 | gpgme_sig_notation_get@GPGME_1.1 1.1.2 |
1318 | 149 | gpgme_signers_add@GPGME_1.0 1.1.2 | 150 | gpgme_signers_add@GPGME_1.0 1.1.2 |
1319 | 150 | gpgme_signers_clear@GPGME_1.0 1.1.2 | 151 | gpgme_signers_clear@GPGME_1.0 1.1.2 |
1320 | 152 | gpgme_signers_count@GPGME_1.0 1.4.3 | ||
1321 | 151 | gpgme_signers_enum@GPGME_1.0 1.1.2 | 153 | gpgme_signers_enum@GPGME_1.0 1.1.2 |
1322 | 152 | gpgme_strerror@GPGME_1.0 1.1.2 | 154 | gpgme_strerror@GPGME_1.0 1.1.2 |
1323 | 153 | gpgme_strerror_r@GPGME_1.0 1.1.2 | 155 | gpgme_strerror_r@GPGME_1.0 1.1.2 |
1324 | @@ -174,6 +176,7 @@ | |||
1325 | 174 | gpgme_ctx_set_engine_info@GPGME_1.1 1.1.6 | 176 | gpgme_ctx_set_engine_info@GPGME_1.1 1.1.6 |
1326 | 175 | gpgme_data_get_encoding@GPGME_1.0 1.1.2 | 177 | gpgme_data_get_encoding@GPGME_1.0 1.1.2 |
1327 | 176 | gpgme_data_get_file_name@GPGME_1.1 1.1.2 | 178 | gpgme_data_get_file_name@GPGME_1.1 1.1.2 |
1328 | 179 | gpgme_data_identify@GPGME_1.1 1.4.3 | ||
1329 | 177 | gpgme_data_new@GPGME_1.0 1.1.2 | 180 | gpgme_data_new@GPGME_1.0 1.1.2 |
1330 | 178 | gpgme_data_new_from_cbs@GPGME_1.0 1.1.2 | 181 | gpgme_data_new_from_cbs@GPGME_1.0 1.1.2 |
1331 | 179 | gpgme_data_new_from_fd@GPGME_1.0 1.1.2 | 182 | gpgme_data_new_from_fd@GPGME_1.0 1.1.2 |
1332 | @@ -308,6 +311,7 @@ | |||
1333 | 308 | gpgme_sig_notation_get@GPGME_1.1 1.1.2 | 311 | gpgme_sig_notation_get@GPGME_1.1 1.1.2 |
1334 | 309 | gpgme_signers_add@GPGME_1.0 1.1.2 | 312 | gpgme_signers_add@GPGME_1.0 1.1.2 |
1335 | 310 | gpgme_signers_clear@GPGME_1.0 1.1.2 | 313 | gpgme_signers_clear@GPGME_1.0 1.1.2 |
1336 | 314 | gpgme_signers_count@GPGME_1.0 1.4.3 | ||
1337 | 311 | gpgme_signers_enum@GPGME_1.0 1.1.2 | 315 | gpgme_signers_enum@GPGME_1.0 1.1.2 |
1338 | 312 | gpgme_strerror@GPGME_1.0 1.1.2 | 316 | gpgme_strerror@GPGME_1.0 1.1.2 |
1339 | 313 | gpgme_strerror_r@GPGME_1.0 1.1.2 | 317 | gpgme_strerror_r@GPGME_1.0 1.1.2 |
1340 | 314 | 318 | ||
1341 | === modified file 'doc/gpgme.info' | |||
1342 | --- doc/gpgme.info 2013-05-29 18:33:42 +0000 | |||
1343 | +++ doc/gpgme.info 2013-10-23 07:14:02 +0000 | |||
1344 | @@ -22,8 +22,8 @@ | |||
1345 | 22 | 22 | ||
1346 | 23 | This file documents the GPGME library. | 23 | This file documents the GPGME library. |
1347 | 24 | 24 | ||
1350 | 25 | This is Edition 1.4.2, last updated 28 May 2013, of `The `GnuPG Made | 25 | This is Edition 1.4.3, last updated 9 August 2013, of `The `GnuPG |
1351 | 26 | Easy' Reference Manual', for Version 1.4.2. | 26 | Made Easy' Reference Manual', for Version 1.4.3. |
1352 | 27 | 27 | ||
1353 | 28 | Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, | 28 | Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, |
1354 | 29 | 2013 g10 Code GmbH. | 29 | 2013 g10 Code GmbH. |
1355 | @@ -41,117 +41,118 @@ | |||
1356 | 41 | 41 | ||
1357 | 42 | 42 | ||
1358 | 43 | Indirect: | 43 | Indirect: |
1361 | 44 | gpgme.info-1: 1756 | 44 | gpgme.info-1: 1758 |
1362 | 45 | gpgme.info-2: 281093 | 45 | gpgme.info-2: 283468 |
1363 | 46 | 46 | ||
1364 | 47 | Tag Table: | 47 | Tag Table: |
1365 | 48 | (Indirect) | 48 | (Indirect) |
1473 | 49 | Node: Top1756 | 49 | Node: Top1758 |
1474 | 50 | Node: Introduction8595 | 50 | Node: Introduction8599 |
1475 | 51 | Node: Getting Started9382 | 51 | Node: Getting Started9386 |
1476 | 52 | Node: Features10507 | 52 | Node: Features10511 |
1477 | 53 | Node: Overview11657 | 53 | Node: Overview11661 |
1478 | 54 | Node: Preparation12766 | 54 | Node: Preparation12770 |
1479 | 55 | Node: Header13763 | 55 | Node: Header13767 |
1480 | 56 | Node: Building the Source14462 | 56 | Node: Building the Source14466 |
1481 | 57 | Node: Largefile Support (LFS)16571 | 57 | Node: Largefile Support (LFS)16575 |
1482 | 58 | Node: Using Automake21882 | 58 | Node: Using Automake21886 |
1483 | 59 | Node: Using Libtool23518 | 59 | Node: Using Libtool23522 |
1484 | 60 | Node: Library Version Check23868 | 60 | Node: Library Version Check23872 |
1485 | 61 | Node: Signal Handling27823 | 61 | Node: Signal Handling27827 |
1486 | 62 | Node: Multi Threading29039 | 62 | Node: Multi Threading29043 |
1487 | 63 | Ref: Multi Threading-Footnote-131221 | 63 | Ref: Multi Threading-Footnote-131225 |
1488 | 64 | Node: Protocols and Engines31635 | 64 | Node: Protocols and Engines31639 |
1489 | 65 | Node: Engine Version Check33984 | 65 | Node: Engine Version Check33988 |
1490 | 66 | Node: Engine Information34561 | 66 | Node: Engine Information34565 |
1491 | 67 | Node: Engine Configuration38261 | 67 | Node: Engine Configuration38265 |
1492 | 68 | Node: OpenPGP39523 | 68 | Node: OpenPGP39527 |
1493 | 69 | Node: Cryptographic Message Syntax39859 | 69 | Node: Cryptographic Message Syntax39863 |
1494 | 70 | Node: Algorithms40153 | 70 | Node: Algorithms40157 |
1495 | 71 | Ref: Algorithms-Footnote-140632 | 71 | Ref: Algorithms-Footnote-140636 |
1496 | 72 | Node: Public Key Algorithms40760 | 72 | Node: Public Key Algorithms40764 |
1497 | 73 | Node: Hash Algorithms42691 | 73 | Node: Hash Algorithms42695 |
1498 | 74 | Node: Error Handling43789 | 74 | Node: Error Handling43793 |
1499 | 75 | Node: Error Values45651 | 75 | Node: Error Values45655 |
1500 | 76 | Node: Error Sources50729 | 76 | Node: Error Sources50733 |
1501 | 77 | Node: Error Codes53056 | 77 | Node: Error Codes53060 |
1502 | 78 | Node: Error Strings57695 | 78 | Node: Error Strings57699 |
1503 | 79 | Node: Exchanging Data59474 | 79 | Node: Exchanging Data59478 |
1504 | 80 | Node: Creating Data Buffers61303 | 80 | Node: Creating Data Buffers61307 |
1505 | 81 | Node: Memory Based Data Buffers61819 | 81 | Node: Memory Based Data Buffers61823 |
1506 | 82 | Node: File Based Data Buffers65173 | 82 | Node: File Based Data Buffers65177 |
1507 | 83 | Node: Callback Based Data Buffers67344 | 83 | Node: Callback Based Data Buffers67348 |
1508 | 84 | Node: Destroying Data Buffers72900 | 84 | Node: Destroying Data Buffers72904 |
1509 | 85 | Node: Manipulating Data Buffers74259 | 85 | Node: Manipulating Data Buffers74263 |
1510 | 86 | Node: Data Buffer I/O Operations74678 | 86 | Node: Data Buffer I/O Operations74755 |
1511 | 87 | Node: Data Buffer Meta-Data77381 | 87 | Node: Data Buffer Meta-Data77458 |
1512 | 88 | Node: Contexts80731 | 88 | Node: Data Buffer Convenience80840 |
1513 | 89 | Node: Creating Contexts81854 | 89 | Node: Contexts82776 |
1514 | 90 | Node: Destroying Contexts82665 | 90 | Node: Creating Contexts83899 |
1515 | 91 | Node: Result Management83000 | 91 | Node: Destroying Contexts84710 |
1516 | 92 | Node: Context Attributes84406 | 92 | Node: Result Management85045 |
1517 | 93 | Node: Protocol Selection85184 | 93 | Node: Context Attributes86451 |
1518 | 94 | Node: Crypto Engine86196 | 94 | Node: Protocol Selection87229 |
1519 | 95 | Node: ASCII Armor88017 | 95 | Node: Crypto Engine88241 |
1520 | 96 | Node: Text Mode88629 | 96 | Node: ASCII Armor90062 |
1521 | 97 | Node: Included Certificates89560 | 97 | Node: Text Mode90674 |
1522 | 98 | Node: Key Listing Mode90935 | 98 | Node: Included Certificates91605 |
1523 | 99 | Node: Passphrase Callback94292 | 99 | Node: Key Listing Mode92980 |
1524 | 100 | Node: Progress Meter Callback97430 | 100 | Node: Passphrase Callback96337 |
1525 | 101 | Node: Locale99354 | 101 | Node: Progress Meter Callback99475 |
1526 | 102 | Node: Key Management100893 | 102 | Node: Locale101399 |
1527 | 103 | Node: Listing Keys110818 | 103 | Node: Key Management102938 |
1528 | 104 | Node: Information About Keys118080 | 104 | Node: Listing Keys112863 |
1529 | 105 | Node: Key Signatures126078 | 105 | Node: Information About Keys120125 |
1530 | 106 | Node: Manipulating Keys130090 | 106 | Node: Key Signatures128123 |
1531 | 107 | Node: Generating Keys130932 | 107 | Node: Manipulating Keys132135 |
1532 | 108 | Node: Exporting Keys135539 | 108 | Node: Generating Keys132977 |
1533 | 109 | Node: Importing Keys141438 | 109 | Node: Exporting Keys137584 |
1534 | 110 | Ref: Importing Keys-Footnote-1148601 | 110 | Node: Importing Keys143483 |
1535 | 111 | Node: Deleting Keys148729 | 111 | Ref: Importing Keys-Footnote-1150646 |
1536 | 112 | Node: Changing Passphrases150126 | 112 | Node: Deleting Keys150774 |
1537 | 113 | Node: Advanced Key Editing151387 | 113 | Node: Changing Passphrases152171 |
1538 | 114 | Node: Trust Item Management154491 | 114 | Node: Advanced Key Editing153432 |
1539 | 115 | Node: Listing Trust Items155561 | 115 | Node: Trust Item Management156536 |
1540 | 116 | Node: Information About Trust Items157859 | 116 | Node: Listing Trust Items157606 |
1541 | 117 | Node: Manipulating Trust Items159741 | 117 | Node: Information About Trust Items159904 |
1542 | 118 | Node: Crypto Operations160702 | 118 | Node: Manipulating Trust Items161786 |
1543 | 119 | Node: Decrypt161946 | 119 | Node: Crypto Operations162747 |
1544 | 120 | Node: Verify165804 | 120 | Node: Decrypt163991 |
1545 | 121 | Node: Decrypt and Verify183660 | 121 | Node: Verify167849 |
1546 | 122 | Node: Sign185664 | 122 | Node: Decrypt and Verify185705 |
1547 | 123 | Node: Selecting Signers186228 | 123 | Node: Sign187709 |
1548 | 124 | Node: Creating a Signature187209 | 124 | Node: Selecting Signers188273 |
1549 | 125 | Node: Signature Notation Data191798 | 125 | Node: Creating a Signature189425 |
1550 | 126 | Node: Encrypt193982 | 126 | Node: Signature Notation Data194014 |
1551 | 127 | Node: Encrypting a Plaintext194338 | 127 | Node: Encrypt196198 |
1552 | 128 | Node: Run Control200183 | 128 | Node: Encrypting a Plaintext196554 |
1553 | 129 | Node: Waiting For Completion200930 | 129 | Node: Run Control202400 |
1554 | 130 | Node: Using External Event Loops202976 | 130 | Node: Waiting For Completion203147 |
1555 | 131 | Node: I/O Callback Interface204943 | 131 | Node: Using External Event Loops205193 |
1556 | 132 | Node: Registering I/O Callbacks210037 | 132 | Node: I/O Callback Interface207160 |
1557 | 133 | Node: I/O Callback Example212028 | 133 | Node: Registering I/O Callbacks212254 |
1558 | 134 | Node: I/O Callback Example GTK+218247 | 134 | Node: I/O Callback Example214245 |
1559 | 135 | Node: I/O Callback Example GDK220036 | 135 | Node: I/O Callback Example GTK+220464 |
1560 | 136 | Node: I/O Callback Example Qt221678 | 136 | Node: I/O Callback Example GDK222253 |
1561 | 137 | Node: Cancellation223966 | 137 | Node: I/O Callback Example Qt223895 |
1562 | 138 | Node: UI Server Protocol226219 | 138 | Node: Cancellation226183 |
1563 | 139 | Ref: UI Server Protocol-Footnote-1227650 | 139 | Node: UI Server Protocol228436 |
1564 | 140 | Node: UI Server Encrypt227769 | 140 | Ref: UI Server Protocol-Footnote-1229867 |
1565 | 141 | Node: UI Server Sign232950 | 141 | Node: UI Server Encrypt229986 |
1566 | 142 | Node: UI Server Decrypt235179 | 142 | Node: UI Server Sign235246 |
1567 | 143 | Node: UI Server Verify236617 | 143 | Node: UI Server Decrypt237554 |
1568 | 144 | Node: UI Server Set Input Files240119 | 144 | Node: UI Server Verify238992 |
1569 | 145 | Node: UI Server Sign/Encrypt Files240919 | 145 | Node: UI Server Set Input Files242494 |
1570 | 146 | Node: UI Server Verify/Decrypt Files242688 | 146 | Node: UI Server Sign/Encrypt Files243294 |
1571 | 147 | Node: UI Server Import/Export Keys244534 | 147 | Node: UI Server Verify/Decrypt Files245063 |
1572 | 148 | Node: UI Server Checksum Files245567 | 148 | Node: UI Server Import/Export Keys246909 |
1573 | 149 | Node: Miscellaneous UI Server Commands247733 | 149 | Node: UI Server Checksum Files247942 |
1574 | 150 | Ref: command SENDER249645 | 150 | Node: Miscellaneous UI Server Commands250108 |
1575 | 151 | Node: Debugging251321 | 151 | Ref: command SENDER252020 |
1576 | 152 | Node: Library Copying252976 | 152 | Node: Debugging253696 |
1577 | 153 | Node: Copying281093 | 153 | Node: Library Copying255351 |
1578 | 154 | Node: Function and Data Index318724 | 154 | Node: Copying283468 |
1579 | 155 | Node: Concept Index343986 | 155 | Node: Function and Data Index321099 |
1580 | 156 | Node: Concept Index346851 | ||
1581 | 156 | 157 | ||
1582 | 157 | End Tag Table | 158 | End Tag Table |
1583 | 158 | 159 | ||
1584 | === modified file 'doc/gpgme.info-1' | |||
1585 | --- doc/gpgme.info-1 2013-05-29 18:33:42 +0000 | |||
1586 | +++ doc/gpgme.info-1 2013-10-23 07:14:02 +0000 | |||
1587 | @@ -22,8 +22,8 @@ | |||
1588 | 22 | 22 | ||
1589 | 23 | This file documents the GPGME library. | 23 | This file documents the GPGME library. |
1590 | 24 | 24 | ||
1593 | 25 | This is Edition 1.4.2, last updated 28 May 2013, of `The `GnuPG Made | 25 | This is Edition 1.4.3, last updated 9 August 2013, of `The `GnuPG |
1594 | 26 | Easy' Reference Manual', for Version 1.4.2. | 26 | Made Easy' Reference Manual', for Version 1.4.3. |
1595 | 27 | 27 | ||
1596 | 28 | Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, | 28 | Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, |
1597 | 29 | 2013 g10 Code GmbH. | 29 | 2013 g10 Code GmbH. |
1598 | @@ -45,8 +45,8 @@ | |||
1599 | 45 | Main Menu | 45 | Main Menu |
1600 | 46 | ********* | 46 | ********* |
1601 | 47 | 47 | ||
1604 | 48 | This is Edition 1.4.2, last updated 28 May 2013, of `The `GnuPG Made | 48 | This is Edition 1.4.3, last updated 9 August 2013, of `The `GnuPG Made |
1605 | 49 | Easy' Reference Manual', for Version 1.4.2 of the GPGME library. | 49 | Easy' Reference Manual', for Version 1.4.3 of the GPGME library. |
1606 | 50 | 50 | ||
1607 | 51 | * Menu: | 51 | * Menu: |
1608 | 52 | 52 | ||
1609 | @@ -1783,6 +1783,7 @@ | |||
1610 | 1783 | 1783 | ||
1611 | 1784 | * Data Buffer I/O Operations:: I/O operations on data buffers. | 1784 | * Data Buffer I/O Operations:: I/O operations on data buffers. |
1612 | 1785 | * Data Buffer Meta-Data:: Meta-data manipulation of data buffers. | 1785 | * Data Buffer Meta-Data:: Meta-data manipulation of data buffers. |
1613 | 1786 | * Data Buffer Convenience:: Convenience fucntion for data buffers. | ||
1614 | 1786 | 1787 | ||
1615 | 1787 | 1788 | ||
1616 | 1788 | File: gpgme.info, Node: Data Buffer I/O Operations, Next: Data Buffer Meta-Data, Up: Manipulating Data Buffers | 1789 | File: gpgme.info, Node: Data Buffer I/O Operations, Next: Data Buffer Meta-Data, Up: Manipulating Data Buffers |
1617 | @@ -1852,7 +1853,7 @@ | |||
1618 | 1852 | ? gpgme_error_from_errno (errno) : 0; | 1853 | ? gpgme_error_from_errno (errno) : 0; |
1619 | 1853 | 1854 | ||
1620 | 1854 | 1855 | ||
1622 | 1855 | File: gpgme.info, Node: Data Buffer Meta-Data, Prev: Data Buffer I/O Operations, Up: Manipulating Data Buffers | 1856 | File: gpgme.info, Node: Data Buffer Meta-Data, Next: Data Buffer Convenience, Prev: Data Buffer I/O Operations, Up: Manipulating Data Buffers |
1623 | 1856 | 1857 | ||
1624 | 1857 | 6.3.2 Data Buffer Meta-Data | 1858 | 6.3.2 Data Buffer Meta-Data |
1625 | 1858 | --------------------------- | 1859 | --------------------------- |
1626 | @@ -1930,6 +1931,61 @@ | |||
1627 | 1930 | data object with the handle DH to ENC. | 1931 | data object with the handle DH to ENC. |
1628 | 1931 | 1932 | ||
1629 | 1932 | 1933 | ||
1630 | 1934 | File: gpgme.info, Node: Data Buffer Convenience, Prev: Data Buffer Meta-Data, Up: Manipulating Data Buffers | ||
1631 | 1935 | |||
1632 | 1936 | 6.3.3 Data Buffer Convenience Functions | ||
1633 | 1937 | --------------------------------------- | ||
1634 | 1938 | |||
1635 | 1939 | -- Data type: enum gpgme_data_type_t | ||
1636 | 1940 | The `gpgme_data_type_t' type is used to return the detected type | ||
1637 | 1941 | of the content of a data buffer. | ||
1638 | 1942 | |||
1639 | 1943 | `GPGME_DATA_TYPE_INVALID' | ||
1640 | 1944 | This is returned by `gpgme_data_identify' if it was not possible | ||
1641 | 1945 | to identify the data. Reasons for this might be a non-seekable | ||
1642 | 1946 | stream or a memory problem. The value is 0. | ||
1643 | 1947 | |||
1644 | 1948 | `GPGME_DATA_TYPE_UNKNOWN' | ||
1645 | 1949 | The type of the data is not known. | ||
1646 | 1950 | |||
1647 | 1951 | `GPGME_DATA_TYPE_PGP_SIGNED' | ||
1648 | 1952 | The data is an OpenPGP signed message. This may be a binary | ||
1649 | 1953 | signature, a detached one or a cleartext signature. | ||
1650 | 1954 | |||
1651 | 1955 | `GPGME_DATA_TYPE_PGP_OTHER' | ||
1652 | 1956 | This is a generic OpenPGP message. In most cases this will be | ||
1653 | 1957 | encrypted data. | ||
1654 | 1958 | |||
1655 | 1959 | `GPGME_DATA_TYPE_PGP_KEY' | ||
1656 | 1960 | This is an OpenPGP key (private or public). | ||
1657 | 1961 | |||
1658 | 1962 | `GPGME_DATA_TYPE_CMS_SIGNED' | ||
1659 | 1963 | This is a CMS signed message. | ||
1660 | 1964 | |||
1661 | 1965 | `GPGME_DATA_TYPE_CMS_ENCRYPTED' | ||
1662 | 1966 | This is a CMS encrypted (enveloped data) message. | ||
1663 | 1967 | |||
1664 | 1968 | `GPGME_DATA_TYPE_CMS_OTHER' | ||
1665 | 1969 | This is used for other CMS message types. | ||
1666 | 1970 | |||
1667 | 1971 | `GPGME_DATA_TYPE_X509_CERT' | ||
1668 | 1972 | The data is a X.509 certificate | ||
1669 | 1973 | |||
1670 | 1974 | `GPGME_DATA_TYPE_PKCS12' | ||
1671 | 1975 | The data is a PKCS#12 message. This is commonly used to exchange | ||
1672 | 1976 | private keys for X.509. | ||
1673 | 1977 | |||
1674 | 1978 | -- Function: gpgme_data_type_t gpgme_data_identify (gpgme_data_t DH) | ||
1675 | 1979 | The function `gpgme_data_identify' returns the type of the data | ||
1676 | 1980 | with the handle DH. If it is not possible to perform the | ||
1677 | 1981 | identification, the function returns zero | ||
1678 | 1982 | (`GPGME_DATA_TYPE_INVALID'). Note that depending on how the data | ||
1679 | 1983 | object has been created the identification may not be possible or | ||
1680 | 1984 | the data object may change its internal state (file pointer | ||
1681 | 1985 | moved). For file or memory based data object, the state should | ||
1682 | 1986 | not change. | ||
1683 | 1987 | |||
1684 | 1988 | |||
1685 | 1933 | File: gpgme.info, Node: Contexts, Next: UI Server Protocol, Prev: Exchanging Data, Up: Top | 1989 | File: gpgme.info, Node: Contexts, Next: UI Server Protocol, Prev: Exchanging Data, Up: Top |
1686 | 1934 | 1990 | ||
1687 | 1935 | 7 Contexts | 1991 | 7 Contexts |
1688 | @@ -4570,6 +4626,10 @@ | |||
1689 | 4570 | 4626 | ||
1690 | 4571 | Calling this function acquires an additional reference for the key. | 4627 | Calling this function acquires an additional reference for the key. |
1691 | 4572 | 4628 | ||
1692 | 4629 | -- Function: unsigned int gpgme_signers_count (const gpgme_ctx_t CTX) | ||
1693 | 4630 | The function `gpgme_signers_count' returns the number of signer | ||
1694 | 4631 | keys in the context CTX. | ||
1695 | 4632 | |||
1696 | 4573 | -- Function: gpgme_key_t gpgme_signers_enum (const gpgme_ctx_t CTX, | 4633 | -- Function: gpgme_key_t gpgme_signers_enum (const gpgme_ctx_t CTX, |
1697 | 4574 | int SEQ) | 4634 | int SEQ) |
1698 | 4575 | The function `gpgme_signers_enum' returns the SEQth key in the | 4635 | The function `gpgme_signers_enum' returns the SEQth key in the |
1699 | @@ -4767,9 +4827,9 @@ | |||
1700 | 4767 | encoding specified for CIPHER) and the text mode attributes set | 4827 | encoding specified for CIPHER) and the text mode attributes set |
1701 | 4768 | for the context CTX. | 4828 | for the context CTX. |
1702 | 4769 | 4829 | ||
1706 | 4770 | KEY must be a `NULL'-terminated array of keys. The user must keep | 4830 | RECP must be a `NULL'-terminated array of keys. The user must |
1707 | 4771 | references for all keys during the whole duration of the call (but | 4831 | keep references for all keys during the whole duration of the call |
1708 | 4772 | see `gpgme_op_encrypt_start' for the requirements with the | 4832 | (but see `gpgme_op_encrypt_start' for the requirements with the |
1709 | 4773 | asynchronous variant). | 4833 | asynchronous variant). |
1710 | 4774 | 4834 | ||
1711 | 4775 | The value in FLAGS is a bitwise-or combination of one or multiple | 4835 | The value in FLAGS is a bitwise-or combination of one or multiple |
1712 | @@ -5644,10 +5704,11 @@ | |||
1713 | 5644 | implement the `GETINFO pid' command. Sending this command a second | 5704 | implement the `GETINFO pid' command. Sending this command a second |
1714 | 5645 | time replaces the file descriptor set by the last one. | 5705 | time replaces the file descriptor set by the last one. |
1715 | 5646 | 5706 | ||
1717 | 5647 | -- Command: OUTPUT FD=N | 5707 | -- Command: OUTPUT FD=N [-binary] |
1718 | 5648 | Set the file descriptor to be used for the output (i.e. the | 5708 | Set the file descriptor to be used for the output (i.e. the |
1721 | 5649 | encrypted message) to N. For OpenPGP, the output needs to be | 5709 | encrypted message) to N. If the option `--binary' is given the |
1722 | 5650 | ASCII armored; for CMS, the output needs to be Base-64 encoded. | 5710 | output shall be in binary format; if not given, the output for |
1723 | 5711 | OpenPGP needs to be ASCII armored and for CMS Base-64 encoded. | ||
1724 | 5651 | For details on the file descriptor, see the `INPUT' command. | 5712 | For details on the file descriptor, see the `INPUT' command. |
1725 | 5652 | 5713 | ||
1726 | 5653 | The setting of the recipients, the data source and destination may | 5714 | The setting of the recipients, the data source and destination may |
1727 | @@ -5748,11 +5809,12 @@ | |||
1728 | 5748 | file descriptor, see the description of `INPUT' in the `ENCRYPT' | 5809 | file descriptor, see the description of `INPUT' in the `ENCRYPT' |
1729 | 5749 | section. | 5810 | section. |
1730 | 5750 | 5811 | ||
1732 | 5751 | -- Command: OUTPUT FD=N | 5812 | -- Command: OUTPUT FD=N [-binary] |
1733 | 5752 | Set the file descriptor to be used for the output. The output is | 5813 | Set the file descriptor to be used for the output. The output is |
1734 | 5753 | either the complete signed message or in case of a detached | 5814 | either the complete signed message or in case of a detached |
1737 | 5754 | signature just that detached signature. For OpenPGP, the output | 5815 | signature just that detached signature. If the option `--binary' |
1738 | 5755 | needs to be ASCII armored; for CMS, the output needs to be Base-64 | 5816 | is given the output shall be in binary format; if not given, the |
1739 | 5817 | output for OpenPGP needs to be ASCII armored and for CMS Base-64 | ||
1740 | 5756 | encoded. For details on the file descriptor, see the `INPUT' | 5818 | encoded. For details on the file descriptor, see the `INPUT' |
1741 | 5757 | command. | 5819 | command. |
1742 | 5758 | 5820 | ||
1743 | 5759 | 5821 | ||
1744 | === modified file 'doc/gpgme.info-2' | |||
1745 | --- doc/gpgme.info-2 2013-05-29 18:33:42 +0000 | |||
1746 | +++ doc/gpgme.info-2 2013-10-23 07:14:02 +0000 | |||
1747 | @@ -22,8 +22,8 @@ | |||
1748 | 22 | 22 | ||
1749 | 23 | This file documents the GPGME library. | 23 | This file documents the GPGME library. |
1750 | 24 | 24 | ||
1753 | 25 | This is Edition 1.4.2, last updated 28 May 2013, of `The `GnuPG Made | 25 | This is Edition 1.4.3, last updated 9 August 2013, of `The `GnuPG |
1754 | 26 | Easy' Reference Manual', for Version 1.4.2. | 26 | Made Easy' Reference Manual', for Version 1.4.3. |
1755 | 27 | 27 | ||
1756 | 28 | Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, | 28 | Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012, |
1757 | 29 | 2013 g10 Code GmbH. | 29 | 2013 g10 Code GmbH. |
1758 | @@ -778,13 +778,15 @@ | |||
1759 | 778 | (line 10) | 778 | (line 10) |
1760 | 779 | * DECRYPT_VERIFY_FILES: UI Server Verify/Decrypt Files. | 779 | * DECRYPT_VERIFY_FILES: UI Server Verify/Decrypt Files. |
1761 | 780 | (line 12) | 780 | (line 12) |
1763 | 781 | * ENCRYPT: UI Server Encrypt. (line 46) | 781 | * ENCRYPT: UI Server Encrypt. (line 47) |
1764 | 782 | * ENCRYPT_FILES: UI Server Sign/Encrypt Files. | 782 | * ENCRYPT_FILES: UI Server Sign/Encrypt Files. |
1765 | 783 | (line 10) | 783 | (line 10) |
1766 | 784 | * ENCRYPT_SIGN_FILES: UI Server Sign/Encrypt Files. | 784 | * ENCRYPT_SIGN_FILES: UI Server Sign/Encrypt Files. |
1767 | 785 | (line 12) | 785 | (line 12) |
1768 | 786 | * enum gpgme_data_encoding_t: Data Buffer Meta-Data. | 786 | * enum gpgme_data_encoding_t: Data Buffer Meta-Data. |
1769 | 787 | (line 28) | 787 | (line 28) |
1770 | 788 | * enum gpgme_data_type_t: Data Buffer Convenience. | ||
1771 | 789 | (line 7) | ||
1772 | 788 | * enum gpgme_event_io_t: I/O Callback Interface. | 790 | * enum gpgme_event_io_t: I/O Callback Interface. |
1773 | 789 | (line 57) | 791 | (line 57) |
1774 | 790 | * enum gpgme_hash_algo_t: Hash Algorithms. (line 10) | 792 | * enum gpgme_hash_algo_t: Hash Algorithms. (line 10) |
1775 | @@ -815,6 +817,8 @@ | |||
1776 | 815 | (line 69) | 817 | (line 69) |
1777 | 816 | * gpgme_data_get_file_name: Data Buffer Meta-Data. | 818 | * gpgme_data_get_file_name: Data Buffer Meta-Data. |
1778 | 817 | (line 7) | 819 | (line 7) |
1779 | 820 | * gpgme_data_identify: Data Buffer Convenience. | ||
1780 | 821 | (line 46) | ||
1781 | 818 | * gpgme_data_new: Memory Based Data Buffers. | 822 | * gpgme_data_new: Memory Based Data Buffers. |
1782 | 819 | (line 13) | 823 | (line 13) |
1783 | 820 | * gpgme_data_new_from_cbs: Callback Based Data Buffers. | 824 | * gpgme_data_new_from_cbs: Callback Based Data Buffers. |
1784 | @@ -852,6 +856,8 @@ | |||
1785 | 852 | * gpgme_data_set_file_name: Data Buffer Meta-Data. | 856 | * gpgme_data_set_file_name: Data Buffer Meta-Data. |
1786 | 853 | (line 18) | 857 | (line 18) |
1787 | 854 | * gpgme_data_t: Exchanging Data. (line 14) | 858 | * gpgme_data_t: Exchanging Data. (line 14) |
1788 | 859 | * gpgme_data_type_t: Data Buffer Convenience. | ||
1789 | 860 | (line 7) | ||
1790 | 855 | * gpgme_data_write: Data Buffer I/O Operations. | 861 | * gpgme_data_write: Data Buffer I/O Operations. |
1791 | 856 | (line 18) | 862 | (line 18) |
1792 | 857 | * gpgme_data_write_cb_t: Callback Based Data Buffers. | 863 | * gpgme_data_write_cb_t: Callback Based Data Buffers. |
1793 | @@ -1039,7 +1045,8 @@ | |||
1794 | 1039 | * gpgme_signature_t: Verify. (line 92) | 1045 | * gpgme_signature_t: Verify. (line 92) |
1795 | 1040 | * gpgme_signers_add: Selecting Signers. (line 15) | 1046 | * gpgme_signers_add: Selecting Signers. (line 15) |
1796 | 1041 | * gpgme_signers_clear: Selecting Signers. (line 7) | 1047 | * gpgme_signers_clear: Selecting Signers. (line 7) |
1798 | 1042 | * gpgme_signers_enum: Selecting Signers. (line 22) | 1048 | * gpgme_signers_count: Selecting Signers. (line 21) |
1799 | 1049 | * gpgme_signers_enum: Selecting Signers. (line 26) | ||
1800 | 1043 | * gpgme_ssize_t: Exchanging Data. (line 31) | 1050 | * gpgme_ssize_t: Exchanging Data. (line 31) |
1801 | 1044 | * gpgme_strerror: Error Strings. (line 7) | 1051 | * gpgme_strerror: Error Strings. (line 7) |
1802 | 1045 | * gpgme_strerror_r: Error Strings. (line 17) | 1052 | * gpgme_strerror_r: Error Strings. (line 17) |
1803 | @@ -1070,21 +1077,21 @@ | |||
1804 | 1070 | * INPUT <3>: UI Server Sign. (line 13) | 1077 | * INPUT <3>: UI Server Sign. (line 13) |
1805 | 1071 | * INPUT: UI Server Encrypt. (line 23) | 1078 | * INPUT: UI Server Encrypt. (line 23) |
1806 | 1072 | * MESSAGE: UI Server Verify. (line 11) | 1079 | * MESSAGE: UI Server Verify. (line 11) |
1808 | 1073 | * MICALG: UI Server Sign. (line 43) | 1080 | * MICALG: UI Server Sign. (line 44) |
1809 | 1074 | * off_t (*gpgme_data_seek_cb_t) (void *HANDLE, off_t OFFSET, int WHENCE): Callback Based Data Buffers. | 1081 | * off_t (*gpgme_data_seek_cb_t) (void *HANDLE, off_t OFFSET, int WHENCE): Callback Based Data Buffers. |
1810 | 1075 | (line 44) | 1082 | (line 44) |
1811 | 1076 | * OUTPUT <1>: UI Server Verify. (line 24) | 1083 | * OUTPUT <1>: UI Server Verify. (line 24) |
1812 | 1077 | * OUTPUT <2>: UI Server Decrypt. (line 20) | 1084 | * OUTPUT <2>: UI Server Decrypt. (line 20) |
1813 | 1078 | * OUTPUT <3>: UI Server Sign. (line 19) | 1085 | * OUTPUT <3>: UI Server Sign. (line 19) |
1814 | 1079 | * OUTPUT: UI Server Encrypt. (line 36) | 1086 | * OUTPUT: UI Server Encrypt. (line 36) |
1817 | 1080 | * PREP_ENCRYPT: UI Server Encrypt. (line 72) | 1087 | * PREP_ENCRYPT: UI Server Encrypt. (line 73) |
1818 | 1081 | * PROTOCOL: UI Server Encrypt. (line 97) | 1088 | * PROTOCOL: UI Server Encrypt. (line 98) |
1819 | 1082 | * RECIPIENT: UI Server Encrypt. (line 10) | 1089 | * RECIPIENT: UI Server Encrypt. (line 10) |
1820 | 1083 | * SENDER: Miscellaneous UI Server Commands. | 1090 | * SENDER: Miscellaneous UI Server Commands. |
1821 | 1084 | (line 51) | 1091 | (line 51) |
1822 | 1085 | * SESSION: Miscellaneous UI Server Commands. | 1092 | * SESSION: Miscellaneous UI Server Commands. |
1823 | 1086 | (line 70) | 1093 | (line 70) |
1825 | 1087 | * SIGN: UI Server Sign. (line 33) | 1094 | * SIGN: UI Server Sign. (line 34) |
1826 | 1088 | * SIGN_FILES: UI Server Sign/Encrypt Files. | 1095 | * SIGN_FILES: UI Server Sign/Encrypt Files. |
1827 | 1089 | (line 11) | 1096 | (line 11) |
1828 | 1090 | * SIGSTATUS: UI Server Verify. (line 59) | 1097 | * SIGSTATUS: UI Server Verify. (line 59) |
1829 | @@ -1174,6 +1181,8 @@ | |||
1830 | 1174 | * cryptographic operation, verification: Verify. (line 6) | 1181 | * cryptographic operation, verification: Verify. (line 6) |
1831 | 1175 | * cryptographic operation, wait for: Waiting For Completion. | 1182 | * cryptographic operation, wait for: Waiting For Completion. |
1832 | 1176 | (line 6) | 1183 | (line 6) |
1833 | 1184 | * data buffer, convenience: Data Buffer Convenience. | ||
1834 | 1185 | (line 6) | ||
1835 | 1177 | * data buffer, creation: Creating Data Buffers. (line 6) | 1186 | * data buffer, creation: Creating Data Buffers. (line 6) |
1836 | 1178 | * data buffer, destruction: Destroying Data Buffers. | 1187 | * data buffer, destruction: Destroying Data Buffers. |
1837 | 1179 | (line 6) | 1188 | (line 6) |
1838 | @@ -1224,6 +1233,8 @@ | |||
1839 | 1224 | (line 6) | 1233 | (line 6) |
1840 | 1225 | * hash algorithms: Hash Algorithms. (line 6) | 1234 | * hash algorithms: Hash Algorithms. (line 6) |
1841 | 1226 | * header file: Header. (line 6) | 1235 | * header file: Header. (line 6) |
1842 | 1236 | * identify: Data Buffer Convenience. | ||
1843 | 1237 | (line 6) | ||
1844 | 1227 | * include file: Header. (line 6) | 1238 | * include file: Header. (line 6) |
1845 | 1228 | * key listing: Listing Keys. (line 6) | 1239 | * key listing: Listing Keys. (line 6) |
1846 | 1229 | * key listing mode: Key Listing Mode. (line 6) | 1240 | * key listing mode: Key Listing Mode. (line 6) |
1847 | @@ -1303,6 +1314,8 @@ | |||
1848 | 1303 | (line 6) | 1314 | (line 6) |
1849 | 1304 | * trust item, manipulation: Manipulating Trust Items. | 1315 | * trust item, manipulation: Manipulating Trust Items. |
1850 | 1305 | (line 6) | 1316 | (line 6) |
1851 | 1317 | * type of data: Data Buffer Convenience. | ||
1852 | 1318 | (line 6) | ||
1853 | 1306 | * UI server: UI Server Protocol. (line 6) | 1319 | * UI server: UI Server Protocol. (line 6) |
1854 | 1307 | * user interface server: UI Server Protocol. (line 6) | 1320 | * user interface server: UI Server Protocol. (line 6) |
1855 | 1308 | * verification: Verify. (line 6) | 1321 | * verification: Verify. (line 6) |
1856 | 1309 | 1322 | ||
1857 | === modified file 'doc/gpgme.texi' | |||
1858 | --- doc/gpgme.texi 2013-05-29 18:33:42 +0000 | |||
1859 | +++ doc/gpgme.texi 2013-10-23 07:14:02 +0000 | |||
1860 | @@ -1885,6 +1885,7 @@ | |||
1861 | 1885 | @menu | 1885 | @menu |
1862 | 1886 | * Data Buffer I/O Operations:: I/O operations on data buffers. | 1886 | * Data Buffer I/O Operations:: I/O operations on data buffers. |
1863 | 1887 | * Data Buffer Meta-Data:: Meta-data manipulation of data buffers. | 1887 | * Data Buffer Meta-Data:: Meta-data manipulation of data buffers. |
1864 | 1888 | * Data Buffer Convenience:: Convenience fucntion for data buffers. | ||
1865 | 1888 | @end menu | 1889 | @end menu |
1866 | 1889 | 1890 | ||
1867 | 1890 | 1891 | ||
1868 | @@ -2047,6 +2048,56 @@ | |||
1869 | 2047 | the data object with the handle @var{dh} to @var{enc}. | 2048 | the data object with the handle @var{dh} to @var{enc}. |
1870 | 2048 | @end deftypefun | 2049 | @end deftypefun |
1871 | 2049 | 2050 | ||
1872 | 2051 | @node Data Buffer Convenience | ||
1873 | 2052 | @subsection Data Buffer Convenience Functions | ||
1874 | 2053 | @cindex data buffer, convenience | ||
1875 | 2054 | @cindex type of data | ||
1876 | 2055 | @cindex identify | ||
1877 | 2056 | |||
1878 | 2057 | @deftp {Data type} {enum gpgme_data_type_t} | ||
1879 | 2058 | @tindex gpgme_data_type_t | ||
1880 | 2059 | The @code{gpgme_data_type_t} type is used to return the detected type | ||
1881 | 2060 | of the content of a data buffer. | ||
1882 | 2061 | @end deftp | ||
1883 | 2062 | |||
1884 | 2063 | @table @code | ||
1885 | 2064 | @item GPGME_DATA_TYPE_INVALID | ||
1886 | 2065 | This is returned by @code{gpgme_data_identify} if it was not possible | ||
1887 | 2066 | to identify the data. Reasons for this might be a non-seekable stream | ||
1888 | 2067 | or a memory problem. The value is 0. | ||
1889 | 2068 | @item GPGME_DATA_TYPE_UNKNOWN | ||
1890 | 2069 | The type of the data is not known. | ||
1891 | 2070 | @item GPGME_DATA_TYPE_PGP_SIGNED | ||
1892 | 2071 | The data is an OpenPGP signed message. This may be a binary | ||
1893 | 2072 | signature, a detached one or a cleartext signature. | ||
1894 | 2073 | @item GPGME_DATA_TYPE_PGP_OTHER | ||
1895 | 2074 | This is a generic OpenPGP message. In most cases this will be | ||
1896 | 2075 | encrypted data. | ||
1897 | 2076 | @item GPGME_DATA_TYPE_PGP_KEY | ||
1898 | 2077 | This is an OpenPGP key (private or public). | ||
1899 | 2078 | @item GPGME_DATA_TYPE_CMS_SIGNED | ||
1900 | 2079 | This is a CMS signed message. | ||
1901 | 2080 | @item GPGME_DATA_TYPE_CMS_ENCRYPTED | ||
1902 | 2081 | This is a CMS encrypted (enveloped data) message. | ||
1903 | 2082 | @item GPGME_DATA_TYPE_CMS_OTHER | ||
1904 | 2083 | This is used for other CMS message types. | ||
1905 | 2084 | @item GPGME_DATA_TYPE_X509_CERT | ||
1906 | 2085 | The data is a X.509 certificate | ||
1907 | 2086 | @item GPGME_DATA_TYPE_PKCS12 | ||
1908 | 2087 | The data is a PKCS#12 message. This is commonly used to exchange | ||
1909 | 2088 | private keys for X.509. | ||
1910 | 2089 | @end table | ||
1911 | 2090 | |||
1912 | 2091 | @deftypefun gpgme_data_type_t gpgme_data_identify (@w{gpgme_data_t @var{dh}}) | ||
1913 | 2092 | The function @code{gpgme_data_identify} returns the type of the data | ||
1914 | 2093 | with the handle @var{dh}. If it is not possible to perform the | ||
1915 | 2094 | identification, the function returns zero | ||
1916 | 2095 | (@code{GPGME_DATA_TYPE_INVALID}). Note that depending on how the data | ||
1917 | 2096 | object has been created the identification may not be possible or the | ||
1918 | 2097 | data object may change its internal state (file pointer moved). For | ||
1919 | 2098 | file or memory based data object, the state should not change. | ||
1920 | 2099 | @end deftypefun | ||
1921 | 2100 | |||
1922 | 2050 | 2101 | ||
1923 | 2051 | @c | 2102 | @c |
1924 | 2052 | @c Chapter Contexts | 2103 | @c Chapter Contexts |
1925 | @@ -4785,6 +4836,11 @@ | |||
1926 | 4785 | Calling this function acquires an additional reference for the key. | 4836 | Calling this function acquires an additional reference for the key. |
1927 | 4786 | @end deftypefun | 4837 | @end deftypefun |
1928 | 4787 | 4838 | ||
1929 | 4839 | @deftypefun @w{unsigned int} gpgme_signers_count (@w{const gpgme_ctx_t @var{ctx}}) | ||
1930 | 4840 | The function @code{gpgme_signers_count} returns the number of signer keys in | ||
1931 | 4841 | the context @var{ctx}. | ||
1932 | 4842 | @end deftypefun | ||
1933 | 4843 | |||
1934 | 4788 | @deftypefun gpgme_key_t gpgme_signers_enum (@w{const gpgme_ctx_t @var{ctx}}, @w{int @var{seq}}) | 4844 | @deftypefun gpgme_key_t gpgme_signers_enum (@w{const gpgme_ctx_t @var{ctx}}, @w{int @var{seq}}) |
1935 | 4789 | The function @code{gpgme_signers_enum} returns the @var{seq}th key in | 4845 | The function @code{gpgme_signers_enum} returns the @var{seq}th key in |
1936 | 4790 | the list of signers in the context @var{ctx}. An additional reference | 4846 | the list of signers in the context @var{ctx}. An additional reference |
1937 | @@ -4988,7 +5044,7 @@ | |||
1938 | 4988 | that is not set, by the encoding specified for @var{cipher}) and the | 5044 | that is not set, by the encoding specified for @var{cipher}) and the |
1939 | 4989 | text mode attributes set for the context @var{ctx}. | 5045 | text mode attributes set for the context @var{ctx}. |
1940 | 4990 | 5046 | ||
1942 | 4991 | @var{key} must be a @code{NULL}-terminated array of keys. The user | 5047 | @var{recp} must be a @code{NULL}-terminated array of keys. The user |
1943 | 4992 | must keep references for all keys during the whole duration of the | 5048 | must keep references for all keys during the whole duration of the |
1944 | 4993 | call (but see @code{gpgme_op_encrypt_start} for the requirements with | 5049 | call (but see @code{gpgme_op_encrypt_start} for the requirements with |
1945 | 4994 | the asynchronous variant). | 5050 | the asynchronous variant). |
1946 | 4995 | 5051 | ||
1947 | === modified file 'doc/stamp-vti' | |||
1948 | --- doc/stamp-vti 2013-05-29 18:33:42 +0000 | |||
1949 | +++ doc/stamp-vti 2013-10-23 07:14:02 +0000 | |||
1950 | @@ -1,4 +1,4 @@ | |||
1955 | 1 | @set UPDATED 28 May 2013 | 1 | @set UPDATED 9 August 2013 |
1956 | 2 | @set UPDATED-MONTH May 2013 | 2 | @set UPDATED-MONTH August 2013 |
1957 | 3 | @set EDITION 1.4.2 | 3 | @set EDITION 1.4.3 |
1958 | 4 | @set VERSION 1.4.2 | 4 | @set VERSION 1.4.3 |
1959 | 5 | 5 | ||
1960 | === modified file 'doc/uiserver.texi' | |||
1961 | --- doc/uiserver.texi 2013-05-14 20:29:20 +0000 | |||
1962 | +++ doc/uiserver.texi 2013-10-23 07:14:02 +0000 | |||
1963 | @@ -61,7 +61,7 @@ | |||
1964 | 61 | 61 | ||
1965 | 62 | @deffn Command INPUT FD=@var{n} | 62 | @deffn Command INPUT FD=@var{n} |
1966 | 63 | Set the file descriptor for the message to be encrypted to @var{n}. The | 63 | Set the file descriptor for the message to be encrypted to @var{n}. The |
1968 | 64 | message send to the server is binary encoded. | 64 | message send to the server is binary encoded. |
1969 | 65 | 65 | ||
1970 | 66 | GpgOL is a Windows only program, thus @var{n} is not a libc file | 66 | GpgOL is a Windows only program, thus @var{n} is not a libc file |
1971 | 67 | descriptor but a regular system handle. Given that the Assuan | 67 | descriptor but a regular system handle. Given that the Assuan |
1972 | @@ -77,14 +77,15 @@ | |||
1973 | 77 | @c %Libassuan manual}, on how to do descriptor passing. | 77 | @c %Libassuan manual}, on how to do descriptor passing. |
1974 | 78 | @end deffn | 78 | @end deffn |
1975 | 79 | 79 | ||
1977 | 80 | @deffn Command OUTPUT FD=@var{n} | 80 | @deffn Command OUTPUT FD=@var{n} [--binary] |
1978 | 81 | Set the file descriptor to be used for the output (i.e. the encrypted | 81 | Set the file descriptor to be used for the output (i.e. the encrypted |
1982 | 82 | message) to @var{n}. For OpenPGP, the output needs to be ASCII armored; | 82 | message) to @var{n}. If the option @code{--binary} is given the |
1983 | 83 | for CMS, the output needs to be Base-64 encoded. For details on the | 83 | output shall be in binary format; if not given, the output for OpenPGP |
1984 | 84 | file descriptor, see the @code{INPUT} command. | 84 | needs to be ASCII armored and for CMS Base-64 encoded. For details on |
1985 | 85 | the file descriptor, see the @code{INPUT} command. | ||
1986 | 85 | @end deffn | 86 | @end deffn |
1987 | 86 | 87 | ||
1989 | 87 | @noindent | 88 | @noindent |
1990 | 88 | The setting of the recipients, the data source and destination may | 89 | The setting of the recipients, the data source and destination may |
1991 | 89 | happen in any order, even intermixed. If this has been done the actual | 90 | happen in any order, even intermixed. If this has been done the actual |
1992 | 90 | encryption operation is called using: | 91 | encryption operation is called using: |
1993 | @@ -193,12 +194,13 @@ | |||
1994 | 193 | section. | 194 | section. |
1995 | 194 | @end deffn | 195 | @end deffn |
1996 | 195 | 196 | ||
2003 | 196 | @deffn Command OUTPUT FD=@var{n} | 197 | @deffn Command OUTPUT FD=@var{n} [--binary] |
2004 | 197 | Set the file descriptor to be used for the output. The output is either | 198 | Set the file descriptor to be used for the output. The output is |
2005 | 198 | the complete signed message or in case of a detached signature just that | 199 | either the complete signed message or in case of a detached signature |
2006 | 199 | detached signature. For OpenPGP, the output needs to be ASCII armored; | 200 | just that detached signature. If the option @code{--binary} is given |
2007 | 200 | for CMS, the output needs to be Base-64 encoded. For details on the | 201 | the output shall be in binary format; if not given, the output for |
2008 | 201 | file descriptor, see the @code{INPUT} command. | 202 | OpenPGP needs to be ASCII armored and for CMS Base-64 encoded. For |
2009 | 203 | details on the file descriptor, see the @code{INPUT} command. | ||
2010 | 202 | @end deffn | 204 | @end deffn |
2011 | 203 | 205 | ||
2012 | 204 | @noindent | 206 | @noindent |
2013 | @@ -209,7 +211,7 @@ | |||
2014 | 209 | @noindent | 211 | @noindent |
2015 | 210 | The signing operation is then initiated by: | 212 | The signing operation is then initiated by: |
2016 | 211 | 213 | ||
2018 | 212 | @deffn Command SIGN -@w{}-protocol=@var{name} [-@w{}-detached] | 214 | @deffn Command SIGN -@w{}-protocol=@var{name} [-@w{}-detached] |
2019 | 213 | Sign the data set with the @code{INPUT} command and write it to the sink | 215 | Sign the data set with the @code{INPUT} command and write it to the sink |
2020 | 214 | set by OUTPUT. @var{name} is the signing protocol used for the | 216 | set by OUTPUT. @var{name} is the signing protocol used for the |
2021 | 215 | message. For a description of the allowed protocols see the | 217 | message. For a description of the allowed protocols see the |
2022 | @@ -272,7 +274,7 @@ | |||
2023 | 272 | 274 | ||
2024 | 273 | The server needs to support the verification of opaque signatures as | 275 | The server needs to support the verification of opaque signatures as |
2025 | 274 | well as detached signatures. The kind of input sources controls what | 276 | well as detached signatures. The kind of input sources controls what |
2027 | 275 | kind message is to be verified. | 277 | kind message is to be verified. |
2028 | 276 | 278 | ||
2029 | 277 | @deffn Command MESSAGE FD=@var{n} | 279 | @deffn Command MESSAGE FD=@var{n} |
2030 | 278 | This command is used with detached signatures to set the file descriptor | 280 | This command is used with detached signatures to set the file descriptor |
2031 | @@ -309,7 +311,7 @@ | |||
2032 | 309 | @table @asis | 311 | @table @asis |
2033 | 310 | @item MESSAGE and INPUT | 312 | @item MESSAGE and INPUT |
2034 | 311 | This indicates a detached signature. Output data is not applicable. | 313 | This indicates a detached signature. Output data is not applicable. |
2036 | 312 | @item INPUT | 314 | @item INPUT |
2037 | 313 | This indicates an opaque signature. As no output command has been given, | 315 | This indicates an opaque signature. As no output command has been given, |
2038 | 314 | the server is only required to check the signature. | 316 | the server is only required to check the signature. |
2039 | 315 | @item INPUT and OUTPUT | 317 | @item INPUT and OUTPUT |
2040 | @@ -338,7 +340,7 @@ | |||
2041 | 338 | The signature is valid but additional information was shown regarding the | 340 | The signature is valid but additional information was shown regarding the |
2042 | 339 | validity of the key. | 341 | validity of the key. |
2043 | 340 | @item red | 342 | @item red |
2045 | 341 | The signature is not valid. | 343 | The signature is not valid. |
2046 | 342 | @end table | 344 | @end table |
2047 | 343 | 345 | ||
2048 | 344 | @var{displaystring} is a percent-and-plus-encoded string with a short | 346 | @var{displaystring} is a percent-and-plus-encoded string with a short |
2049 | @@ -539,7 +541,7 @@ | |||
2050 | 539 | To allow the server to pop up the windows in the correct relation to the | 541 | To allow the server to pop up the windows in the correct relation to the |
2051 | 540 | client, the client is advised to tell the server by sending the option: | 542 | client, the client is advised to tell the server by sending the option: |
2052 | 541 | 543 | ||
2054 | 542 | @deffn {Command option} window-id @var{number} | 544 | @deffn {Command option} window-id @var{number} |
2055 | 543 | The @var{number} represents the native window ID of the clients current | 545 | The @var{number} represents the native window ID of the clients current |
2056 | 544 | window. On Windows systems this is a windows handle (@code{HWND}) and | 546 | window. On Windows systems this is a windows handle (@code{HWND}) and |
2057 | 545 | on X11 systems it is the @code{X Window ID}. The number needs to be | 547 | on X11 systems it is the @code{X Window ID}. The number needs to be |
2058 | @@ -592,7 +594,7 @@ | |||
2059 | 592 | which signing protocol should be preferred. | 594 | which signing protocol should be preferred. |
2060 | 593 | @end deffn | 595 | @end deffn |
2061 | 594 | 596 | ||
2063 | 595 | @noindent | 597 | @noindent |
2064 | 596 | To allow the UI-server to visually identify a running operation or to | 598 | To allow the UI-server to visually identify a running operation or to |
2065 | 597 | associate operations the server MAY support the command: | 599 | associate operations the server MAY support the command: |
2066 | 598 | 600 | ||
2067 | 599 | 601 | ||
2068 | === modified file 'doc/version.texi' | |||
2069 | --- doc/version.texi 2013-05-29 18:33:42 +0000 | |||
2070 | +++ doc/version.texi 2013-10-23 07:14:02 +0000 | |||
2071 | @@ -1,4 +1,4 @@ | |||
2076 | 1 | @set UPDATED 28 May 2013 | 1 | @set UPDATED 9 August 2013 |
2077 | 2 | @set UPDATED-MONTH May 2013 | 2 | @set UPDATED-MONTH August 2013 |
2078 | 3 | @set EDITION 1.4.2 | 3 | @set EDITION 1.4.3 |
2079 | 4 | @set VERSION 1.4.2 | 4 | @set VERSION 1.4.3 |
2080 | 5 | 5 | ||
2081 | === modified file 'gpgme.spec' | |||
2082 | --- gpgme.spec 2013-05-29 18:33:42 +0000 | |||
2083 | +++ gpgme.spec 2013-10-23 07:14:02 +0000 | |||
2084 | @@ -1,7 +1,7 @@ | |||
2085 | 1 | # This is a template. The dist target uses it to create the real file. | 1 | # This is a template. The dist target uses it to create the real file. |
2086 | 2 | Summary: GPGME - GnuPG Made Easy | 2 | Summary: GPGME - GnuPG Made Easy |
2087 | 3 | Name: gpgme | 3 | Name: gpgme |
2089 | 4 | Version: 1.4.2 | 4 | Version: 1.4.3 |
2090 | 5 | Release: 1 | 5 | Release: 1 |
2091 | 6 | URL: http://www.gnupg.org/gpgme.html | 6 | URL: http://www.gnupg.org/gpgme.html |
2092 | 7 | Source: ftp://ftp.gnupg.org/gcrypt/alpha/gpgme/%{name}-%{version}.tar.gz | 7 | Source: ftp://ftp.gnupg.org/gcrypt/alpha/gpgme/%{name}-%{version}.tar.gz |
2093 | 8 | 8 | ||
2094 | === modified file 'lang/cl/gpgme.asd' | |||
2095 | --- lang/cl/gpgme.asd 2013-05-29 18:33:42 +0000 | |||
2096 | +++ lang/cl/gpgme.asd 2013-10-23 07:14:02 +0000 | |||
2097 | @@ -27,7 +27,7 @@ | |||
2098 | 27 | (defsystem gpgme | 27 | (defsystem gpgme |
2099 | 28 | :description "GnuPG Made Easy." | 28 | :description "GnuPG Made Easy." |
2100 | 29 | :author "g10 Code GmbH" | 29 | :author "g10 Code GmbH" |
2102 | 30 | :version "1.4.2" | 30 | :version "1.4.3" |
2103 | 31 | :licence "GPL" | 31 | :licence "GPL" |
2104 | 32 | :depends-on ("cffi" "gpg-error") | 32 | :depends-on ("cffi" "gpg-error") |
2105 | 33 | :components ((:file "gpgme-package") | 33 | :components ((:file "gpgme-package") |
2106 | 34 | 34 | ||
2107 | === modified file 'src/Makefile.am' | |||
2108 | --- src/Makefile.am 2013-05-29 18:33:42 +0000 | |||
2109 | +++ src/Makefile.am 2013-10-23 07:14:02 +0000 | |||
2110 | @@ -103,8 +103,9 @@ | |||
2111 | 103 | # unresolved symbols to the thread module. | 103 | # unresolved symbols to the thread module. |
2112 | 104 | main_sources = \ | 104 | main_sources = \ |
2113 | 105 | util.h conversion.c get-env.c context.h ops.h \ | 105 | util.h conversion.c get-env.c context.h ops.h \ |
2114 | 106 | parsetlv.c parsetlv.h \ | ||
2115 | 106 | data.h data.c data-fd.c data-stream.c data-mem.c data-user.c \ | 107 | data.h data.c data-fd.c data-stream.c data-mem.c data-user.c \ |
2117 | 107 | data-compat.c \ | 108 | data-compat.c data-identify.c \ |
2118 | 108 | signers.c sig-notation.c \ | 109 | signers.c sig-notation.c \ |
2119 | 109 | wait.c wait-global.c wait-private.c wait-user.c wait.h \ | 110 | wait.c wait-global.c wait-private.c wait-user.c wait.h \ |
2120 | 110 | op-support.c \ | 111 | op-support.c \ |
2121 | @@ -118,7 +119,7 @@ | |||
2122 | 118 | $(uiserver_components) \ | 119 | $(uiserver_components) \ |
2123 | 119 | $(g13_components) vfs-mount.c vfs-create.c \ | 120 | $(g13_components) vfs-mount.c vfs-create.c \ |
2124 | 120 | gpgconf.c \ | 121 | gpgconf.c \ |
2126 | 121 | sema.h priv-io.h $(system_components) dirinfo.c \ | 122 | sema.h priv-io.h $(system_components) sys-util.h dirinfo.c \ |
2127 | 122 | debug.c debug.h gpgme.c version.c error.c | 123 | debug.c debug.h gpgme.c version.c error.c |
2128 | 123 | 124 | ||
2129 | 124 | libgpgme_la_SOURCES = $(main_sources) \ | 125 | libgpgme_la_SOURCES = $(main_sources) \ |
2130 | 125 | 126 | ||
2131 | === modified file 'src/Makefile.in' | |||
2132 | --- src/Makefile.in 2013-05-29 18:33:42 +0000 | |||
2133 | +++ src/Makefile.in 2013-10-23 07:14:02 +0000 | |||
2134 | @@ -128,20 +128,21 @@ | |||
2135 | 128 | LTLIBRARIES = $(lib_LTLIBRARIES) | 128 | LTLIBRARIES = $(lib_LTLIBRARIES) |
2136 | 129 | @HAVE_W32_SYSTEM_TRUE@am__DEPENDENCIES_1 = versioninfo.lo | 129 | @HAVE_W32_SYSTEM_TRUE@am__DEPENDENCIES_1 = versioninfo.lo |
2137 | 130 | am__libgpgme_glib_la_SOURCES_DIST = util.h conversion.c get-env.c \ | 130 | am__libgpgme_glib_la_SOURCES_DIST = util.h conversion.c get-env.c \ |
2152 | 131 | context.h ops.h data.h data.c data-fd.c data-stream.c \ | 131 | context.h ops.h parsetlv.c parsetlv.h data.h data.c data-fd.c \ |
2153 | 132 | data-mem.c data-user.c data-compat.c signers.c sig-notation.c \ | 132 | data-stream.c data-mem.c data-user.c data-compat.c \ |
2154 | 133 | wait.c wait-global.c wait-private.c wait-user.c wait.h \ | 133 | data-identify.c signers.c sig-notation.c wait.c wait-global.c \ |
2155 | 134 | op-support.c encrypt.c encrypt-sign.c decrypt.c \ | 134 | wait-private.c wait-user.c wait.h op-support.c encrypt.c \ |
2156 | 135 | decrypt-verify.c verify.c sign.c passphrase.c progress.c key.c \ | 135 | encrypt-sign.c decrypt.c decrypt-verify.c verify.c sign.c \ |
2157 | 136 | keylist.c trust-item.c trustlist.c import.c export.c genkey.c \ | 136 | passphrase.c progress.c key.c keylist.c trust-item.c \ |
2158 | 137 | delete.c edit.c getauditlog.c opassuan.c passwd.c engine.h \ | 137 | trustlist.c import.c export.c genkey.c delete.c edit.c \ |
2159 | 138 | engine-backend.h engine.c engine-gpg.c status-table.c \ | 138 | getauditlog.c opassuan.c passwd.c engine.h engine-backend.h \ |
2160 | 139 | engine-gpgsm.c assuan-support.c engine-assuan.c \ | 139 | engine.c engine-gpg.c status-table.c engine-gpgsm.c \ |
2161 | 140 | engine-gpgconf.c engine-uiserver.c engine-g13.c vfs-mount.c \ | 140 | assuan-support.c engine-assuan.c engine-gpgconf.c \ |
2162 | 141 | vfs-create.c gpgconf.c sema.h priv-io.h ath.h posix-util.c \ | 141 | engine-uiserver.c engine-g13.c vfs-mount.c vfs-create.c \ |
2163 | 142 | posix-sema.c posix-io.c w32-ce.h w32-ce.c w32-util.c \ | 142 | gpgconf.c sema.h priv-io.h ath.h posix-util.c posix-sema.c \ |
2164 | 143 | w32-sema.c dirinfo.c debug.c debug.h gpgme.c version.c error.c \ | 143 | posix-io.c w32-ce.h w32-ce.c w32-util.c w32-sema.c sys-util.h \ |
2165 | 144 | ath.c w32-glib-io.c | 144 | dirinfo.c debug.c debug.h gpgme.c version.c error.c ath.c \ |
2166 | 145 | w32-glib-io.c | ||
2167 | 145 | @HAVE_GPGSM_TRUE@am__objects_1 = engine-gpgsm.lo | 146 | @HAVE_GPGSM_TRUE@am__objects_1 = engine-gpgsm.lo |
2168 | 146 | @HAVE_ASSUAN_TRUE@am__objects_2 = assuan-support.lo engine-assuan.lo | 147 | @HAVE_ASSUAN_TRUE@am__objects_2 = assuan-support.lo engine-assuan.lo |
2169 | 147 | @HAVE_GPGCONF_TRUE@am__objects_3 = engine-gpgconf.lo | 148 | @HAVE_GPGCONF_TRUE@am__objects_3 = engine-gpgconf.lo |
2170 | @@ -152,18 +153,19 @@ | |||
2171 | 152 | @HAVE_DOSISH_SYSTEM_FALSE@ posix-io.lo $(am__objects_6) | 153 | @HAVE_DOSISH_SYSTEM_FALSE@ posix-io.lo $(am__objects_6) |
2172 | 153 | @HAVE_DOSISH_SYSTEM_TRUE@am__objects_7 = w32-util.lo w32-sema.lo \ | 154 | @HAVE_DOSISH_SYSTEM_TRUE@am__objects_7 = w32-util.lo w32-sema.lo \ |
2173 | 154 | @HAVE_DOSISH_SYSTEM_TRUE@ $(am__objects_6) | 155 | @HAVE_DOSISH_SYSTEM_TRUE@ $(am__objects_6) |
2186 | 155 | am__objects_8 = conversion.lo get-env.lo data.lo data-fd.lo \ | 156 | am__objects_8 = conversion.lo get-env.lo parsetlv.lo data.lo \ |
2187 | 156 | data-stream.lo data-mem.lo data-user.lo data-compat.lo \ | 157 | data-fd.lo data-stream.lo data-mem.lo data-user.lo \ |
2188 | 157 | signers.lo sig-notation.lo wait.lo wait-global.lo \ | 158 | data-compat.lo data-identify.lo signers.lo sig-notation.lo \ |
2189 | 158 | wait-private.lo wait-user.lo op-support.lo encrypt.lo \ | 159 | wait.lo wait-global.lo wait-private.lo wait-user.lo \ |
2190 | 159 | encrypt-sign.lo decrypt.lo decrypt-verify.lo verify.lo sign.lo \ | 160 | op-support.lo encrypt.lo encrypt-sign.lo decrypt.lo \ |
2191 | 160 | passphrase.lo progress.lo key.lo keylist.lo trust-item.lo \ | 161 | decrypt-verify.lo verify.lo sign.lo passphrase.lo progress.lo \ |
2192 | 161 | trustlist.lo import.lo export.lo genkey.lo delete.lo edit.lo \ | 162 | key.lo keylist.lo trust-item.lo trustlist.lo import.lo \ |
2193 | 162 | getauditlog.lo opassuan.lo passwd.lo engine.lo engine-gpg.lo \ | 163 | export.lo genkey.lo delete.lo edit.lo getauditlog.lo \ |
2194 | 163 | status-table.lo $(am__objects_1) $(am__objects_2) \ | 164 | opassuan.lo passwd.lo engine.lo engine-gpg.lo status-table.lo \ |
2195 | 164 | $(am__objects_3) $(am__objects_4) $(am__objects_5) \ | 165 | $(am__objects_1) $(am__objects_2) $(am__objects_3) \ |
2196 | 165 | vfs-mount.lo vfs-create.lo gpgconf.lo $(am__objects_7) \ | 166 | $(am__objects_4) $(am__objects_5) vfs-mount.lo vfs-create.lo \ |
2197 | 166 | dirinfo.lo debug.lo gpgme.lo version.lo error.lo | 167 | gpgconf.lo $(am__objects_7) dirinfo.lo debug.lo gpgme.lo \ |
2198 | 168 | version.lo error.lo | ||
2199 | 167 | @BUILD_W32_GLIB_TRUE@am_libgpgme_glib_la_OBJECTS = $(am__objects_8) \ | 169 | @BUILD_W32_GLIB_TRUE@am_libgpgme_glib_la_OBJECTS = $(am__objects_8) \ |
2200 | 168 | @BUILD_W32_GLIB_TRUE@ ath.lo w32-glib-io.lo | 170 | @BUILD_W32_GLIB_TRUE@ ath.lo w32-glib-io.lo |
2201 | 169 | libgpgme_glib_la_OBJECTS = $(am_libgpgme_glib_la_OBJECTS) | 171 | libgpgme_glib_la_OBJECTS = $(am_libgpgme_glib_la_OBJECTS) |
2202 | @@ -172,19 +174,20 @@ | |||
2203 | 172 | $(libgpgme_glib_la_LDFLAGS) $(LDFLAGS) -o $@ | 174 | $(libgpgme_glib_la_LDFLAGS) $(LDFLAGS) -o $@ |
2204 | 173 | @BUILD_W32_GLIB_TRUE@am_libgpgme_glib_la_rpath = -rpath $(libdir) | 175 | @BUILD_W32_GLIB_TRUE@am_libgpgme_glib_la_rpath = -rpath $(libdir) |
2205 | 174 | am__libgpgme_pthread_la_SOURCES_DIST = util.h conversion.c get-env.c \ | 176 | am__libgpgme_pthread_la_SOURCES_DIST = util.h conversion.c get-env.c \ |
2219 | 175 | context.h ops.h data.h data.c data-fd.c data-stream.c \ | 177 | context.h ops.h parsetlv.c parsetlv.h data.h data.c data-fd.c \ |
2220 | 176 | data-mem.c data-user.c data-compat.c signers.c sig-notation.c \ | 178 | data-stream.c data-mem.c data-user.c data-compat.c \ |
2221 | 177 | wait.c wait-global.c wait-private.c wait-user.c wait.h \ | 179 | data-identify.c signers.c sig-notation.c wait.c wait-global.c \ |
2222 | 178 | op-support.c encrypt.c encrypt-sign.c decrypt.c \ | 180 | wait-private.c wait-user.c wait.h op-support.c encrypt.c \ |
2223 | 179 | decrypt-verify.c verify.c sign.c passphrase.c progress.c key.c \ | 181 | encrypt-sign.c decrypt.c decrypt-verify.c verify.c sign.c \ |
2224 | 180 | keylist.c trust-item.c trustlist.c import.c export.c genkey.c \ | 182 | passphrase.c progress.c key.c keylist.c trust-item.c \ |
2225 | 181 | delete.c edit.c getauditlog.c opassuan.c passwd.c engine.h \ | 183 | trustlist.c import.c export.c genkey.c delete.c edit.c \ |
2226 | 182 | engine-backend.h engine.c engine-gpg.c status-table.c \ | 184 | getauditlog.c opassuan.c passwd.c engine.h engine-backend.h \ |
2227 | 183 | engine-gpgsm.c assuan-support.c engine-assuan.c \ | 185 | engine.c engine-gpg.c status-table.c engine-gpgsm.c \ |
2228 | 184 | engine-gpgconf.c engine-uiserver.c engine-g13.c vfs-mount.c \ | 186 | assuan-support.c engine-assuan.c engine-gpgconf.c \ |
2229 | 185 | vfs-create.c gpgconf.c sema.h priv-io.h ath.h posix-util.c \ | 187 | engine-uiserver.c engine-g13.c vfs-mount.c vfs-create.c \ |
2230 | 186 | posix-sema.c posix-io.c w32-ce.h w32-ce.c w32-util.c \ | 188 | gpgconf.c sema.h priv-io.h ath.h posix-util.c posix-sema.c \ |
2231 | 187 | w32-sema.c dirinfo.c debug.c debug.h gpgme.c version.c error.c \ | 189 | posix-io.c w32-ce.h w32-ce.c w32-util.c w32-sema.c sys-util.h \ |
2232 | 190 | dirinfo.c debug.c debug.h gpgme.c version.c error.c \ | ||
2233 | 188 | ath-pthread.c w32-io.c | 191 | ath-pthread.c w32-io.c |
2234 | 189 | @HAVE_DOSISH_SYSTEM_TRUE@am__objects_9 = w32-io.lo | 192 | @HAVE_DOSISH_SYSTEM_TRUE@am__objects_9 = w32-io.lo |
2235 | 190 | am_libgpgme_pthread_la_OBJECTS = $(am__objects_8) ath-pthread.lo \ | 193 | am_libgpgme_pthread_la_OBJECTS = $(am__objects_8) ath-pthread.lo \ |
2236 | @@ -195,20 +198,21 @@ | |||
2237 | 195 | $(libgpgme_pthread_la_LDFLAGS) $(LDFLAGS) -o $@ | 198 | $(libgpgme_pthread_la_LDFLAGS) $(LDFLAGS) -o $@ |
2238 | 196 | @HAVE_PTHREAD_TRUE@am_libgpgme_pthread_la_rpath = -rpath $(libdir) | 199 | @HAVE_PTHREAD_TRUE@am_libgpgme_pthread_la_rpath = -rpath $(libdir) |
2239 | 197 | am__libgpgme_qt_la_SOURCES_DIST = util.h conversion.c get-env.c \ | 200 | am__libgpgme_qt_la_SOURCES_DIST = util.h conversion.c get-env.c \ |
2254 | 198 | context.h ops.h data.h data.c data-fd.c data-stream.c \ | 201 | context.h ops.h parsetlv.c parsetlv.h data.h data.c data-fd.c \ |
2255 | 199 | data-mem.c data-user.c data-compat.c signers.c sig-notation.c \ | 202 | data-stream.c data-mem.c data-user.c data-compat.c \ |
2256 | 200 | wait.c wait-global.c wait-private.c wait-user.c wait.h \ | 203 | data-identify.c signers.c sig-notation.c wait.c wait-global.c \ |
2257 | 201 | op-support.c encrypt.c encrypt-sign.c decrypt.c \ | 204 | wait-private.c wait-user.c wait.h op-support.c encrypt.c \ |
2258 | 202 | decrypt-verify.c verify.c sign.c passphrase.c progress.c key.c \ | 205 | encrypt-sign.c decrypt.c decrypt-verify.c verify.c sign.c \ |
2259 | 203 | keylist.c trust-item.c trustlist.c import.c export.c genkey.c \ | 206 | passphrase.c progress.c key.c keylist.c trust-item.c \ |
2260 | 204 | delete.c edit.c getauditlog.c opassuan.c passwd.c engine.h \ | 207 | trustlist.c import.c export.c genkey.c delete.c edit.c \ |
2261 | 205 | engine-backend.h engine.c engine-gpg.c status-table.c \ | 208 | getauditlog.c opassuan.c passwd.c engine.h engine-backend.h \ |
2262 | 206 | engine-gpgsm.c assuan-support.c engine-assuan.c \ | 209 | engine.c engine-gpg.c status-table.c engine-gpgsm.c \ |
2263 | 207 | engine-gpgconf.c engine-uiserver.c engine-g13.c vfs-mount.c \ | 210 | assuan-support.c engine-assuan.c engine-gpgconf.c \ |
2264 | 208 | vfs-create.c gpgconf.c sema.h priv-io.h ath.h posix-util.c \ | 211 | engine-uiserver.c engine-g13.c vfs-mount.c vfs-create.c \ |
2265 | 209 | posix-sema.c posix-io.c w32-ce.h w32-ce.c w32-util.c \ | 212 | gpgconf.c sema.h priv-io.h ath.h posix-util.c posix-sema.c \ |
2266 | 210 | w32-sema.c dirinfo.c debug.c debug.h gpgme.c version.c error.c \ | 213 | posix-io.c w32-ce.h w32-ce.c w32-util.c w32-sema.c sys-util.h \ |
2267 | 211 | ath.c w32-qt-io.cpp kdpipeiodevice.h kdpipeiodevice.cpp \ | 214 | dirinfo.c debug.c debug.h gpgme.c version.c error.c ath.c \ |
2268 | 215 | w32-qt-io.cpp kdpipeiodevice.h kdpipeiodevice.cpp \ | ||
2269 | 212 | kdpipeiodevice.moc | 216 | kdpipeiodevice.moc |
2270 | 213 | @BUILD_W32_QT_TRUE@am_libgpgme_qt_la_OBJECTS = $(am__objects_8) ath.lo \ | 217 | @BUILD_W32_QT_TRUE@am_libgpgme_qt_la_OBJECTS = $(am__objects_8) ath.lo \ |
2271 | 214 | @BUILD_W32_QT_TRUE@ w32-qt-io.lo kdpipeiodevice.lo | 218 | @BUILD_W32_QT_TRUE@ w32-qt-io.lo kdpipeiodevice.lo |
2272 | @@ -218,19 +222,21 @@ | |||
2273 | 218 | $(CXXFLAGS) $(libgpgme_qt_la_LDFLAGS) $(LDFLAGS) -o $@ | 222 | $(CXXFLAGS) $(libgpgme_qt_la_LDFLAGS) $(LDFLAGS) -o $@ |
2274 | 219 | @BUILD_W32_QT_TRUE@am_libgpgme_qt_la_rpath = -rpath $(libdir) | 223 | @BUILD_W32_QT_TRUE@am_libgpgme_qt_la_rpath = -rpath $(libdir) |
2275 | 220 | am__libgpgme_la_SOURCES_DIST = util.h conversion.c get-env.c context.h \ | 224 | am__libgpgme_la_SOURCES_DIST = util.h conversion.c get-env.c context.h \ |
2281 | 221 | ops.h data.h data.c data-fd.c data-stream.c data-mem.c \ | 225 | ops.h parsetlv.c parsetlv.h data.h data.c data-fd.c \ |
2282 | 222 | data-user.c data-compat.c signers.c sig-notation.c wait.c \ | 226 | data-stream.c data-mem.c data-user.c data-compat.c \ |
2283 | 223 | wait-global.c wait-private.c wait-user.c wait.h op-support.c \ | 227 | data-identify.c signers.c sig-notation.c wait.c wait-global.c \ |
2284 | 224 | encrypt.c encrypt-sign.c decrypt.c decrypt-verify.c verify.c \ | 228 | wait-private.c wait-user.c wait.h op-support.c encrypt.c \ |
2285 | 225 | sign.c passphrase.c progress.c key.c keylist.c trust-item.c \ | 229 | encrypt-sign.c decrypt.c decrypt-verify.c verify.c sign.c \ |
2286 | 230 | passphrase.c progress.c key.c keylist.c trust-item.c \ | ||
2287 | 226 | trustlist.c import.c export.c genkey.c delete.c edit.c \ | 231 | trustlist.c import.c export.c genkey.c delete.c edit.c \ |
2288 | 227 | getauditlog.c opassuan.c passwd.c engine.h engine-backend.h \ | 232 | getauditlog.c opassuan.c passwd.c engine.h engine-backend.h \ |
2289 | 228 | engine.c engine-gpg.c status-table.c engine-gpgsm.c \ | 233 | engine.c engine-gpg.c status-table.c engine-gpgsm.c \ |
2290 | 229 | assuan-support.c engine-assuan.c engine-gpgconf.c \ | 234 | assuan-support.c engine-assuan.c engine-gpgconf.c \ |
2291 | 230 | engine-uiserver.c engine-g13.c vfs-mount.c vfs-create.c \ | 235 | engine-uiserver.c engine-g13.c vfs-mount.c vfs-create.c \ |
2292 | 231 | gpgconf.c sema.h priv-io.h ath.h posix-util.c posix-sema.c \ | 236 | gpgconf.c sema.h priv-io.h ath.h posix-util.c posix-sema.c \ |
2295 | 232 | posix-io.c w32-ce.h w32-ce.c w32-util.c w32-sema.c dirinfo.c \ | 237 | posix-io.c w32-ce.h w32-ce.c w32-util.c w32-sema.c sys-util.h \ |
2296 | 233 | debug.c debug.h gpgme.c version.c error.c ath.c w32-io.c | 238 | dirinfo.c debug.c debug.h gpgme.c version.c error.c ath.c \ |
2297 | 239 | w32-io.c | ||
2298 | 234 | am_libgpgme_la_OBJECTS = $(am__objects_8) ath.lo $(am__objects_9) | 240 | am_libgpgme_la_OBJECTS = $(am__objects_8) ath.lo $(am__objects_9) |
2299 | 235 | libgpgme_la_OBJECTS = $(am_libgpgme_la_OBJECTS) | 241 | libgpgme_la_OBJECTS = $(am_libgpgme_la_OBJECTS) |
2300 | 236 | libgpgme_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ | 242 | libgpgme_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ |
2301 | @@ -485,8 +491,9 @@ | |||
2302 | 485 | # unresolved symbols to the thread module. | 491 | # unresolved symbols to the thread module. |
2303 | 486 | main_sources = \ | 492 | main_sources = \ |
2304 | 487 | util.h conversion.c get-env.c context.h ops.h \ | 493 | util.h conversion.c get-env.c context.h ops.h \ |
2305 | 494 | parsetlv.c parsetlv.h \ | ||
2306 | 488 | data.h data.c data-fd.c data-stream.c data-mem.c data-user.c \ | 495 | data.h data.c data-fd.c data-stream.c data-mem.c data-user.c \ |
2308 | 489 | data-compat.c \ | 496 | data-compat.c data-identify.c \ |
2309 | 490 | signers.c sig-notation.c \ | 497 | signers.c sig-notation.c \ |
2310 | 491 | wait.c wait-global.c wait-private.c wait-user.c wait.h \ | 498 | wait.c wait-global.c wait-private.c wait-user.c wait.h \ |
2311 | 492 | op-support.c \ | 499 | op-support.c \ |
2312 | @@ -500,7 +507,7 @@ | |||
2313 | 500 | $(uiserver_components) \ | 507 | $(uiserver_components) \ |
2314 | 501 | $(g13_components) vfs-mount.c vfs-create.c \ | 508 | $(g13_components) vfs-mount.c vfs-create.c \ |
2315 | 502 | gpgconf.c \ | 509 | gpgconf.c \ |
2317 | 503 | sema.h priv-io.h $(system_components) dirinfo.c \ | 510 | sema.h priv-io.h $(system_components) sys-util.h dirinfo.c \ |
2318 | 504 | debug.c debug.h gpgme.c version.c error.c | 511 | debug.c debug.h gpgme.c version.c error.c |
2319 | 505 | 512 | ||
2320 | 506 | libgpgme_la_SOURCES = $(main_sources) \ | 513 | libgpgme_la_SOURCES = $(main_sources) \ |
2321 | @@ -766,6 +773,7 @@ | |||
2322 | 766 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conversion.Plo@am__quote@ | 773 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conversion.Plo@am__quote@ |
2323 | 767 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data-compat.Plo@am__quote@ | 774 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data-compat.Plo@am__quote@ |
2324 | 768 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data-fd.Plo@am__quote@ | 775 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data-fd.Plo@am__quote@ |
2325 | 776 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data-identify.Plo@am__quote@ | ||
2326 | 769 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data-mem.Plo@am__quote@ | 777 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data-mem.Plo@am__quote@ |
2327 | 770 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data-stream.Plo@am__quote@ | 778 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data-stream.Plo@am__quote@ |
2328 | 771 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data-user.Plo@am__quote@ | 779 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/data-user.Plo@am__quote@ |
2329 | @@ -800,6 +808,7 @@ | |||
2330 | 800 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keylist.Plo@am__quote@ | 808 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keylist.Plo@am__quote@ |
2331 | 801 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/op-support.Plo@am__quote@ | 809 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/op-support.Plo@am__quote@ |
2332 | 802 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opassuan.Plo@am__quote@ | 810 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opassuan.Plo@am__quote@ |
2333 | 811 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parsetlv.Plo@am__quote@ | ||
2334 | 803 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/passphrase.Plo@am__quote@ | 812 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/passphrase.Plo@am__quote@ |
2335 | 804 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/passwd.Plo@am__quote@ | 813 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/passwd.Plo@am__quote@ |
2336 | 805 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posix-io.Plo@am__quote@ | 814 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posix-io.Plo@am__quote@ |
2337 | 806 | 815 | ||
2338 | === added file 'src/data-identify.c' | |||
2339 | --- src/data-identify.c 1970-01-01 00:00:00 +0000 | |||
2340 | +++ src/data-identify.c 2013-10-23 07:14:02 +0000 | |||
2341 | @@ -0,0 +1,247 @@ | |||
2342 | 1 | /* data-identify.c - Try to identify the data | ||
2343 | 2 | Copyright (C) 2013 g10 Code GmbH | ||
2344 | 3 | |||
2345 | 4 | This file is part of GPGME. | ||
2346 | 5 | |||
2347 | 6 | GPGME is free software; you can redistribute it and/or modify it | ||
2348 | 7 | under the terms of the GNU Lesser General Public License as | ||
2349 | 8 | published by the Free Software Foundation; either version 2.1 of | ||
2350 | 9 | the License, or (at your option) any later version. | ||
2351 | 10 | |||
2352 | 11 | GPGME is distributed in the hope that it will be useful, but | ||
2353 | 12 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2354 | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
2355 | 14 | Lesser General Public License for more details. | ||
2356 | 15 | |||
2357 | 16 | You should have received a copy of the GNU Lesser General Public | ||
2358 | 17 | License along with this program; if not, see <http://www.gnu.org/licenses/>. | ||
2359 | 18 | */ | ||
2360 | 19 | |||
2361 | 20 | #if HAVE_CONFIG_H | ||
2362 | 21 | # include <config.h> | ||
2363 | 22 | #endif | ||
2364 | 23 | |||
2365 | 24 | #include <stdlib.h> | ||
2366 | 25 | #include <string.h> | ||
2367 | 26 | |||
2368 | 27 | #include "gpgme.h" | ||
2369 | 28 | #include "data.h" | ||
2370 | 29 | #include "util.h" | ||
2371 | 30 | #include "parsetlv.h" | ||
2372 | 31 | |||
2373 | 32 | /* The size of the sample data we take for detection. */ | ||
2374 | 33 | #define SAMPLE_SIZE 2048 | ||
2375 | 34 | |||
2376 | 35 | |||
2377 | 36 | |||
2378 | 37 | /* Note that DATA may be binary but a final nul is required so that | ||
2379 | 38 | string operations will find a terminator. | ||
2380 | 39 | |||
2381 | 40 | Returns: GPGME_DATA_TYPE_xxxx */ | ||
2382 | 41 | static gpgme_data_type_t | ||
2383 | 42 | basic_detection (const char *data, size_t datalen) | ||
2384 | 43 | { | ||
2385 | 44 | tlvinfo_t ti; | ||
2386 | 45 | const char *s; | ||
2387 | 46 | size_t n; | ||
2388 | 47 | int maybe_p12 = 0; | ||
2389 | 48 | |||
2390 | 49 | if (datalen < 24) /* Object is probably too short for detection. */ | ||
2391 | 50 | return GPGME_DATA_TYPE_UNKNOWN; | ||
2392 | 51 | |||
2393 | 52 | /* This is a common example of a CMS object - it is obvious that we | ||
2394 | 53 | only need to read a few bytes to get to the OID: | ||
2395 | 54 | 30 82 0B 59 06 09 2A 86 48 86 F7 0D 01 07 02 A0 82 0B 4A 30 82 0B 46 02 | ||
2396 | 55 | ----------- ++++++++++++++++++++++++++++++++ | ||
2397 | 56 | SEQUENCE OID (signedData) | ||
2398 | 57 | (2 byte len) | ||
2399 | 58 | |||
2400 | 59 | A PKCS#12 message is: | ||
2401 | 60 | |||
2402 | 61 | 30 82 08 59 02 01 03 30 82 08 1F 06 09 2A 86 48 86 F7 0D 01 07 01 A0 82 | ||
2403 | 62 | ----------- ++++++++ ----------- ++++++++++++++++++++++++++++++++ | ||
2404 | 63 | SEQUENCE INTEGER SEQUENCE OID (data) | ||
2405 | 64 | |||
2406 | 65 | A X.509 certificate is: | ||
2407 | 66 | |||
2408 | 67 | 30 82 05 B8 30 82 04 A0 A0 03 02 01 02 02 07 15 46 A0 BF 30 07 39 30 0D | ||
2409 | 68 | ----------- +++++++++++ ----- ++++++++ -------------------------- | ||
2410 | 69 | SEQUENCE SEQUENCE [0] INTEGER INTEGER SEQU | ||
2411 | 70 | (tbs) (version) (s/n) (Algo) | ||
2412 | 71 | |||
2413 | 72 | Thus we need to read at least 22 bytes, we add 2 bytes to cope with | ||
2414 | 73 | length headers stored with 4 bytes. | ||
2415 | 74 | */ | ||
2416 | 75 | |||
2417 | 76 | |||
2418 | 77 | s = data; | ||
2419 | 78 | n = datalen; | ||
2420 | 79 | |||
2421 | 80 | if (parse_tlv (&s, &n, &ti)) | ||
2422 | 81 | goto try_pgp; /* Not properly BER encoded. */ | ||
2423 | 82 | if (!(ti.cls == ASN1_CLASS_UNIVERSAL && ti.tag == ASN1_TAG_SEQUENCE | ||
2424 | 83 | && ti.is_cons)) | ||
2425 | 84 | goto try_pgp; /* A CMS object always starts with a sequence. */ | ||
2426 | 85 | |||
2427 | 86 | if (parse_tlv (&s, &n, &ti)) | ||
2428 | 87 | goto try_pgp; /* Not properly BER encoded. */ | ||
2429 | 88 | if (ti.cls == ASN1_CLASS_UNIVERSAL && ti.tag == ASN1_TAG_SEQUENCE | ||
2430 | 89 | && ti.is_cons && n >= ti.length) | ||
2431 | 90 | { | ||
2432 | 91 | if (parse_tlv (&s, &n, &ti)) | ||
2433 | 92 | goto try_pgp; | ||
2434 | 93 | if (!(ti.cls == ASN1_CLASS_CONTEXT && ti.tag == 0 | ||
2435 | 94 | && ti.is_cons && ti.length == 3 && n >= ti.length)) | ||
2436 | 95 | goto try_pgp; | ||
2437 | 96 | |||
2438 | 97 | if (parse_tlv (&s, &n, &ti)) | ||
2439 | 98 | goto try_pgp; | ||
2440 | 99 | if (!(ti.cls == ASN1_CLASS_UNIVERSAL && ti.tag == ASN1_TAG_INTEGER | ||
2441 | 100 | && !ti.is_cons && ti.length == 1 && n && (*s == 1 || *s == 2))) | ||
2442 | 101 | goto try_pgp; | ||
2443 | 102 | s++; | ||
2444 | 103 | n--; | ||
2445 | 104 | if (!(ti.cls == ASN1_CLASS_UNIVERSAL && ti.tag == ASN1_TAG_INTEGER | ||
2446 | 105 | && !ti.is_cons)) | ||
2447 | 106 | goto try_pgp; | ||
2448 | 107 | /* Because the now following S/N may be larger than the sample | ||
2449 | 108 | data we have, we stop parsing here and don't check for the | ||
2450 | 109 | algorithm ID. */ | ||
2451 | 110 | return GPGME_DATA_TYPE_X509_CERT; | ||
2452 | 111 | } | ||
2453 | 112 | if (ti.cls == ASN1_CLASS_UNIVERSAL && ti.tag == ASN1_TAG_INTEGER | ||
2454 | 113 | && !ti.is_cons && ti.length == 1 && n && *s == 3) | ||
2455 | 114 | { | ||
2456 | 115 | maybe_p12 = 1; | ||
2457 | 116 | s++; | ||
2458 | 117 | n--; | ||
2459 | 118 | if (parse_tlv (&s, &n, &ti)) | ||
2460 | 119 | goto try_pgp; | ||
2461 | 120 | if (!(ti.cls == ASN1_CLASS_UNIVERSAL && ti.tag == ASN1_TAG_SEQUENCE | ||
2462 | 121 | && ti.is_cons)) | ||
2463 | 122 | goto try_pgp; | ||
2464 | 123 | if (parse_tlv (&s, &n, &ti)) | ||
2465 | 124 | goto try_pgp; | ||
2466 | 125 | } | ||
2467 | 126 | if (ti.cls == ASN1_CLASS_UNIVERSAL && ti.tag == ASN1_TAG_OBJECT_ID | ||
2468 | 127 | && !ti.is_cons && ti.length && n >= ti.length) | ||
2469 | 128 | { | ||
2470 | 129 | if (ti.length == 9) | ||
2471 | 130 | { | ||
2472 | 131 | if (!memcmp (s, "\x2A\x86\x48\x86\xF7\x0D\x01\x07\x01", 9)) | ||
2473 | 132 | { | ||
2474 | 133 | /* Data. */ | ||
2475 | 134 | return (maybe_p12 ? GPGME_DATA_TYPE_PKCS12 | ||
2476 | 135 | /* */ : GPGME_DATA_TYPE_CMS_OTHER); | ||
2477 | 136 | } | ||
2478 | 137 | if (!memcmp (s, "\x2A\x86\x48\x86\xF7\x0D\x01\x07\x02", 9)) | ||
2479 | 138 | { | ||
2480 | 139 | /* Signed Data. */ | ||
2481 | 140 | return (maybe_p12 ? GPGME_DATA_TYPE_PKCS12 | ||
2482 | 141 | /* */ : GPGME_DATA_TYPE_CMS_SIGNED); | ||
2483 | 142 | } | ||
2484 | 143 | if (!memcmp (s, "\x2A\x86\x48\x86\xF7\x0D\x01\x07\x03", 9)) | ||
2485 | 144 | return GPGME_DATA_TYPE_CMS_ENCRYPTED; /* Enveloped Data. */ | ||
2486 | 145 | if (!memcmp (s, "\x2A\x86\x48\x86\xF7\x0D\x01\x07\x05", 9)) | ||
2487 | 146 | return GPGME_DATA_TYPE_CMS_OTHER; /* Digested Data. */ | ||
2488 | 147 | if (!memcmp (s, "\x2A\x86\x48\x86\xF7\x0D\x01\x07\x06", 9)) | ||
2489 | 148 | return GPGME_DATA_TYPE_CMS_OTHER; /* Encrypted Data. */ | ||
2490 | 149 | } | ||
2491 | 150 | else if (ti.length == 11) | ||
2492 | 151 | { | ||
2493 | 152 | if (!memcmp (s, "\x2A\x86\x48\x86\xF7\x0D\x01\x09\x10\x01\x02", 11)) | ||
2494 | 153 | return GPGME_DATA_TYPE_CMS_OTHER; /* Auth Data. */ | ||
2495 | 154 | } | ||
2496 | 155 | } | ||
2497 | 156 | |||
2498 | 157 | |||
2499 | 158 | try_pgp: | ||
2500 | 159 | /* Check whether this might be a non-armored PGP message. We need | ||
2501 | 160 | to do this before checking for armor lines, so that we don't get | ||
2502 | 161 | fooled by armored messages inside a signed binary PGP message. */ | ||
2503 | 162 | if ((data[0] & 0x80)) | ||
2504 | 163 | { | ||
2505 | 164 | /* That might be a binary PGP message. At least it is not plain | ||
2506 | 165 | ASCII. Of course this might be certain lead-in text of | ||
2507 | 166 | armored CMS messages. However, I am not sure whether this is | ||
2508 | 167 | at all defined and in any case it is uncommon. Thus we don't | ||
2509 | 168 | do any further plausibility checks but stupidly assume no CMS | ||
2510 | 169 | armored data will follow. */ | ||
2511 | 170 | return GPGME_DATA_TYPE_UNKNOWN; | ||
2512 | 171 | } | ||
2513 | 172 | |||
2514 | 173 | /* Now check whether there are armor lines. */ | ||
2515 | 174 | for (s = data; s && *s; s = (*s=='\n')?(s+1):((s=strchr (s,'\n'))?(s+1):s)) | ||
2516 | 175 | { | ||
2517 | 176 | if (!strncmp (s, "-----BEGIN ", 11)) | ||
2518 | 177 | { | ||
2519 | 178 | if (!strncmp (s+11, "SIGNED ", 7)) | ||
2520 | 179 | return GPGME_DATA_TYPE_CMS_SIGNED; | ||
2521 | 180 | if (!strncmp (s+11, "ENCRYPTED ", 10)) | ||
2522 | 181 | return GPGME_DATA_TYPE_CMS_ENCRYPTED; | ||
2523 | 182 | if (!strncmp (s+11, "PGP ", 4)) | ||
2524 | 183 | { | ||
2525 | 184 | if (!strncmp (s+15, "SIGNATURE", 9)) | ||
2526 | 185 | return GPGME_DATA_TYPE_PGP_SIGNED; | ||
2527 | 186 | if (!strncmp (s+15, "SIGNED MESSAGE", 14)) | ||
2528 | 187 | return GPGME_DATA_TYPE_PGP_SIGNED; | ||
2529 | 188 | if (!strncmp (s+15, "PUBLIC KEY BLOCK", 16)) | ||
2530 | 189 | return GPGME_DATA_TYPE_PGP_KEY; | ||
2531 | 190 | if (!strncmp (s+15, "PRIVATE KEY BLOCK", 17)) | ||
2532 | 191 | return GPGME_DATA_TYPE_PGP_KEY; | ||
2533 | 192 | if (!strncmp (s+15, "SECRET KEY BLOCK", 16)) | ||
2534 | 193 | return GPGME_DATA_TYPE_PGP_KEY; | ||
2535 | 194 | if (!strncmp (s+15, "ARMORED FILE", 12)) | ||
2536 | 195 | return GPGME_DATA_TYPE_UNKNOWN; | ||
2537 | 196 | return GPGME_DATA_TYPE_PGP_OTHER; /* PGP MESSAGE */ | ||
2538 | 197 | } | ||
2539 | 198 | if (!strncmp (s+11, "CERTIFICATE", 11)) | ||
2540 | 199 | return GPGME_DATA_TYPE_X509_CERT; | ||
2541 | 200 | if (!strncmp (s+11, "PKCS12", 6)) | ||
2542 | 201 | return GPGME_DATA_TYPE_PKCS12; | ||
2543 | 202 | return GPGME_DATA_TYPE_CMS_OTHER; /* Not PGP, thus we assume CMS. */ | ||
2544 | 203 | } | ||
2545 | 204 | } | ||
2546 | 205 | |||
2547 | 206 | return GPGME_DATA_TYPE_UNKNOWN; | ||
2548 | 207 | } | ||
2549 | 208 | |||
2550 | 209 | |||
2551 | 210 | /* Try to detect the type of the data. Note that this function works | ||
2552 | 211 | only on seekable data objects. The function tries to reset the | ||
2553 | 212 | file pointer but there is no guarantee that it will work. | ||
2554 | 213 | |||
2555 | 214 | FIXME: We may want to add internal buffering so that this function | ||
2556 | 215 | can be implemented for allmost all kind of data objects. | ||
2557 | 216 | */ | ||
2558 | 217 | gpgme_data_type_t | ||
2559 | 218 | gpgme_data_identify (gpgme_data_t dh, int reserved) | ||
2560 | 219 | { | ||
2561 | 220 | gpgme_data_type_t result; | ||
2562 | 221 | char *sample; | ||
2563 | 222 | int n; | ||
2564 | 223 | gpgme_off_t off; | ||
2565 | 224 | |||
2566 | 225 | /* Check whether we can seek the data object. */ | ||
2567 | 226 | off = gpgme_data_seek (dh, 0, SEEK_CUR); | ||
2568 | 227 | if (off == (gpgme_off_t)(-1)) | ||
2569 | 228 | return GPGME_DATA_TYPE_INVALID; | ||
2570 | 229 | |||
2571 | 230 | /* Allocate a buffer and read the data. */ | ||
2572 | 231 | sample = malloc (SAMPLE_SIZE); | ||
2573 | 232 | if (!sample) | ||
2574 | 233 | return GPGME_DATA_TYPE_INVALID; /* Ooops. */ | ||
2575 | 234 | n = gpgme_data_read (dh, sample, SAMPLE_SIZE - 1); | ||
2576 | 235 | if (n < 0) | ||
2577 | 236 | { | ||
2578 | 237 | free (sample); | ||
2579 | 238 | return GPGME_DATA_TYPE_INVALID; /* Ooops. */ | ||
2580 | 239 | } | ||
2581 | 240 | sample[n] = 0; /* (Required for our string functions.) */ | ||
2582 | 241 | |||
2583 | 242 | result = basic_detection (sample, n); | ||
2584 | 243 | free (sample); | ||
2585 | 244 | gpgme_data_seek (dh, off, SEEK_SET); | ||
2586 | 245 | |||
2587 | 246 | return result; | ||
2588 | 247 | } | ||
2589 | 0 | 248 | ||
2590 | === modified file 'src/dirinfo.c' | |||
2591 | --- src/dirinfo.c 2013-05-14 20:29:20 +0000 | |||
2592 | +++ src/dirinfo.c 2013-10-23 07:14:02 +0000 | |||
2593 | @@ -1,5 +1,5 @@ | |||
2594 | 1 | /* dirinfo.c - Get directory information | 1 | /* dirinfo.c - Get directory information |
2596 | 2 | * Copyright (C) 2009 g10 Code GmbH | 2 | * Copyright (C) 2009, 2013 g10 Code GmbH |
2597 | 3 | * | 3 | * |
2598 | 4 | * This file is part of GPGME. | 4 | * This file is part of GPGME. |
2599 | 5 | * | 5 | * |
2600 | @@ -29,6 +29,7 @@ | |||
2601 | 29 | #include "priv-io.h" | 29 | #include "priv-io.h" |
2602 | 30 | #include "debug.h" | 30 | #include "debug.h" |
2603 | 31 | #include "sema.h" | 31 | #include "sema.h" |
2604 | 32 | #include "sys-util.h" | ||
2605 | 32 | 33 | ||
2606 | 33 | DEFINE_STATIC_LOCK (dirinfo_lock); | 34 | DEFINE_STATIC_LOCK (dirinfo_lock); |
2607 | 34 | 35 | ||
2608 | @@ -36,7 +37,11 @@ | |||
2609 | 36 | enum | 37 | enum |
2610 | 37 | { | 38 | { |
2611 | 38 | WANT_HOMEDIR, | 39 | WANT_HOMEDIR, |
2613 | 39 | WANT_AGENT_SOCKET | 40 | WANT_AGENT_SOCKET, |
2614 | 41 | WANT_GPG_NAME, | ||
2615 | 42 | WANT_GPGSM_NAME, | ||
2616 | 43 | WANT_G13_NAME, | ||
2617 | 44 | WANT_UISRV_SOCKET | ||
2618 | 40 | }; | 45 | }; |
2619 | 41 | 46 | ||
2620 | 42 | /* Values retrieved via gpgconf and cached here. */ | 47 | /* Values retrieved via gpgconf and cached here. */ |
2621 | @@ -44,13 +49,18 @@ | |||
2622 | 44 | int valid; /* Cached information is valid. */ | 49 | int valid; /* Cached information is valid. */ |
2623 | 45 | char *homedir; | 50 | char *homedir; |
2624 | 46 | char *agent_socket; | 51 | char *agent_socket; |
2625 | 52 | char *gpg_name; | ||
2626 | 53 | char *gpgsm_name; | ||
2627 | 54 | char *g13_name; | ||
2628 | 55 | char *uisrv_socket; | ||
2629 | 47 | } dirinfo; | 56 | } dirinfo; |
2630 | 48 | 57 | ||
2631 | 49 | 58 | ||
2632 | 50 | /* Parse the output of "gpgconf --list-dirs". This function expects | 59 | /* Parse the output of "gpgconf --list-dirs". This function expects |
2634 | 51 | that DIRINFO_LOCK is held by the caller. */ | 60 | that DIRINFO_LOCK is held by the caller. If COMPONENTS is set, the |
2635 | 61 | output of --list-components is expected. */ | ||
2636 | 52 | static void | 62 | static void |
2638 | 53 | parse_output (char *line) | 63 | parse_output (char *line, int components) |
2639 | 54 | { | 64 | { |
2640 | 55 | char *value, *p; | 65 | char *value, *p; |
2641 | 56 | 66 | ||
2642 | @@ -58,6 +68,14 @@ | |||
2643 | 58 | if (!value) | 68 | if (!value) |
2644 | 59 | return; | 69 | return; |
2645 | 60 | *value++ = 0; | 70 | *value++ = 0; |
2646 | 71 | if (components) | ||
2647 | 72 | { | ||
2648 | 73 | /* Skip the second field. */ | ||
2649 | 74 | value = strchr (value, ':'); | ||
2650 | 75 | if (!value) | ||
2651 | 76 | return; | ||
2652 | 77 | *value++ = 0; | ||
2653 | 78 | } | ||
2654 | 61 | p = strchr (value, ':'); | 79 | p = strchr (value, ':'); |
2655 | 62 | if (p) | 80 | if (p) |
2656 | 63 | *p = 0; | 81 | *p = 0; |
2657 | @@ -66,19 +84,45 @@ | |||
2658 | 66 | if (!*value) | 84 | if (!*value) |
2659 | 67 | return; | 85 | return; |
2660 | 68 | 86 | ||
2665 | 69 | if (!strcmp (line, "homedir") && !dirinfo.homedir) | 87 | if (components) |
2666 | 70 | dirinfo.homedir = strdup (value); | 88 | { |
2667 | 71 | else if (!strcmp (line, "agent-socket") && !dirinfo.agent_socket) | 89 | if (!strcmp (line, "gpg") && !dirinfo.gpg_name) |
2668 | 72 | dirinfo.agent_socket = strdup (value); | 90 | dirinfo.gpg_name = strdup (value); |
2669 | 91 | else if (!strcmp (line, "gpgsm") && !dirinfo.gpgsm_name) | ||
2670 | 92 | dirinfo.gpgsm_name = strdup (value); | ||
2671 | 93 | else if (!strcmp (line, "g13") && !dirinfo.g13_name) | ||
2672 | 94 | dirinfo.g13_name = strdup (value); | ||
2673 | 95 | } | ||
2674 | 96 | else | ||
2675 | 97 | { | ||
2676 | 98 | if (!strcmp (line, "homedir") && !dirinfo.homedir) | ||
2677 | 99 | { | ||
2678 | 100 | const char name[] = "S.uiserver"; | ||
2679 | 101 | |||
2680 | 102 | dirinfo.homedir = strdup (value); | ||
2681 | 103 | if (dirinfo.homedir) | ||
2682 | 104 | { | ||
2683 | 105 | dirinfo.uisrv_socket = malloc (strlen (dirinfo | ||
2684 | 106 | .homedir) | ||
2685 | 107 | + 1 + strlen (name) + 1); | ||
2686 | 108 | if (dirinfo.uisrv_socket) | ||
2687 | 109 | strcpy (stpcpy (stpcpy (dirinfo.uisrv_socket, dirinfo.homedir), | ||
2688 | 110 | DIRSEP_S), name); | ||
2689 | 111 | } | ||
2690 | 112 | } | ||
2691 | 113 | else if (!strcmp (line, "agent-socket") && !dirinfo.agent_socket) | ||
2692 | 114 | dirinfo.agent_socket = strdup (value); | ||
2693 | 115 | } | ||
2694 | 73 | } | 116 | } |
2695 | 74 | 117 | ||
2696 | 75 | 118 | ||
2697 | 76 | /* Read the directory information from gpgconf. This function expects | 119 | /* Read the directory information from gpgconf. This function expects |
2699 | 77 | that DIRINFO_LOCK is held by the caller. */ | 120 | that DIRINFO_LOCK is held by the caller. PGNAME is the name of the |
2700 | 121 | gpgconf binary. If COMPONENTS is set, not the directories bit the | ||
2701 | 122 | name of the componeNts are read. */ | ||
2702 | 78 | static void | 123 | static void |
2704 | 79 | read_gpgconf_dirs (void) | 124 | read_gpgconf_dirs (const char *pgmname, int components) |
2705 | 80 | { | 125 | { |
2706 | 81 | const char *pgmname; | ||
2707 | 82 | char linebuf[1024] = {0}; | 126 | char linebuf[1024] = {0}; |
2708 | 83 | int linelen = 0; | 127 | int linelen = 0; |
2709 | 84 | char * argv[3]; | 128 | char * argv[3]; |
2710 | @@ -89,12 +133,8 @@ | |||
2711 | 89 | int nread; | 133 | int nread; |
2712 | 90 | char *mark = NULL; | 134 | char *mark = NULL; |
2713 | 91 | 135 | ||
2714 | 92 | pgmname = _gpgme_get_gpgconf_path (); | ||
2715 | 93 | if (!pgmname) | ||
2716 | 94 | return; /* No way. */ | ||
2717 | 95 | |||
2718 | 96 | argv[0] = (char *)pgmname; | 136 | argv[0] = (char *)pgmname; |
2720 | 97 | argv[1] = "--list-dirs"; | 137 | argv[1] = components? "--list-components" : "--list-dirs"; |
2721 | 98 | argv[2] = NULL; | 138 | argv[2] = NULL; |
2722 | 99 | 139 | ||
2723 | 100 | if (_gpgme_io_pipe (rp, 1) < 0) | 140 | if (_gpgme_io_pipe (rp, 1) < 0) |
2724 | @@ -132,7 +172,7 @@ | |||
2725 | 132 | else | 172 | else |
2726 | 133 | mark[0] = '\0'; | 173 | mark[0] = '\0'; |
2727 | 134 | 174 | ||
2729 | 135 | parse_output (line); | 175 | parse_output (line, components); |
2730 | 136 | } | 176 | } |
2731 | 137 | 177 | ||
2732 | 138 | nused = lastmark? (lastmark + 1 - linebuf) : 0; | 178 | nused = lastmark? (lastmark + 1 - linebuf) : 0; |
2733 | @@ -147,14 +187,38 @@ | |||
2734 | 147 | 187 | ||
2735 | 148 | 188 | ||
2736 | 149 | static const char * | 189 | static const char * |
2738 | 150 | get_gpgconf_dir (int what) | 190 | get_gpgconf_item (int what) |
2739 | 151 | { | 191 | { |
2740 | 152 | const char *result = NULL; | 192 | const char *result = NULL; |
2741 | 153 | 193 | ||
2742 | 154 | LOCK (dirinfo_lock); | 194 | LOCK (dirinfo_lock); |
2743 | 155 | if (!dirinfo.valid) | 195 | if (!dirinfo.valid) |
2744 | 156 | { | 196 | { |
2746 | 157 | read_gpgconf_dirs (); | 197 | const char *pgmname; |
2747 | 198 | |||
2748 | 199 | pgmname = _gpgme_get_gpgconf_path (); | ||
2749 | 200 | if (pgmname && access (pgmname, F_OK)) | ||
2750 | 201 | { | ||
2751 | 202 | _gpgme_debug (DEBUG_INIT, | ||
2752 | 203 | "gpgme_dinfo: gpgconf='%s' [not installed]\n", pgmname); | ||
2753 | 204 | pgmname = NULL; /* Not available. */ | ||
2754 | 205 | } | ||
2755 | 206 | else | ||
2756 | 207 | _gpgme_debug (DEBUG_INIT, "gpgme_dinfo: gpgconf='%s'\n", | ||
2757 | 208 | pgmname? pgmname : "[null]"); | ||
2758 | 209 | if (!pgmname) | ||
2759 | 210 | { | ||
2760 | 211 | /* Probably gpgconf is not installed. Assume we are using | ||
2761 | 212 | GnuPG-1. */ | ||
2762 | 213 | pgmname = _gpgme_get_gpg_path (); | ||
2763 | 214 | if (pgmname) | ||
2764 | 215 | dirinfo.gpg_name = strdup (pgmname); | ||
2765 | 216 | } | ||
2766 | 217 | else | ||
2767 | 218 | { | ||
2768 | 219 | read_gpgconf_dirs (pgmname, 0); | ||
2769 | 220 | read_gpgconf_dirs (pgmname, 1); | ||
2770 | 221 | } | ||
2771 | 158 | /* Even if the reading of the directories failed (e.g. due to an | 222 | /* Even if the reading of the directories failed (e.g. due to an |
2772 | 159 | too old version gpgconf or no gpgconf at all), we need to | 223 | too old version gpgconf or no gpgconf at all), we need to |
2773 | 160 | mark the entries as valid so that we won't try over and over | 224 | mark the entries as valid so that we won't try over and over |
2774 | @@ -162,11 +226,33 @@ | |||
2775 | 162 | the read values later because they are practically statically | 226 | the read values later because they are practically statically |
2776 | 163 | allocated. */ | 227 | allocated. */ |
2777 | 164 | dirinfo.valid = 1; | 228 | dirinfo.valid = 1; |
2778 | 229 | if (dirinfo.gpg_name) | ||
2779 | 230 | _gpgme_debug (DEBUG_INIT, "gpgme_dinfo: gpg='%s'\n", | ||
2780 | 231 | dirinfo.gpg_name); | ||
2781 | 232 | if (dirinfo.g13_name) | ||
2782 | 233 | _gpgme_debug (DEBUG_INIT, "gpgme_dinfo: g13='%s'\n", | ||
2783 | 234 | dirinfo.g13_name); | ||
2784 | 235 | if (dirinfo.gpgsm_name) | ||
2785 | 236 | _gpgme_debug (DEBUG_INIT, "gpgme_dinfo: gpgsm='%s'\n", | ||
2786 | 237 | dirinfo.gpgsm_name); | ||
2787 | 238 | if (dirinfo.homedir) | ||
2788 | 239 | _gpgme_debug (DEBUG_INIT, "gpgme_dinfo: homedir='%s'\n", | ||
2789 | 240 | dirinfo.homedir); | ||
2790 | 241 | if (dirinfo.agent_socket) | ||
2791 | 242 | _gpgme_debug (DEBUG_INIT, "gpgme_dinfo: agent='%s'\n", | ||
2792 | 243 | dirinfo.agent_socket); | ||
2793 | 244 | if (dirinfo.uisrv_socket) | ||
2794 | 245 | _gpgme_debug (DEBUG_INIT, "gpgme_dinfo: uisrv='%s'\n", | ||
2795 | 246 | dirinfo.uisrv_socket); | ||
2796 | 165 | } | 247 | } |
2797 | 166 | switch (what) | 248 | switch (what) |
2798 | 167 | { | 249 | { |
2799 | 168 | case WANT_HOMEDIR: result = dirinfo.homedir; break; | 250 | case WANT_HOMEDIR: result = dirinfo.homedir; break; |
2800 | 169 | case WANT_AGENT_SOCKET: result = dirinfo.agent_socket; break; | 251 | case WANT_AGENT_SOCKET: result = dirinfo.agent_socket; break; |
2801 | 252 | case WANT_GPG_NAME: result = dirinfo.gpg_name; break; | ||
2802 | 253 | case WANT_GPGSM_NAME: result = dirinfo.gpgsm_name; break; | ||
2803 | 254 | case WANT_G13_NAME: result = dirinfo.g13_name; break; | ||
2804 | 255 | case WANT_UISRV_SOCKET: result = dirinfo.uisrv_socket; break; | ||
2805 | 170 | } | 256 | } |
2806 | 171 | UNLOCK (dirinfo_lock); | 257 | UNLOCK (dirinfo_lock); |
2807 | 172 | return result; | 258 | return result; |
2808 | @@ -177,13 +263,51 @@ | |||
2809 | 177 | const char * | 263 | const char * |
2810 | 178 | _gpgme_get_default_homedir (void) | 264 | _gpgme_get_default_homedir (void) |
2811 | 179 | { | 265 | { |
2813 | 180 | return get_gpgconf_dir (WANT_HOMEDIR); | 266 | return get_gpgconf_item (WANT_HOMEDIR); |
2814 | 181 | } | 267 | } |
2815 | 182 | 268 | ||
2816 | 183 | /* Return the default gpg-agent socket name. Returns NULL if not known. */ | 269 | /* Return the default gpg-agent socket name. Returns NULL if not known. */ |
2817 | 184 | const char * | 270 | const char * |
2818 | 185 | _gpgme_get_default_agent_socket (void) | 271 | _gpgme_get_default_agent_socket (void) |
2819 | 186 | { | 272 | { |
2823 | 187 | return get_gpgconf_dir (WANT_AGENT_SOCKET); | 273 | return get_gpgconf_item (WANT_AGENT_SOCKET); |
2824 | 188 | } | 274 | } |
2825 | 189 | 275 | ||
2826 | 276 | /* Return the default gpg file name. Returns NULL if not known. */ | ||
2827 | 277 | const char * | ||
2828 | 278 | _gpgme_get_default_gpg_name (void) | ||
2829 | 279 | { | ||
2830 | 280 | return get_gpgconf_item (WANT_GPG_NAME); | ||
2831 | 281 | } | ||
2832 | 282 | |||
2833 | 283 | /* Return the default gpgsm file name. Returns NULL if not known. */ | ||
2834 | 284 | const char * | ||
2835 | 285 | _gpgme_get_default_gpgsm_name (void) | ||
2836 | 286 | { | ||
2837 | 287 | return get_gpgconf_item (WANT_GPGSM_NAME); | ||
2838 | 288 | } | ||
2839 | 289 | |||
2840 | 290 | /* Return the default g13 file name. Returns NULL if not known. */ | ||
2841 | 291 | const char * | ||
2842 | 292 | _gpgme_get_default_g13_name (void) | ||
2843 | 293 | { | ||
2844 | 294 | return get_gpgconf_item (WANT_G13_NAME); | ||
2845 | 295 | } | ||
2846 | 296 | |||
2847 | 297 | /* Return the default gpgconf file name. Returns NULL if not known. | ||
2848 | 298 | Because gpgconf is the binary used to retrieved all these default | ||
2849 | 299 | names, this function is merely a simple wrapper around the function | ||
2850 | 300 | used to locate this binary. */ | ||
2851 | 301 | const char * | ||
2852 | 302 | _gpgme_get_default_gpgconf_name (void) | ||
2853 | 303 | { | ||
2854 | 304 | return _gpgme_get_gpgconf_path (); | ||
2855 | 305 | } | ||
2856 | 306 | |||
2857 | 307 | /* Return the default UI-server socket name. Returns NULL if not | ||
2858 | 308 | known. */ | ||
2859 | 309 | const char * | ||
2860 | 310 | _gpgme_get_default_uisrv_socket (void) | ||
2861 | 311 | { | ||
2862 | 312 | return get_gpgconf_item (WANT_UISRV_SOCKET); | ||
2863 | 313 | } | ||
2864 | 190 | 314 | ||
2865 | === modified file 'src/engine-g13.c' | |||
2866 | --- src/engine-g13.c 2013-05-14 20:29:20 +0000 | |||
2867 | +++ src/engine-g13.c 2013-10-23 07:14:02 +0000 | |||
2868 | @@ -100,7 +100,7 @@ | |||
2869 | 100 | g13_get_version (const char *file_name) | 100 | g13_get_version (const char *file_name) |
2870 | 101 | { | 101 | { |
2871 | 102 | return _gpgme_get_program_version (file_name ? file_name | 102 | return _gpgme_get_program_version (file_name ? file_name |
2873 | 103 | : _gpgme_get_g13_path ()); | 103 | : _gpgme_get_default_g13_name ()); |
2874 | 104 | } | 104 | } |
2875 | 105 | 105 | ||
2876 | 106 | 106 | ||
2877 | @@ -251,11 +251,11 @@ | |||
2878 | 251 | 251 | ||
2879 | 252 | #if USE_DESCRIPTOR_PASSING | 252 | #if USE_DESCRIPTOR_PASSING |
2880 | 253 | err = assuan_pipe_connect | 253 | err = assuan_pipe_connect |
2882 | 254 | (g13->assuan_ctx, file_name ? file_name : _gpgme_get_g13_path (), | 254 | (g13->assuan_ctx, file_name ? file_name : _gpgme_get_default_g13_name (), |
2883 | 255 | argv, NULL, NULL, NULL, ASSUAN_PIPE_CONNECT_FDPASSING); | 255 | argv, NULL, NULL, NULL, ASSUAN_PIPE_CONNECT_FDPASSING); |
2884 | 256 | #else | 256 | #else |
2885 | 257 | err = assuan_pipe_connect | 257 | err = assuan_pipe_connect |
2887 | 258 | (g13->assuan_ctx, file_name ? file_name : _gpgme_get_g13_path (), | 258 | (g13->assuan_ctx, file_name ? file_name : _gpgme_get_default_g13_name (), |
2888 | 259 | argv, NULL, NULL, NULL, 0); | 259 | argv, NULL, NULL, NULL, 0); |
2889 | 260 | #endif | 260 | #endif |
2890 | 261 | if (err) | 261 | if (err) |
2891 | @@ -757,7 +757,7 @@ | |||
2892 | 757 | struct engine_ops _gpgme_engine_ops_g13 = | 757 | struct engine_ops _gpgme_engine_ops_g13 = |
2893 | 758 | { | 758 | { |
2894 | 759 | /* Static functions. */ | 759 | /* Static functions. */ |
2896 | 760 | _gpgme_get_g13_path, | 760 | _gpgme_get_default_g13_name, |
2897 | 761 | NULL, | 761 | NULL, |
2898 | 762 | g13_get_version, | 762 | g13_get_version, |
2899 | 763 | g13_get_req_version, | 763 | g13_get_req_version, |
2900 | 764 | 764 | ||
2901 | === modified file 'src/engine-gpg.c' | |||
2902 | --- src/engine-gpg.c 2013-05-29 18:33:42 +0000 | |||
2903 | +++ src/engine-gpg.c 2013-10-23 07:14:02 +0000 | |||
2904 | @@ -296,7 +296,7 @@ | |||
2905 | 296 | gpg_get_version (const char *file_name) | 296 | gpg_get_version (const char *file_name) |
2906 | 297 | { | 297 | { |
2907 | 298 | return _gpgme_get_program_version (file_name ? file_name | 298 | return _gpgme_get_program_version (file_name ? file_name |
2909 | 299 | : _gpgme_get_gpg_path ()); | 299 | : _gpgme_get_default_gpg_name ()); |
2910 | 300 | } | 300 | } |
2911 | 301 | 301 | ||
2912 | 302 | 302 | ||
2913 | @@ -1296,7 +1296,7 @@ | |||
2914 | 1296 | if (!gpg) | 1296 | if (!gpg) |
2915 | 1297 | return gpg_error (GPG_ERR_INV_VALUE); | 1297 | return gpg_error (GPG_ERR_INV_VALUE); |
2916 | 1298 | 1298 | ||
2918 | 1299 | if (!gpg->file_name && !_gpgme_get_gpg_path ()) | 1299 | if (!gpg->file_name && !_gpgme_get_default_gpg_name ()) |
2919 | 1300 | return trace_gpg_error (GPG_ERR_INV_ENGINE); | 1300 | return trace_gpg_error (GPG_ERR_INV_ENGINE); |
2920 | 1301 | 1301 | ||
2921 | 1302 | if (gpg->lc_ctype) | 1302 | if (gpg->lc_ctype) |
2922 | @@ -1352,7 +1352,7 @@ | |||
2923 | 1352 | fd_list[n].dup_to = -1; | 1352 | fd_list[n].dup_to = -1; |
2924 | 1353 | 1353 | ||
2925 | 1354 | status = _gpgme_io_spawn (gpg->file_name ? gpg->file_name : | 1354 | status = _gpgme_io_spawn (gpg->file_name ? gpg->file_name : |
2927 | 1355 | _gpgme_get_gpg_path (), gpg->argv, | 1355 | _gpgme_get_default_gpg_name (), gpg->argv, |
2928 | 1356 | IOSPAWN_FLAG_ALLOW_SET_FG, | 1356 | IOSPAWN_FLAG_ALLOW_SET_FG, |
2929 | 1357 | fd_list, NULL, NULL, &pid); | 1357 | fd_list, NULL, NULL, &pid); |
2930 | 1358 | { | 1358 | { |
2931 | @@ -2401,7 +2401,7 @@ | |||
2932 | 2401 | struct engine_ops _gpgme_engine_ops_gpg = | 2401 | struct engine_ops _gpgme_engine_ops_gpg = |
2933 | 2402 | { | 2402 | { |
2934 | 2403 | /* Static functions. */ | 2403 | /* Static functions. */ |
2936 | 2404 | _gpgme_get_gpg_path, | 2404 | _gpgme_get_default_gpg_name, |
2937 | 2405 | NULL, | 2405 | NULL, |
2938 | 2406 | gpg_get_version, | 2406 | gpg_get_version, |
2939 | 2407 | gpg_get_req_version, | 2407 | gpg_get_req_version, |
2940 | 2408 | 2408 | ||
2941 | === modified file 'src/engine-gpgconf.c' | |||
2942 | --- src/engine-gpgconf.c 2013-05-14 20:29:20 +0000 | |||
2943 | +++ src/engine-gpgconf.c 2013-10-23 07:14:02 +0000 | |||
2944 | @@ -61,7 +61,7 @@ | |||
2945 | 61 | gpgconf_get_version (const char *file_name) | 61 | gpgconf_get_version (const char *file_name) |
2946 | 62 | { | 62 | { |
2947 | 63 | return _gpgme_get_program_version (file_name ? file_name | 63 | return _gpgme_get_program_version (file_name ? file_name |
2949 | 64 | : _gpgme_get_gpgconf_path ()); | 64 | : _gpgme_get_default_gpgconf_name ()); |
2950 | 65 | } | 65 | } |
2951 | 66 | 66 | ||
2952 | 67 | 67 | ||
2953 | @@ -100,7 +100,7 @@ | |||
2954 | 100 | return gpg_error_from_syserror (); | 100 | return gpg_error_from_syserror (); |
2955 | 101 | 101 | ||
2956 | 102 | gpgconf->file_name = strdup (file_name ? file_name | 102 | gpgconf->file_name = strdup (file_name ? file_name |
2958 | 103 | : _gpgme_get_gpgconf_path ()); | 103 | : _gpgme_get_default_gpgconf_name ()); |
2959 | 104 | if (!gpgconf->file_name) | 104 | if (!gpgconf->file_name) |
2960 | 105 | err = gpg_error_from_syserror (); | 105 | err = gpg_error_from_syserror (); |
2961 | 106 | 106 | ||
2962 | @@ -923,7 +923,7 @@ | |||
2963 | 923 | struct engine_ops _gpgme_engine_ops_gpgconf = | 923 | struct engine_ops _gpgme_engine_ops_gpgconf = |
2964 | 924 | { | 924 | { |
2965 | 925 | /* Static functions. */ | 925 | /* Static functions. */ |
2967 | 926 | _gpgme_get_gpgconf_path, | 926 | _gpgme_get_default_gpgconf_name, |
2968 | 927 | NULL, | 927 | NULL, |
2969 | 928 | gpgconf_get_version, | 928 | gpgconf_get_version, |
2970 | 929 | gpgconf_get_req_version, | 929 | gpgconf_get_req_version, |
2971 | 930 | 930 | ||
2972 | === modified file 'src/engine-gpgsm.c' | |||
2973 | --- src/engine-gpgsm.c 2013-05-29 18:33:42 +0000 | |||
2974 | +++ src/engine-gpgsm.c 2013-10-23 07:14:02 +0000 | |||
2975 | @@ -120,7 +120,7 @@ | |||
2976 | 120 | gpgsm_get_version (const char *file_name) | 120 | gpgsm_get_version (const char *file_name) |
2977 | 121 | { | 121 | { |
2978 | 122 | return _gpgme_get_program_version (file_name ? file_name | 122 | return _gpgme_get_program_version (file_name ? file_name |
2980 | 123 | : _gpgme_get_gpgsm_path ()); | 123 | : _gpgme_get_default_gpgsm_name ()); |
2981 | 124 | } | 124 | } |
2982 | 125 | 125 | ||
2983 | 126 | 126 | ||
2984 | @@ -340,7 +340,8 @@ | |||
2985 | 340 | 340 | ||
2986 | 341 | #if USE_DESCRIPTOR_PASSING | 341 | #if USE_DESCRIPTOR_PASSING |
2987 | 342 | err = assuan_pipe_connect | 342 | err = assuan_pipe_connect |
2989 | 343 | (gpgsm->assuan_ctx, file_name ? file_name : _gpgme_get_gpgsm_path (), | 343 | (gpgsm->assuan_ctx, |
2990 | 344 | file_name ? file_name : _gpgme_get_default_gpgsm_name (), | ||
2991 | 344 | argv, NULL, NULL, NULL, ASSUAN_PIPE_CONNECT_FDPASSING); | 345 | argv, NULL, NULL, NULL, ASSUAN_PIPE_CONNECT_FDPASSING); |
2992 | 345 | #else | 346 | #else |
2993 | 346 | { | 347 | { |
2994 | @@ -352,7 +353,8 @@ | |||
2995 | 352 | achild_fds[i] = (assuan_fd_t) child_fds[i]; | 353 | achild_fds[i] = (assuan_fd_t) child_fds[i]; |
2996 | 353 | 354 | ||
2997 | 354 | err = assuan_pipe_connect | 355 | err = assuan_pipe_connect |
2999 | 355 | (gpgsm->assuan_ctx, file_name ? file_name : _gpgme_get_gpgsm_path (), | 356 | (gpgsm->assuan_ctx, |
3000 | 357 | file_name ? file_name : _gpgme_get_default_gpgsm_name (), | ||
3001 | 356 | argv, achild_fds, NULL, NULL, 0); | 358 | argv, achild_fds, NULL, NULL, 0); |
3002 | 357 | 359 | ||
3003 | 358 | /* For now... */ | 360 | /* For now... */ |
3004 | @@ -1945,7 +1947,7 @@ | |||
3005 | 1945 | struct engine_ops _gpgme_engine_ops_gpgsm = | 1947 | struct engine_ops _gpgme_engine_ops_gpgsm = |
3006 | 1946 | { | 1948 | { |
3007 | 1947 | /* Static functions. */ | 1949 | /* Static functions. */ |
3009 | 1948 | _gpgme_get_gpgsm_path, | 1950 | _gpgme_get_default_gpgsm_name, |
3010 | 1949 | NULL, | 1951 | NULL, |
3011 | 1950 | gpgsm_get_version, | 1952 | gpgsm_get_version, |
3012 | 1951 | gpgsm_get_req_version, | 1953 | gpgsm_get_req_version, |
3013 | 1952 | 1954 | ||
3014 | === modified file 'src/engine-uiserver.c' | |||
3015 | --- src/engine-uiserver.c 2013-05-29 18:33:42 +0000 | |||
3016 | +++ src/engine-uiserver.c 2013-10-23 07:14:02 +0000 | |||
3017 | @@ -296,7 +296,7 @@ | |||
3018 | 296 | 296 | ||
3019 | 297 | err = assuan_socket_connect (uiserver->assuan_ctx, | 297 | err = assuan_socket_connect (uiserver->assuan_ctx, |
3020 | 298 | file_name ? | 298 | file_name ? |
3022 | 299 | file_name : _gpgme_get_uiserver_socket_path (), | 299 | file_name : _gpgme_get_default_uisrv_socket (), |
3023 | 300 | 0, ASSUAN_SOCKET_SERVER_FDPASSING); | 300 | 0, ASSUAN_SOCKET_SERVER_FDPASSING); |
3024 | 301 | if (err) | 301 | if (err) |
3025 | 302 | goto leave; | 302 | goto leave; |
3026 | @@ -1302,7 +1302,7 @@ | |||
3027 | 1302 | struct engine_ops _gpgme_engine_ops_uiserver = | 1302 | struct engine_ops _gpgme_engine_ops_uiserver = |
3028 | 1303 | { | 1303 | { |
3029 | 1304 | /* Static functions. */ | 1304 | /* Static functions. */ |
3031 | 1305 | _gpgme_get_uiserver_socket_path, | 1305 | _gpgme_get_default_uisrv_socket, |
3032 | 1306 | NULL, | 1306 | NULL, |
3033 | 1307 | uiserver_get_version, | 1307 | uiserver_get_version, |
3034 | 1308 | uiserver_get_req_version, | 1308 | uiserver_get_req_version, |
3035 | 1309 | 1309 | ||
3036 | === modified file 'src/gpgme-tool.c' | |||
3037 | --- src/gpgme-tool.c 2013-05-29 18:33:42 +0000 | |||
3038 | +++ src/gpgme-tool.c 2013-10-23 07:14:02 +0000 | |||
3039 | @@ -1435,7 +1435,8 @@ | |||
3040 | 1435 | STATUS_INCLUDE_CERTS, | 1435 | STATUS_INCLUDE_CERTS, |
3041 | 1436 | STATUS_KEYLIST_MODE, | 1436 | STATUS_KEYLIST_MODE, |
3042 | 1437 | STATUS_RECIPIENT, | 1437 | STATUS_RECIPIENT, |
3044 | 1438 | STATUS_ENCRYPT_RESULT | 1438 | STATUS_ENCRYPT_RESULT, |
3045 | 1439 | STATUS_IDENTIFY_RESULT | ||
3046 | 1439 | } status_t; | 1440 | } status_t; |
3047 | 1440 | 1441 | ||
3048 | 1441 | const char *status_string[] = | 1442 | const char *status_string[] = |
3049 | @@ -1448,7 +1449,8 @@ | |||
3050 | 1448 | "INCLUDE_CERTS", | 1449 | "INCLUDE_CERTS", |
3051 | 1449 | "KEYLIST_MODE", | 1450 | "KEYLIST_MODE", |
3052 | 1450 | "RECIPIENT", | 1451 | "RECIPIENT", |
3054 | 1451 | "ENCRYPT_RESULT" | 1452 | "ENCRYPT_RESULT", |
3055 | 1453 | "IDENTIFY_RESULT" | ||
3056 | 1452 | }; | 1454 | }; |
3057 | 1453 | 1455 | ||
3058 | 1454 | struct gpgme_tool | 1456 | struct gpgme_tool |
3059 | @@ -2065,11 +2067,6 @@ | |||
3060 | 2065 | } | 2067 | } |
3061 | 2066 | 2068 | ||
3062 | 2067 | 2069 | ||
3063 | 2068 | static const char hlp_passwd[] = | ||
3064 | 2069 | "PASSWD <user-id>\n" | ||
3065 | 2070 | "\n" | ||
3066 | 2071 | "Ask the backend to change the passphrase for the key\n" | ||
3067 | 2072 | "specified by USER-ID."; | ||
3068 | 2073 | gpg_error_t | 2070 | gpg_error_t |
3069 | 2074 | gt_passwd (gpgme_tool_t gt, char *fpr) | 2071 | gt_passwd (gpgme_tool_t gt, char *fpr) |
3070 | 2075 | { | 2072 | { |
3071 | @@ -2086,6 +2083,29 @@ | |||
3072 | 2086 | } | 2083 | } |
3073 | 2087 | 2084 | ||
3074 | 2088 | 2085 | ||
3075 | 2086 | gpg_error_t | ||
3076 | 2087 | gt_identify (gpgme_tool_t gt, gpgme_data_t data) | ||
3077 | 2088 | { | ||
3078 | 2089 | const char *s = "?"; | ||
3079 | 2090 | |||
3080 | 2091 | switch (gpgme_data_identify (data, 0)) | ||
3081 | 2092 | { | ||
3082 | 2093 | case GPGME_DATA_TYPE_INVALID: return gpg_error (GPG_ERR_GENERAL); | ||
3083 | 2094 | case GPGME_DATA_TYPE_UNKNOWN : s = "unknown"; break; | ||
3084 | 2095 | case GPGME_DATA_TYPE_PGP_SIGNED : s = "PGP-signed"; break; | ||
3085 | 2096 | case GPGME_DATA_TYPE_PGP_OTHER : s = "PGP"; break; | ||
3086 | 2097 | case GPGME_DATA_TYPE_PGP_KEY : s = "PGP-key"; break; | ||
3087 | 2098 | case GPGME_DATA_TYPE_CMS_SIGNED : s = "CMS-signed"; break; | ||
3088 | 2099 | case GPGME_DATA_TYPE_CMS_ENCRYPTED: s = "CMS-encrypted"; break; | ||
3089 | 2100 | case GPGME_DATA_TYPE_CMS_OTHER : s = "CMS"; break; | ||
3090 | 2101 | case GPGME_DATA_TYPE_X509_CERT : s = "X.509"; break; | ||
3091 | 2102 | case GPGME_DATA_TYPE_PKCS12 : s = "PKCS12"; break; | ||
3092 | 2103 | } | ||
3093 | 2104 | gt_write_status (gt, STATUS_IDENTIFY_RESULT, s, NULL); | ||
3094 | 2105 | return 0; | ||
3095 | 2106 | } | ||
3096 | 2107 | |||
3097 | 2108 | |||
3098 | 2089 | #define GT_RESULT_ENCRYPT 0x1 | 2109 | #define GT_RESULT_ENCRYPT 0x1 |
3099 | 2090 | #define GT_RESULT_DECRYPT 0x2 | 2110 | #define GT_RESULT_DECRYPT 0x2 |
3100 | 2091 | #define GT_RESULT_SIGN 0x4 | 2111 | #define GT_RESULT_SIGN 0x4 |
3101 | @@ -3374,6 +3394,11 @@ | |||
3102 | 3374 | } | 3394 | } |
3103 | 3375 | 3395 | ||
3104 | 3376 | 3396 | ||
3105 | 3397 | static const char hlp_passwd[] = | ||
3106 | 3398 | "PASSWD <user-id>\n" | ||
3107 | 3399 | "\n" | ||
3108 | 3400 | "Ask the backend to change the passphrase for the key\n" | ||
3109 | 3401 | "specified by USER-ID."; | ||
3110 | 3377 | static gpg_error_t | 3402 | static gpg_error_t |
3111 | 3378 | cmd_passwd (assuan_context_t ctx, char *line) | 3403 | cmd_passwd (assuan_context_t ctx, char *line) |
3112 | 3379 | { | 3404 | { |
3113 | @@ -3430,6 +3455,39 @@ | |||
3114 | 3430 | } | 3455 | } |
3115 | 3431 | 3456 | ||
3116 | 3432 | 3457 | ||
3117 | 3458 | static const char hlp_identify[] = | ||
3118 | 3459 | "IDENTIY\n" | ||
3119 | 3460 | "\n" | ||
3120 | 3461 | "Identify the type of data set with the INPUT command."; | ||
3121 | 3462 | static gpg_error_t | ||
3122 | 3463 | cmd_identify (assuan_context_t ctx, char *line) | ||
3123 | 3464 | { | ||
3124 | 3465 | struct server *server = assuan_get_pointer (ctx); | ||
3125 | 3466 | gpg_error_t err; | ||
3126 | 3467 | assuan_fd_t inp_fd; | ||
3127 | 3468 | char *inp_fn; | ||
3128 | 3469 | gpgme_data_t inp_data; | ||
3129 | 3470 | |||
3130 | 3471 | inp_fd = server->input_fd; | ||
3131 | 3472 | inp_fn = server->input_filename; | ||
3132 | 3473 | if (inp_fd == ASSUAN_INVALID_FD && !inp_fn) | ||
3133 | 3474 | return GPG_ERR_ASS_NO_INPUT; | ||
3134 | 3475 | |||
3135 | 3476 | err = server_data_obj (inp_fd, inp_fn, 0, server->input_enc, &inp_data, | ||
3136 | 3477 | &server->input_stream); | ||
3137 | 3478 | if (err) | ||
3138 | 3479 | return err; | ||
3139 | 3480 | |||
3140 | 3481 | err = gt_identify (server->gt, inp_data); | ||
3141 | 3482 | |||
3142 | 3483 | gpgme_data_release (inp_data); | ||
3143 | 3484 | server_reset_fds (server); | ||
3144 | 3485 | |||
3145 | 3486 | return err; | ||
3146 | 3487 | } | ||
3147 | 3488 | |||
3148 | 3489 | |||
3149 | 3490 | |||
3150 | 3433 | /* Tell the assuan library about our commands. */ | 3491 | /* Tell the assuan library about our commands. */ |
3151 | 3434 | static gpg_error_t | 3492 | static gpg_error_t |
3152 | 3435 | register_commands (assuan_context_t ctx) | 3493 | register_commands (assuan_context_t ctx) |
3153 | @@ -3488,6 +3546,7 @@ | |||
3154 | 3488 | { "PUBKEY_ALGO_NAME", cmd_pubkey_algo_name }, | 3546 | { "PUBKEY_ALGO_NAME", cmd_pubkey_algo_name }, |
3155 | 3489 | { "HASH_ALGO_NAME", cmd_hash_algo_name }, | 3547 | { "HASH_ALGO_NAME", cmd_hash_algo_name }, |
3156 | 3490 | { "PASSWD", cmd_passwd, hlp_passwd }, | 3548 | { "PASSWD", cmd_passwd, hlp_passwd }, |
3157 | 3549 | { "IDENTIFY", cmd_identify, hlp_identify }, | ||
3158 | 3491 | { NULL } | 3550 | { NULL } |
3159 | 3492 | }; | 3551 | }; |
3160 | 3493 | int idx; | 3552 | int idx; |
3161 | 3494 | 3553 | ||
3162 | === modified file 'src/gpgme.def' | |||
3163 | --- src/gpgme.def 2013-05-14 20:29:20 +0000 | |||
3164 | +++ src/gpgme.def 2013-10-23 07:14:02 +0000 | |||
3165 | @@ -209,5 +209,9 @@ | |||
3166 | 209 | gpgme_set_pinentry_mode @158 | 209 | gpgme_set_pinentry_mode @158 |
3167 | 210 | gpgme_get_pinentry_mode @159 | 210 | gpgme_get_pinentry_mode @159 |
3168 | 211 | 211 | ||
3169 | 212 | gpgme_signers_count @160 | ||
3170 | 213 | |||
3171 | 214 | gpgme_data_identify @161 | ||
3172 | 215 | |||
3173 | 212 | ; END | 216 | ; END |
3174 | 213 | 217 | ||
3175 | 214 | 218 | ||
3176 | === modified file 'src/gpgme.h.in' | |||
3177 | --- src/gpgme.h.in 2013-05-29 18:33:42 +0000 | |||
3178 | +++ src/gpgme.h.in 2013-10-23 07:14:02 +0000 | |||
3179 | @@ -210,6 +210,22 @@ | |||
3180 | 210 | } | 210 | } |
3181 | 211 | gpgme_data_encoding_t; | 211 | gpgme_data_encoding_t; |
3182 | 212 | 212 | ||
3183 | 213 | /* Known data types. */ | ||
3184 | 214 | typedef enum | ||
3185 | 215 | { | ||
3186 | 216 | GPGME_DATA_TYPE_INVALID = 0, /* Not detected. */ | ||
3187 | 217 | GPGME_DATA_TYPE_UNKNOWN = 1, | ||
3188 | 218 | GPGME_DATA_TYPE_PGP_SIGNED = 0x10, | ||
3189 | 219 | GPGME_DATA_TYPE_PGP_OTHER = 0x12, | ||
3190 | 220 | GPGME_DATA_TYPE_PGP_KEY = 0x13, | ||
3191 | 221 | GPGME_DATA_TYPE_CMS_SIGNED = 0x20, | ||
3192 | 222 | GPGME_DATA_TYPE_CMS_ENCRYPTED= 0x21, | ||
3193 | 223 | GPGME_DATA_TYPE_CMS_OTHER = 0x22, | ||
3194 | 224 | GPGME_DATA_TYPE_X509_CERT = 0x23, | ||
3195 | 225 | GPGME_DATA_TYPE_PKCS12 = 0x24, | ||
3196 | 226 | } | ||
3197 | 227 | gpgme_data_type_t; | ||
3198 | 228 | |||
3199 | 213 | 229 | ||
3200 | 214 | 230 | ||
3201 | 215 | /* Public key algorithms from libgcrypt. */ | 231 | /* Public key algorithms from libgcrypt. */ |
3202 | 216 | typedef enum | 232 | typedef enum |
3203 | @@ -934,6 +950,9 @@ | |||
3204 | 934 | /* Add KEY to list of signers in CTX. */ | 950 | /* Add KEY to list of signers in CTX. */ |
3205 | 935 | gpgme_error_t gpgme_signers_add (gpgme_ctx_t ctx, const gpgme_key_t key); | 951 | gpgme_error_t gpgme_signers_add (gpgme_ctx_t ctx, const gpgme_key_t key); |
3206 | 936 | 952 | ||
3207 | 953 | /* Return the number of signers in CTX. */ | ||
3208 | 954 | unsigned int gpgme_signers_count (const gpgme_ctx_t ctx); | ||
3209 | 955 | |||
3210 | 937 | /* Return the SEQth signer's key in CTX. */ | 956 | /* Return the SEQth signer's key in CTX. */ |
3211 | 938 | gpgme_key_t gpgme_signers_enum (const gpgme_ctx_t ctx, int seq); | 957 | gpgme_key_t gpgme_signers_enum (const gpgme_ctx_t ctx, int seq); |
3212 | 939 | 958 | ||
3213 | @@ -1146,6 +1165,9 @@ | |||
3214 | 1146 | gpgme_error_t gpgme_data_set_file_name (gpgme_data_t dh, | 1165 | gpgme_error_t gpgme_data_set_file_name (gpgme_data_t dh, |
3215 | 1147 | const char *file_name); | 1166 | const char *file_name); |
3216 | 1148 | 1167 | ||
3217 | 1168 | /* Try to identify the type of the data in DH. */ | ||
3218 | 1169 | gpgme_data_type_t gpgme_data_identify (gpgme_data_t dh, int reserved); | ||
3219 | 1170 | |||
3220 | 1149 | 1171 | ||
3221 | 1150 | /* Create a new data buffer which retrieves the data from the callback | 1172 | /* Create a new data buffer which retrieves the data from the callback |
3222 | 1151 | function READ_CB. Deprecated, please use gpgme_data_new_from_cbs | 1173 | function READ_CB. Deprecated, please use gpgme_data_new_from_cbs |
3223 | 1152 | 1174 | ||
3224 | === modified file 'src/libgpgme.vers' | |||
3225 | --- src/libgpgme.vers 2013-05-14 20:29:20 +0000 | |||
3226 | +++ src/libgpgme.vers 2013-10-23 07:14:02 +0000 | |||
3227 | @@ -29,6 +29,7 @@ | |||
3228 | 29 | 29 | ||
3229 | 30 | gpgme_data_set_file_name; | 30 | gpgme_data_set_file_name; |
3230 | 31 | gpgme_data_get_file_name; | 31 | gpgme_data_get_file_name; |
3231 | 32 | gpgme_data_identify; | ||
3232 | 32 | 33 | ||
3233 | 33 | gpgme_sig_notation_clear; | 34 | gpgme_sig_notation_clear; |
3234 | 34 | gpgme_sig_notation_add; | 35 | gpgme_sig_notation_add; |
3235 | @@ -143,6 +144,7 @@ | |||
3236 | 143 | gpgme_set_textmode; | 144 | gpgme_set_textmode; |
3237 | 144 | gpgme_signers_add; | 145 | gpgme_signers_add; |
3238 | 145 | gpgme_signers_clear; | 146 | gpgme_signers_clear; |
3239 | 147 | gpgme_signers_count; | ||
3240 | 146 | gpgme_signers_enum; | 148 | gpgme_signers_enum; |
3241 | 147 | 149 | ||
3242 | 148 | gpgme_key_ref; | 150 | gpgme_key_ref; |
3243 | 149 | 151 | ||
3244 | === added file 'src/parsetlv.c' | |||
3245 | --- src/parsetlv.c 1970-01-01 00:00:00 +0000 | |||
3246 | +++ src/parsetlv.c 2013-10-23 07:14:02 +0000 | |||
3247 | @@ -0,0 +1,103 @@ | |||
3248 | 1 | /* parsetlv.c - ASN.1 TLV functions | ||
3249 | 2 | * Copyright (C) 2005, 2007, 2008, 2012 g10 Code GmbH | ||
3250 | 3 | * | ||
3251 | 4 | * This file is free software; you can redistribute it and/or modify | ||
3252 | 5 | * it under the terms of the GNU Lesser General Public License as | ||
3253 | 6 | * published by the Free Software Foundation; either version 2.1 of | ||
3254 | 7 | * the License, or (at your option) any later version. | ||
3255 | 8 | * | ||
3256 | 9 | * This file is distributed in the hope that it will be useful, | ||
3257 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3258 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3259 | 12 | * GNU Lesser General Public License for more details. | ||
3260 | 13 | * | ||
3261 | 14 | * You should have received a copy of the GNU Lesser General Public License | ||
3262 | 15 | * along with this program; if not, see <http://www.gnu.org/licenses/>. | ||
3263 | 16 | */ | ||
3264 | 17 | |||
3265 | 18 | #ifdef HAVE_CONFIG_H | ||
3266 | 19 | # include <config.h> | ||
3267 | 20 | #endif | ||
3268 | 21 | #include <stdio.h> | ||
3269 | 22 | #include <stdlib.h> | ||
3270 | 23 | #include <string.h> | ||
3271 | 24 | |||
3272 | 25 | #include "parsetlv.h" | ||
3273 | 26 | |||
3274 | 27 | |||
3275 | 28 | /* Simple but pretty complete ASN.1 BER parser. Parse the data at the | ||
3276 | 29 | address of BUFFER with a length given at the address of SIZE. On | ||
3277 | 30 | success return 0 and update BUFFER and SIZE to point to the value. | ||
3278 | 31 | Do not update them on error. The information about the object are | ||
3279 | 32 | stored in the caller allocated TI structure. */ | ||
3280 | 33 | int | ||
3281 | 34 | _gpgme_parse_tlv (char const **buffer, size_t *size, tlvinfo_t *ti) | ||
3282 | 35 | { | ||
3283 | 36 | int c; | ||
3284 | 37 | unsigned long tag; | ||
3285 | 38 | const unsigned char *buf = (const unsigned char *)(*buffer); | ||
3286 | 39 | size_t length = *size; | ||
3287 | 40 | |||
3288 | 41 | ti->cls = 0; | ||
3289 | 42 | ti->tag = 0; | ||
3290 | 43 | ti->is_cons = 0; | ||
3291 | 44 | ti->is_ndef = 0; | ||
3292 | 45 | ti->length = 0; | ||
3293 | 46 | ti->nhdr = 0; | ||
3294 | 47 | |||
3295 | 48 | if (!length) | ||
3296 | 49 | return -1; | ||
3297 | 50 | c = *buf++; length--; ++ti->nhdr; | ||
3298 | 51 | |||
3299 | 52 | ti->cls = (c & 0xc0) >> 6; | ||
3300 | 53 | ti->is_cons = !!(c & 0x20); | ||
3301 | 54 | tag = c & 0x1f; | ||
3302 | 55 | |||
3303 | 56 | if (tag == 0x1f) | ||
3304 | 57 | { | ||
3305 | 58 | tag = 0; | ||
3306 | 59 | do | ||
3307 | 60 | { | ||
3308 | 61 | tag <<= 7; | ||
3309 | 62 | if (!length) | ||
3310 | 63 | return -1; | ||
3311 | 64 | c = *buf++; length--; ++ti->nhdr; | ||
3312 | 65 | tag |= c & 0x7f; | ||
3313 | 66 | } | ||
3314 | 67 | while (c & 0x80); | ||
3315 | 68 | } | ||
3316 | 69 | ti->tag = tag; | ||
3317 | 70 | |||
3318 | 71 | if (!length) | ||
3319 | 72 | return -1; | ||
3320 | 73 | c = *buf++; length--; ++ti->nhdr; | ||
3321 | 74 | |||
3322 | 75 | if ( !(c & 0x80) ) | ||
3323 | 76 | ti->length = c; | ||
3324 | 77 | else if (c == 0x80) | ||
3325 | 78 | ti->is_ndef = 1; | ||
3326 | 79 | else if (c == 0xff) | ||
3327 | 80 | return -1; | ||
3328 | 81 | else | ||
3329 | 82 | { | ||
3330 | 83 | unsigned long len = 0; | ||
3331 | 84 | int count = (c & 0x7f); | ||
3332 | 85 | |||
3333 | 86 | if (count > sizeof (len) || count > sizeof (size_t)) | ||
3334 | 87 | return -1; | ||
3335 | 88 | |||
3336 | 89 | for (; count; count--) | ||
3337 | 90 | { | ||
3338 | 91 | len <<= 8; | ||
3339 | 92 | if (!length) | ||
3340 | 93 | return -1; | ||
3341 | 94 | c = *buf++; length--; ++ti->nhdr; | ||
3342 | 95 | len |= c & 0xff; | ||
3343 | 96 | } | ||
3344 | 97 | ti->length = len; | ||
3345 | 98 | } | ||
3346 | 99 | |||
3347 | 100 | *buffer = (void*)buf; | ||
3348 | 101 | *size = length; | ||
3349 | 102 | return 0; | ||
3350 | 103 | } | ||
3351 | 0 | 104 | ||
3352 | === added file 'src/parsetlv.h' | |||
3353 | --- src/parsetlv.h 1970-01-01 00:00:00 +0000 | |||
3354 | +++ src/parsetlv.h 2013-10-23 07:14:02 +0000 | |||
3355 | @@ -0,0 +1,48 @@ | |||
3356 | 1 | /* parsetlv.h - TLV functions defintions | ||
3357 | 2 | * Copyright (C) 2012 g10 Code GmbH | ||
3358 | 3 | * | ||
3359 | 4 | * This file is free software; you can redistribute it and/or modify | ||
3360 | 5 | * it under the terms of the GNU Lesser General Public License as | ||
3361 | 6 | * published by the Free Software Foundation; either version 2.1 of | ||
3362 | 7 | * the License, or (at your option) any later version. | ||
3363 | 8 | * | ||
3364 | 9 | * This file is distributed in the hope that it will be useful, | ||
3365 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3366 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
3367 | 12 | * GNU Lesser General Public License for more details. | ||
3368 | 13 | * | ||
3369 | 14 | * You should have received a copy of the GNU Lesser General Public License | ||
3370 | 15 | * along with this program; if not, see <http://www.gnu.org/licenses/>. | ||
3371 | 16 | */ | ||
3372 | 17 | |||
3373 | 18 | #ifndef PARSETLV_H | ||
3374 | 19 | #define PARSETLV_H | ||
3375 | 20 | |||
3376 | 21 | /* ASN.1 constants. */ | ||
3377 | 22 | #define ASN1_CLASS_UNIVERSAL 0 | ||
3378 | 23 | #define ASN1_CLASS_APPLICATION 1 | ||
3379 | 24 | #define ASN1_CLASS_CONTEXT 2 | ||
3380 | 25 | #define ASN1_CLASS_PRIVATE 3 | ||
3381 | 26 | #define ASN1_TAG_INTEGER 2 | ||
3382 | 27 | #define ASN1_TAG_OBJECT_ID 6 | ||
3383 | 28 | #define ASN1_TAG_SEQUENCE 16 | ||
3384 | 29 | |||
3385 | 30 | |||
3386 | 31 | /* Object used with parse_tlv. */ | ||
3387 | 32 | struct tlvinfo_s | ||
3388 | 33 | { | ||
3389 | 34 | int cls; /* The class of the tag. */ | ||
3390 | 35 | int tag; /* The tag. */ | ||
3391 | 36 | int is_cons; /* True if it is a constructed object. */ | ||
3392 | 37 | int is_ndef; /* True if the object has an indefinite length. */ | ||
3393 | 38 | size_t length; /* The length of the value. */ | ||
3394 | 39 | size_t nhdr; /* The number of octets in the header (tag,length). */ | ||
3395 | 40 | }; | ||
3396 | 41 | typedef struct tlvinfo_s tlvinfo_t; | ||
3397 | 42 | |||
3398 | 43 | /*-- parsetlv.c --*/ | ||
3399 | 44 | int _gpgme_parse_tlv (char const **buffer, size_t *size, tlvinfo_t *ti); | ||
3400 | 45 | #define parse_tlv(a,b,c) _gpgme_parse_tlv ((a), (b), (c)) | ||
3401 | 46 | |||
3402 | 47 | |||
3403 | 48 | #endif /*PARSETLV_H*/ | ||
3404 | 0 | 49 | ||
3405 | === modified file 'src/posix-util.c' | |||
3406 | --- src/posix-util.c 2013-05-14 20:29:20 +0000 | |||
3407 | +++ src/posix-util.c 2013-10-23 07:14:02 +0000 | |||
3408 | @@ -28,6 +28,7 @@ | |||
3409 | 28 | #include <assert.h> | 28 | #include <assert.h> |
3410 | 29 | 29 | ||
3411 | 30 | #include "util.h" | 30 | #include "util.h" |
3412 | 31 | #include "sys-util.h" | ||
3413 | 31 | 32 | ||
3414 | 32 | const char * | 33 | const char * |
3415 | 33 | _gpgme_get_gpg_path (void) | 34 | _gpgme_get_gpg_path (void) |
3416 | @@ -70,29 +71,6 @@ | |||
3417 | 70 | } | 71 | } |
3418 | 71 | 72 | ||
3419 | 72 | 73 | ||
3420 | 73 | const char * | ||
3421 | 74 | _gpgme_get_uiserver_socket_path (void) | ||
3422 | 75 | { | ||
3423 | 76 | static char *socket_path; | ||
3424 | 77 | const char *homedir; | ||
3425 | 78 | const char name[] = "S.uiserver"; | ||
3426 | 79 | |||
3427 | 80 | if (socket_path) | ||
3428 | 81 | return socket_path; | ||
3429 | 82 | |||
3430 | 83 | homedir = _gpgme_get_default_homedir (); | ||
3431 | 84 | if (! homedir) | ||
3432 | 85 | return NULL; | ||
3433 | 86 | |||
3434 | 87 | socket_path = malloc (strlen (homedir) + 1 + strlen (name) + 1); | ||
3435 | 88 | if (! socket_path) | ||
3436 | 89 | return NULL; | ||
3437 | 90 | |||
3438 | 91 | strcpy (stpcpy (stpcpy (socket_path, homedir), "/"), name); | ||
3439 | 92 | return socket_path; | ||
3440 | 93 | } | ||
3441 | 94 | |||
3442 | 95 | |||
3443 | 96 | /* See w32-util.c */ | 74 | /* See w32-util.c */ |
3444 | 97 | int | 75 | int |
3445 | 98 | _gpgme_get_conf_int (const char *key, int *value) | 76 | _gpgme_get_conf_int (const char *key, int *value) |
3446 | 99 | 77 | ||
3447 | === modified file 'src/signers.c' | |||
3448 | --- src/signers.c 2013-05-14 20:29:20 +0000 | |||
3449 | +++ src/signers.c 2013-10-23 07:14:02 +0000 | |||
3450 | @@ -93,6 +93,14 @@ | |||
3451 | 93 | } | 93 | } |
3452 | 94 | 94 | ||
3453 | 95 | 95 | ||
3454 | 96 | /* Return the number of signers in CTX. */ | ||
3455 | 97 | unsigned int | ||
3456 | 98 | gpgme_signers_count (const gpgme_ctx_t ctx) | ||
3457 | 99 | { | ||
3458 | 100 | return ctx? ctx->signers_len : 0; | ||
3459 | 101 | } | ||
3460 | 102 | |||
3461 | 103 | |||
3462 | 96 | /* Return the SEQth signer's key in CTX with one reference. */ | 104 | /* Return the SEQth signer's key in CTX with one reference. */ |
3463 | 97 | gpgme_key_t | 105 | gpgme_key_t |
3464 | 98 | gpgme_signers_enum (const gpgme_ctx_t ctx, int seq) | 106 | gpgme_signers_enum (const gpgme_ctx_t ctx, int seq) |
3465 | 99 | 107 | ||
3466 | === added file 'src/sys-util.h' | |||
3467 | --- src/sys-util.h 1970-01-01 00:00:00 +0000 | |||
3468 | +++ src/sys-util.h 2013-10-23 07:14:02 +0000 | |||
3469 | @@ -0,0 +1,29 @@ | |||
3470 | 1 | /* sys-util.h - System utilities not generally used. | ||
3471 | 2 | * Copyright (C) 2013 g10 Code GmbH | ||
3472 | 3 | * | ||
3473 | 4 | * This file is part of GPGME. | ||
3474 | 5 | * | ||
3475 | 6 | * GPGME is free software; you can redistribute it and/or modify it | ||
3476 | 7 | * under the terms of the GNU Lesser General Public License as | ||
3477 | 8 | * published by the Free Software Foundation; either version 2.1 of | ||
3478 | 9 | * the License, or (at your option) any later version. | ||
3479 | 10 | * | ||
3480 | 11 | * GPGME is distributed in the hope that it will be useful, but | ||
3481 | 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
3482 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
3483 | 14 | * Lesser General Public License for more details. | ||
3484 | 15 | * | ||
3485 | 16 | * You should have received a copy of the GNU Lesser General Public | ||
3486 | 17 | * License along with this program; if not, see <http://www.gnu.org/licenses/>. | ||
3487 | 18 | */ | ||
3488 | 19 | |||
3489 | 20 | #ifndef SYS_UTIL_H | ||
3490 | 21 | #define SYS_UTIL_H | ||
3491 | 22 | |||
3492 | 23 | /*-- {posix,w32}-util.c --*/ | ||
3493 | 24 | const char *_gpgme_get_gpg_path (void); | ||
3494 | 25 | const char *_gpgme_get_gpgsm_path (void); | ||
3495 | 26 | const char *_gpgme_get_gpgconf_path (void); | ||
3496 | 27 | const char *_gpgme_get_g13_path (void); | ||
3497 | 28 | |||
3498 | 29 | #endif /* SYS_UTIL_H */ | ||
3499 | 0 | 30 | ||
3500 | === modified file 'src/util.h' | |||
3501 | --- src/util.h 2013-05-14 20:29:20 +0000 | |||
3502 | +++ src/util.h 2013-10-23 07:14:02 +0000 | |||
3503 | @@ -47,18 +47,17 @@ | |||
3504 | 47 | 47 | ||
3505 | 48 | 48 | ||
3506 | 49 | 49 | ||
3507 | 50 | /*-- {posix,w32}-util.c --*/ | 50 | /*-- {posix,w32}-util.c --*/ |
3508 | 51 | const char *_gpgme_get_gpg_path (void); | ||
3509 | 52 | const char *_gpgme_get_gpgsm_path (void); | ||
3510 | 53 | const char *_gpgme_get_gpgconf_path (void); | ||
3511 | 54 | const char *_gpgme_get_g13_path (void); | ||
3512 | 55 | const char *_gpgme_get_uiserver_socket_path (void); | ||
3513 | 56 | |||
3514 | 57 | int _gpgme_get_conf_int (const char *key, int *value); | 51 | int _gpgme_get_conf_int (const char *key, int *value); |
3515 | 58 | void _gpgme_allow_set_foreground_window (pid_t pid); | 52 | void _gpgme_allow_set_foreground_window (pid_t pid); |
3516 | 59 | 53 | ||
3517 | 60 | /*-- dirinfo.c --*/ | 54 | /*-- dirinfo.c --*/ |
3518 | 61 | const char *_gpgme_get_default_homedir (void); | 55 | const char *_gpgme_get_default_homedir (void); |
3519 | 62 | const char *_gpgme_get_default_agent_socket (void); | 56 | const char *_gpgme_get_default_agent_socket (void); |
3520 | 57 | const char *_gpgme_get_default_gpg_name (void); | ||
3521 | 58 | const char *_gpgme_get_default_gpgsm_name (void); | ||
3522 | 59 | const char *_gpgme_get_default_g13_name (void); | ||
3523 | 60 | const char *_gpgme_get_default_gpgconf_name (void); | ||
3524 | 61 | const char *_gpgme_get_default_uisrv_socket (void); | ||
3525 | 63 | 62 | ||
3526 | 64 | 63 | ||
3527 | 65 | 64 | ||
3528 | 66 | 65 | ||
3529 | 67 | 66 | ||
3530 | === modified file 'src/w32-util.c' | |||
3531 | --- src/w32-util.c 2013-05-14 20:29:20 +0000 | |||
3532 | +++ src/w32-util.c 2013-10-23 07:14:02 +0000 | |||
3533 | @@ -1,24 +1,23 @@ | |||
3534 | 1 | /* w32-util.c - Utility functions for the W32 API | 1 | /* w32-util.c - Utility functions for the W32 API |
3555 | 2 | Copyright (C) 1999 Free Software Foundation, Inc | 2 | * Copyright (C) 1999 Free Software Foundation, Inc |
3556 | 3 | Copyright (C) 2001 Werner Koch (dd9jn) | 3 | * Copyright (C) 2001 Werner Koch (dd9jn) |
3557 | 4 | Copyright (C) 2001, 2002, 2003, 2004, 2007 g10 Code GmbH | 4 | * Copyright (C) 2001, 2002, 2003, 2004, 2007, 2013 g10 Code GmbH |
3558 | 5 | 5 | * | |
3559 | 6 | This file is part of GPGME. | 6 | * This file is part of GPGME. |
3560 | 7 | 7 | * | |
3561 | 8 | GPGME is free software; you can redistribute it and/or modify it | 8 | * GPGME is free software; you can redistribute it and/or modify it |
3562 | 9 | under the terms of the GNU Lesser General Public License as | 9 | * under the terms of the GNU Lesser General Public License as |
3563 | 10 | published by the Free Software Foundation; either version 2.1 of | 10 | * published by the Free Software Foundation; either version 2.1 of |
3564 | 11 | the License, or (at your option) any later version. | 11 | * the License, or (at your option) any later version. |
3565 | 12 | 12 | * | |
3566 | 13 | GPGME is distributed in the hope that it will be useful, but | 13 | * GPGME is distributed in the hope that it will be useful, but |
3567 | 14 | WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
3568 | 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3569 | 16 | Lesser General Public License for more details. | 16 | * Lesser General Public License for more details. |
3570 | 17 | 17 | * | |
3571 | 18 | You should have received a copy of the GNU Lesser General Public | 18 | * You should have received a copy of the GNU Lesser General Public |
3572 | 19 | License along with this program; if not, write to the Free Software | 19 | * License along with this program; if not, see <http://www.gnu.org/licenses/>. |
3573 | 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | 20 | **/ |
3554 | 21 | 02111-1307, USA. */ | ||
3574 | 22 | 21 | ||
3575 | 23 | #ifdef HAVE_CONFIG_H | 22 | #ifdef HAVE_CONFIG_H |
3576 | 24 | #include <config.h> | 23 | #include <config.h> |
3577 | @@ -63,6 +62,7 @@ | |||
3578 | 63 | #include "ath.h" | 62 | #include "ath.h" |
3579 | 64 | #include "sema.h" | 63 | #include "sema.h" |
3580 | 65 | #include "debug.h" | 64 | #include "debug.h" |
3581 | 65 | #include "sys-util.h" | ||
3582 | 66 | 66 | ||
3583 | 67 | 67 | ||
3584 | 68 | #ifndef HAVE_W32CE_SYSTEM | 68 | #ifndef HAVE_W32CE_SYSTEM |
3585 | @@ -75,6 +75,12 @@ | |||
3586 | 75 | 75 | ||
3587 | 76 | DEFINE_STATIC_LOCK (get_path_lock); | 76 | DEFINE_STATIC_LOCK (get_path_lock); |
3588 | 77 | 77 | ||
3589 | 78 | /* The module handle of this DLL. If we are linked statically, | ||
3590 | 79 | dllmain does not exists and thus the value of my_hmodule will be | ||
3591 | 80 | NULL. The effect is that a GetModuleFileName always returns the | ||
3592 | 81 | file name of the DLL or executable which contains the gpgme code. */ | ||
3593 | 82 | static HMODULE my_hmodule; | ||
3594 | 83 | |||
3595 | 78 | 84 | ||
3596 | 79 | #ifdef HAVE_ALLOW_SET_FOREGROUND_WINDOW | 85 | #ifdef HAVE_ALLOW_SET_FOREGROUND_WINDOW |
3597 | 80 | 86 | ||
3598 | @@ -112,6 +118,39 @@ | |||
3599 | 112 | } | 118 | } |
3600 | 113 | #endif /* HAVE_ALLOW_SET_FOREGROUND_WINDOW */ | 119 | #endif /* HAVE_ALLOW_SET_FOREGROUND_WINDOW */ |
3601 | 114 | 120 | ||
3602 | 121 | |||
3603 | 122 | /* Return a malloced string encoded in UTF-8 from the wide char input | ||
3604 | 123 | string STRING. Caller must free this value. Returns NULL and sets | ||
3605 | 124 | ERRNO on failure. Calling this function with STRING set to NULL is | ||
3606 | 125 | not defined. */ | ||
3607 | 126 | static char * | ||
3608 | 127 | wchar_to_utf8 (const wchar_t *string) | ||
3609 | 128 | { | ||
3610 | 129 | int n; | ||
3611 | 130 | char *result; | ||
3612 | 131 | |||
3613 | 132 | n = WideCharToMultiByte (CP_UTF8, 0, string, -1, NULL, 0, NULL, NULL); | ||
3614 | 133 | if (n < 0) | ||
3615 | 134 | { | ||
3616 | 135 | gpg_err_set_errno (EINVAL); | ||
3617 | 136 | return NULL; | ||
3618 | 137 | } | ||
3619 | 138 | |||
3620 | 139 | result = malloc (n+1); | ||
3621 | 140 | if (!result) | ||
3622 | 141 | return NULL; | ||
3623 | 142 | |||
3624 | 143 | n = WideCharToMultiByte (CP_UTF8, 0, string, -1, result, n, NULL, NULL); | ||
3625 | 144 | if (n < 0) | ||
3626 | 145 | { | ||
3627 | 146 | free (result); | ||
3628 | 147 | gpg_err_set_errno (EINVAL); | ||
3629 | 148 | result = NULL; | ||
3630 | 149 | } | ||
3631 | 150 | return result; | ||
3632 | 151 | } | ||
3633 | 152 | |||
3634 | 153 | |||
3635 | 115 | void | 154 | void |
3636 | 116 | _gpgme_allow_set_foreground_window (pid_t pid) | 155 | _gpgme_allow_set_foreground_window (pid_t pid) |
3637 | 117 | { | 156 | { |
3638 | @@ -270,58 +309,94 @@ | |||
3639 | 270 | } | 309 | } |
3640 | 271 | 310 | ||
3641 | 272 | 311 | ||
3673 | 273 | #if 0 | 312 | /* Return the name of the directory with the gpgme DLL or the EXE (if |
3674 | 274 | static char * | 313 | statically linked). May return NULL on severe errors. */ |
3675 | 275 | find_program_in_registry (const char *name) | 314 | const char * |
3676 | 276 | { | 315 | _gpgme_get_inst_dir (void) |
3677 | 277 | char *program = NULL; | 316 | { |
3678 | 278 | 317 | static char *inst_dir; | |
3679 | 279 | program = read_w32_registry_string (NULL, "Software\\GNU\\GnuPG", name); | 318 | |
3680 | 280 | if (program) | 319 | LOCK (get_path_lock); |
3681 | 281 | { | 320 | if (!inst_dir) |
3682 | 282 | int i; | 321 | { |
3683 | 283 | 322 | wchar_t *moddir; | |
3684 | 284 | TRACE2 (DEBUG_CTX, "gpgme:find_program_in_registry", 0, | 323 | |
3685 | 285 | "found %s in registry: `%s'", name, program); | 324 | moddir = malloc ((MAX_PATH+5) * sizeof *moddir); |
3686 | 286 | for (i = 0; program[i]; i++) | 325 | if (moddir) |
3687 | 287 | { | 326 | { |
3688 | 288 | if (program[i] == '/') | 327 | if (!GetModuleFileNameW (my_hmodule, moddir, MAX_PATH)) |
3689 | 289 | program[i] = '\\'; | 328 | *moddir = 0; |
3690 | 290 | } | 329 | if (!*moddir) |
3691 | 291 | } | 330 | gpg_err_set_errno (ENOENT); |
3692 | 292 | return program; | 331 | else |
3693 | 293 | } | 332 | { |
3694 | 294 | #endif | 333 | inst_dir = wchar_to_utf8 (moddir); |
3695 | 295 | 334 | if (inst_dir) | |
3696 | 296 | 335 | { | |
3697 | 297 | static char * | 336 | char *p = strrchr (inst_dir, '\\'); |
3698 | 298 | find_program_in_inst_dir (const char *name) | 337 | if (p) |
3699 | 299 | { | 338 | *p = 0; |
3700 | 300 | char *result = NULL; | 339 | } |
3701 | 301 | char *tmp; | 340 | } |
3702 | 302 | 341 | free (moddir); | |
3703 | 303 | tmp = read_w32_registry_string ("HKEY_LOCAL_MACHINE", | 342 | } |
3704 | 343 | } | ||
3705 | 344 | UNLOCK (get_path_lock); | ||
3706 | 345 | return inst_dir; | ||
3707 | 346 | } | ||
3708 | 347 | |||
3709 | 348 | |||
3710 | 349 | static char * | ||
3711 | 350 | find_program_in_dir (const char *dir, const char *name) | ||
3712 | 351 | { | ||
3713 | 352 | char *result; | ||
3714 | 353 | |||
3715 | 354 | result = malloc (strlen (dir) + 1 + strlen (name) + 1); | ||
3716 | 355 | if (!result) | ||
3717 | 356 | return NULL; | ||
3718 | 357 | |||
3719 | 358 | strcpy (stpcpy (stpcpy (result, dir), "\\"), name); | ||
3720 | 359 | if (access (result, F_OK)) | ||
3721 | 360 | { | ||
3722 | 361 | free (result); | ||
3723 | 362 | return NULL; | ||
3724 | 363 | } | ||
3725 | 364 | |||
3726 | 365 | return result; | ||
3727 | 366 | } | ||
3728 | 367 | |||
3729 | 368 | |||
3730 | 369 | static char * | ||
3731 | 370 | find_program_in_inst_dir (const char *inst_dir, const char *name) | ||
3732 | 371 | { | ||
3733 | 372 | char *result; | ||
3734 | 373 | char *dir; | ||
3735 | 374 | |||
3736 | 375 | /* If an installation directory has been passed, this overrides a | ||
3737 | 376 | location given bu the registry. The idea here is that we prefer | ||
3738 | 377 | a a program installed alongside with gpgme. We don't want the | ||
3739 | 378 | registry to override this to have a better isolation of an gpgme | ||
3740 | 379 | aware applications for other effects. Note that the "Install | ||
3741 | 380 | Directory" registry item has been used for ages in Gpg4win and | ||
3742 | 381 | earlier GnuPG windows installers. It is technically not anymore | ||
3743 | 382 | required. */ | ||
3744 | 383 | if (inst_dir) | ||
3745 | 384 | { | ||
3746 | 385 | result = find_program_in_dir (inst_dir, name); | ||
3747 | 386 | if (result) | ||
3748 | 387 | return result; | ||
3749 | 388 | } | ||
3750 | 389 | |||
3751 | 390 | dir = read_w32_registry_string ("HKEY_LOCAL_MACHINE", | ||
3752 | 304 | "Software\\GNU\\GnuPG", | 391 | "Software\\GNU\\GnuPG", |
3753 | 305 | "Install Directory"); | 392 | "Install Directory"); |
3773 | 306 | if (!tmp) | 393 | if (dir) |
3774 | 307 | return NULL; | 394 | { |
3775 | 308 | 395 | result = find_program_in_dir (dir, name); | |
3776 | 309 | result = malloc (strlen (tmp) + 1 + strlen (name) + 1); | 396 | free (dir); |
3777 | 310 | if (!result) | 397 | return result; |
3778 | 311 | { | 398 | } |
3779 | 312 | free (tmp); | 399 | return NULL; |
3761 | 313 | return NULL; | ||
3762 | 314 | } | ||
3763 | 315 | |||
3764 | 316 | strcpy (stpcpy (stpcpy (result, tmp), "\\"), name); | ||
3765 | 317 | free (tmp); | ||
3766 | 318 | if (access (result, F_OK)) | ||
3767 | 319 | { | ||
3768 | 320 | free (result); | ||
3769 | 321 | return NULL; | ||
3770 | 322 | } | ||
3771 | 323 | |||
3772 | 324 | return result; | ||
3780 | 325 | } | 400 | } |
3781 | 326 | 401 | ||
3782 | 327 | 402 | ||
3783 | @@ -353,14 +428,12 @@ | |||
3784 | 353 | _gpgme_get_gpg_path (void) | 428 | _gpgme_get_gpg_path (void) |
3785 | 354 | { | 429 | { |
3786 | 355 | static char *gpg_program; | 430 | static char *gpg_program; |
3787 | 431 | const char *inst_dir; | ||
3788 | 356 | 432 | ||
3789 | 433 | inst_dir = _gpgme_get_inst_dir (); | ||
3790 | 357 | LOCK (get_path_lock); | 434 | LOCK (get_path_lock); |
3797 | 358 | #if 0 | 435 | if (!gpg_program) |
3798 | 359 | if (!gpg_program) | 436 | gpg_program = find_program_in_inst_dir (inst_dir, "gpg.exe"); |
3793 | 360 | gpg_program = find_program_in_registry ("gpgProgram"); | ||
3794 | 361 | #endif | ||
3795 | 362 | if (!gpg_program) | ||
3796 | 363 | gpg_program = find_program_in_inst_dir ("gpg.exe"); | ||
3799 | 364 | if (!gpg_program) | 437 | if (!gpg_program) |
3800 | 365 | gpg_program = find_program_at_standard_place ("GNU\\GnuPG\\gpg.exe"); | 438 | gpg_program = find_program_at_standard_place ("GNU\\GnuPG\\gpg.exe"); |
3801 | 366 | UNLOCK (get_path_lock); | 439 | UNLOCK (get_path_lock); |
3802 | @@ -372,14 +445,12 @@ | |||
3803 | 372 | _gpgme_get_gpgsm_path (void) | 445 | _gpgme_get_gpgsm_path (void) |
3804 | 373 | { | 446 | { |
3805 | 374 | static char *gpgsm_program; | 447 | static char *gpgsm_program; |
3806 | 448 | const char *inst_dir; | ||
3807 | 375 | 449 | ||
3808 | 450 | inst_dir = _gpgme_get_inst_dir (); | ||
3809 | 376 | LOCK (get_path_lock); | 451 | LOCK (get_path_lock); |
3816 | 377 | #if 0 | 452 | if (!gpgsm_program) |
3817 | 378 | if (!gpgsm_program) | 453 | gpgsm_program = find_program_in_inst_dir (inst_dir, "gpgsm.exe"); |
3812 | 379 | gpgsm_program = find_program_in_registry ("gpgsmProgram"); | ||
3813 | 380 | #endif | ||
3814 | 381 | if (!gpgsm_program) | ||
3815 | 382 | gpgsm_program = find_program_in_inst_dir ("gpgsm.exe"); | ||
3818 | 383 | if (!gpgsm_program) | 454 | if (!gpgsm_program) |
3819 | 384 | gpgsm_program = find_program_at_standard_place ("GNU\\GnuPG\\gpgsm.exe"); | 455 | gpgsm_program = find_program_at_standard_place ("GNU\\GnuPG\\gpgsm.exe"); |
3820 | 385 | UNLOCK (get_path_lock); | 456 | UNLOCK (get_path_lock); |
3821 | @@ -391,14 +462,12 @@ | |||
3822 | 391 | _gpgme_get_gpgconf_path (void) | 462 | _gpgme_get_gpgconf_path (void) |
3823 | 392 | { | 463 | { |
3824 | 393 | static char *gpgconf_program; | 464 | static char *gpgconf_program; |
3825 | 465 | const char *inst_dir; | ||
3826 | 394 | 466 | ||
3827 | 467 | inst_dir = _gpgme_get_inst_dir (); | ||
3828 | 395 | LOCK (get_path_lock); | 468 | LOCK (get_path_lock); |
3835 | 396 | #if 0 | 469 | if (!gpgconf_program) |
3836 | 397 | if (!gpgconf_program) | 470 | gpgconf_program = find_program_in_inst_dir (inst_dir, "gpgconf.exe"); |
3831 | 398 | gpgconf_program = find_program_in_registry ("gpgconfProgram"); | ||
3832 | 399 | #endif | ||
3833 | 400 | if (!gpgconf_program) | ||
3834 | 401 | gpgconf_program = find_program_in_inst_dir ("gpgconf.exe"); | ||
3837 | 402 | if (!gpgconf_program) | 471 | if (!gpgconf_program) |
3838 | 403 | gpgconf_program | 472 | gpgconf_program |
3839 | 404 | = find_program_at_standard_place ("GNU\\GnuPG\\gpgconf.exe"); | 473 | = find_program_at_standard_place ("GNU\\GnuPG\\gpgconf.exe"); |
3840 | @@ -411,14 +480,12 @@ | |||
3841 | 411 | _gpgme_get_g13_path (void) | 480 | _gpgme_get_g13_path (void) |
3842 | 412 | { | 481 | { |
3843 | 413 | static char *g13_program; | 482 | static char *g13_program; |
3844 | 483 | const char *inst_dir; | ||
3845 | 414 | 484 | ||
3846 | 485 | inst_dir = _gpgme_get_inst_dir (); | ||
3847 | 415 | LOCK (get_path_lock); | 486 | LOCK (get_path_lock); |
3854 | 416 | #if 0 | 487 | if (!g13_program) |
3855 | 417 | if (!g13_program) | 488 | g13_program = find_program_in_inst_dir (inst_dir, "g13.exe"); |
3850 | 418 | g13_program = find_program_in_registry ("g13Program"); | ||
3851 | 419 | #endif | ||
3852 | 420 | if (!g13_program) | ||
3853 | 421 | g13_program = find_program_in_inst_dir ("g13.exe"); | ||
3856 | 422 | if (!g13_program) | 489 | if (!g13_program) |
3857 | 423 | g13_program = find_program_at_standard_place ("GNU\\GnuPG\\g13.exe"); | 490 | g13_program = find_program_at_standard_place ("GNU\\GnuPG\\g13.exe"); |
3858 | 424 | UNLOCK (get_path_lock); | 491 | UNLOCK (get_path_lock); |
3859 | @@ -427,36 +494,15 @@ | |||
3860 | 427 | 494 | ||
3861 | 428 | 495 | ||
3862 | 429 | const char * | 496 | const char * |
3863 | 430 | _gpgme_get_uiserver_socket_path (void) | ||
3864 | 431 | { | ||
3865 | 432 | static char *socket_path; | ||
3866 | 433 | const char *homedir; | ||
3867 | 434 | const char name[] = "S.uiserver"; | ||
3868 | 435 | |||
3869 | 436 | if (socket_path) | ||
3870 | 437 | return socket_path; | ||
3871 | 438 | |||
3872 | 439 | homedir = _gpgme_get_default_homedir (); | ||
3873 | 440 | if (! homedir) | ||
3874 | 441 | return NULL; | ||
3875 | 442 | |||
3876 | 443 | socket_path = malloc (strlen (homedir) + 1 + strlen (name) + 1); | ||
3877 | 444 | if (! socket_path) | ||
3878 | 445 | return NULL; | ||
3879 | 446 | |||
3880 | 447 | strcpy (stpcpy (stpcpy (socket_path, homedir), "\\"), name); | ||
3881 | 448 | return socket_path; | ||
3882 | 449 | } | ||
3883 | 450 | |||
3884 | 451 | |||
3885 | 452 | const char * | ||
3886 | 453 | _gpgme_get_w32spawn_path (void) | 497 | _gpgme_get_w32spawn_path (void) |
3887 | 454 | { | 498 | { |
3888 | 455 | static char *w32spawn_program; | 499 | static char *w32spawn_program; |
3889 | 500 | const char *inst_dir; | ||
3890 | 456 | 501 | ||
3891 | 502 | inst_dir = _gpgme_get_inst_dir (); | ||
3892 | 457 | LOCK (get_path_lock); | 503 | LOCK (get_path_lock); |
3893 | 458 | if (!w32spawn_program) | 504 | if (!w32spawn_program) |
3895 | 459 | w32spawn_program = find_program_in_inst_dir ("gpgme-w32spawn.exe"); | 505 | w32spawn_program = find_program_in_inst_dir (inst_dir,"gpgme-w32spawn.exe"); |
3896 | 460 | if (!w32spawn_program) | 506 | if (!w32spawn_program) |
3897 | 461 | w32spawn_program | 507 | w32spawn_program |
3898 | 462 | = find_program_at_standard_place ("GNU\\GnuPG\\gpgme-w32spawn.exe"); | 508 | = find_program_at_standard_place ("GNU\\GnuPG\\gpgme-w32spawn.exe"); |
3899 | @@ -641,3 +687,18 @@ | |||
3900 | 641 | return tmp; | 687 | return tmp; |
3901 | 642 | } | 688 | } |
3902 | 643 | #endif /*HAVE_W32CE_SYSTEM*/ | 689 | #endif /*HAVE_W32CE_SYSTEM*/ |
3903 | 690 | |||
3904 | 691 | |||
3905 | 692 | /* Entry point called by the DLL loader. */ | ||
3906 | 693 | #ifdef DLL_EXPORT | ||
3907 | 694 | int WINAPI | ||
3908 | 695 | DllMain (HINSTANCE hinst, DWORD reason, LPVOID reserved) | ||
3909 | 696 | { | ||
3910 | 697 | (void)reserved; | ||
3911 | 698 | |||
3912 | 699 | if (reason == DLL_PROCESS_ATTACH) | ||
3913 | 700 | my_hmodule = hinst; | ||
3914 | 701 | |||
3915 | 702 | return TRUE; | ||
3916 | 703 | } | ||
3917 | 704 | #endif /*DLL_EXPORT*/ | ||
3918 | 644 | 705 | ||
3919 | === added file 'tests/gpg/13CBE3758AFE42B5E5E2AE4CED27AFA455E3F87F' | |||
3920 | 645 | Binary files tests/gpg/13CBE3758AFE42B5E5E2AE4CED27AFA455E3F87F 1970-01-01 00:00:00 +0000 and tests/gpg/13CBE3758AFE42B5E5E2AE4CED27AFA455E3F87F 2013-10-23 07:14:02 +0000 differ | 706 | Binary files tests/gpg/13CBE3758AFE42B5E5E2AE4CED27AFA455E3F87F 1970-01-01 00:00:00 +0000 and tests/gpg/13CBE3758AFE42B5E5E2AE4CED27AFA455E3F87F 2013-10-23 07:14:02 +0000 differ |
3921 | === added file 'tests/gpg/13CD0F3BDF24BE53FE192D62F18737256FF6E4FD' | |||
3922 | 646 | Binary files tests/gpg/13CD0F3BDF24BE53FE192D62F18737256FF6E4FD 1970-01-01 00:00:00 +0000 and tests/gpg/13CD0F3BDF24BE53FE192D62F18737256FF6E4FD 2013-10-23 07:14:02 +0000 differ | 707 | Binary files tests/gpg/13CD0F3BDF24BE53FE192D62F18737256FF6E4FD 1970-01-01 00:00:00 +0000 and tests/gpg/13CD0F3BDF24BE53FE192D62F18737256FF6E4FD 2013-10-23 07:14:02 +0000 differ |
3923 | === added file 'tests/gpg/76F7E2B35832976B50A27A282D9B87E44577EB66' | |||
3924 | 647 | Binary files tests/gpg/76F7E2B35832976B50A27A282D9B87E44577EB66 1970-01-01 00:00:00 +0000 and tests/gpg/76F7E2B35832976B50A27A282D9B87E44577EB66 2013-10-23 07:14:02 +0000 differ | 708 | Binary files tests/gpg/76F7E2B35832976B50A27A282D9B87E44577EB66 1970-01-01 00:00:00 +0000 and tests/gpg/76F7E2B35832976B50A27A282D9B87E44577EB66 2013-10-23 07:14:02 +0000 differ |
3925 | === added file 'tests/gpg/7A030357C0F253A5BBCD282FFC4E521B37558F5C' | |||
3926 | 648 | Binary files tests/gpg/7A030357C0F253A5BBCD282FFC4E521B37558F5C 1970-01-01 00:00:00 +0000 and tests/gpg/7A030357C0F253A5BBCD282FFC4E521B37558F5C 2013-10-23 07:14:02 +0000 differ | 709 | Binary files tests/gpg/7A030357C0F253A5BBCD282FFC4E521B37558F5C 1970-01-01 00:00:00 +0000 and tests/gpg/7A030357C0F253A5BBCD282FFC4E521B37558F5C 2013-10-23 07:14:02 +0000 differ |
3927 | === added file 'tests/gpg/A0747D5F9425E6664F4FFBEED20FBCA79FDED2BD' | |||
3928 | 649 | Binary files tests/gpg/A0747D5F9425E6664F4FFBEED20FBCA79FDED2BD 1970-01-01 00:00:00 +0000 and tests/gpg/A0747D5F9425E6664F4FFBEED20FBCA79FDED2BD 2013-10-23 07:14:02 +0000 differ | 710 | Binary files tests/gpg/A0747D5F9425E6664F4FFBEED20FBCA79FDED2BD 1970-01-01 00:00:00 +0000 and tests/gpg/A0747D5F9425E6664F4FFBEED20FBCA79FDED2BD 2013-10-23 07:14:02 +0000 differ |
3929 | === modified file 'tests/gpg/Makefile.am' | |||
3930 | --- tests/gpg/Makefile.am 2013-05-14 20:29:20 +0000 | |||
3931 | +++ tests/gpg/Makefile.am 2013-10-23 07:14:02 +0000 | |||
3932 | @@ -1,18 +1,18 @@ | |||
3933 | 1 | # Copyright (C) 2000 Werner Koch (dd9jn) | 1 | # Copyright (C) 2000 Werner Koch (dd9jn) |
3934 | 2 | # Copyright (C) 2001, 2004, 2005, 2009 g10 Code GmbH | 2 | # Copyright (C) 2001, 2004, 2005, 2009 g10 Code GmbH |
3936 | 3 | # | 3 | # |
3937 | 4 | # This file is part of GPGME. | 4 | # This file is part of GPGME. |
3939 | 5 | # | 5 | # |
3940 | 6 | # GPGME is free software; you can redistribute it and/or modify it | 6 | # GPGME is free software; you can redistribute it and/or modify it |
3941 | 7 | # under the terms of the GNU Lesser General Public License as | 7 | # under the terms of the GNU Lesser General Public License as |
3942 | 8 | # published by the Free Software Foundation; either version 2.1 of the | 8 | # published by the Free Software Foundation; either version 2.1 of the |
3943 | 9 | # License, or (at your option) any later version. | 9 | # License, or (at your option) any later version. |
3945 | 10 | # | 10 | # |
3946 | 11 | # GPGME is distributed in the hope that it will be useful, but WITHOUT | 11 | # GPGME is distributed in the hope that it will be useful, but WITHOUT |
3947 | 12 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | 12 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
3948 | 13 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General | 13 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General |
3949 | 14 | # Public License for more details. | 14 | # Public License for more details. |
3951 | 15 | # | 15 | # |
3952 | 16 | # You should have received a copy of the GNU Lesser General Public | 16 | # You should have received a copy of the GNU Lesser General Public |
3953 | 17 | # License along with this program; if not, write to the Free Software | 17 | # License along with this program; if not, write to the Free Software |
3954 | 18 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA | 18 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
3955 | @@ -20,8 +20,9 @@ | |||
3956 | 20 | ## Process this file with automake to produce Makefile.in | 20 | ## Process this file with automake to produce Makefile.in |
3957 | 21 | 21 | ||
3958 | 22 | GPG = @GPG@ | 22 | GPG = @GPG@ |
3959 | 23 | GPG_AGENT = @GPG_AGENT@ | ||
3960 | 23 | 24 | ||
3962 | 24 | TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) GPG_AGENT_INFO= | 25 | TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) LC_ALL=C GPG_AGENT_INFO= |
3963 | 25 | 26 | ||
3964 | 26 | # The keylist tests must come after the import and the edit test. | 27 | # The keylist tests must come after the import and the edit test. |
3965 | 27 | noinst_HEADERS = t-support.h | 28 | noinst_HEADERS = t-support.h |
3966 | @@ -32,17 +33,29 @@ | |||
3967 | 32 | tests_unix = t-eventloop t-thread1 | 33 | tests_unix = t-eventloop t-thread1 |
3968 | 33 | endif | 34 | endif |
3969 | 34 | 35 | ||
3971 | 35 | TESTS = t-encrypt t-encrypt-sym t-encrypt-sign t-sign t-signers \ | 36 | c_tests = \ |
3972 | 37 | t-encrypt t-encrypt-sym t-encrypt-sign t-sign t-signers \ | ||
3973 | 36 | t-decrypt t-verify t-decrypt-verify t-sig-notation t-export \ | 38 | t-decrypt t-verify t-decrypt-verify t-sig-notation t-export \ |
3974 | 37 | t-import t-trustlist t-edit t-keylist t-keylist-sig t-wait \ | 39 | t-import t-trustlist t-edit t-keylist t-keylist-sig t-wait \ |
3975 | 38 | t-encrypt-large t-file-name t-gpgconf $(tests_unix) | 40 | t-encrypt-large t-file-name t-gpgconf $(tests_unix) |
3976 | 39 | 41 | ||
3977 | 42 | TESTS = initial.test $(c_tests) final.test | ||
3978 | 43 | |||
3979 | 40 | CLEANFILES = secring.gpg pubring.gpg pubring.kbx trustdb.gpg dirmngr.conf \ | 44 | CLEANFILES = secring.gpg pubring.gpg pubring.kbx trustdb.gpg dirmngr.conf \ |
3980 | 41 | gpg-agent.conf pubring.kbx~ S.gpg-agent gpg.conf pubring.gpg~ \ | 45 | gpg-agent.conf pubring.kbx~ S.gpg-agent gpg.conf pubring.gpg~ \ |
3985 | 42 | random_seed | 46 | random_seed S.gpg-agent |
3986 | 43 | 47 | ||
3987 | 44 | EXTRA_DIST = pubdemo.asc secdemo.asc cipher-1.asc cipher-2.asc \ | 48 | private_keys = \ |
3988 | 45 | geheim.txt pubkey-1.asc seckey-1.asc pinentry | 49 | 13CD0F3BDF24BE53FE192D62F18737256FF6E4FD \ |
3989 | 50 | 76F7E2B35832976B50A27A282D9B87E44577EB66 \ | ||
3990 | 51 | A0747D5F9425E6664F4FFBEED20FBCA79FDED2BD \ | ||
3991 | 52 | 13CBE3758AFE42B5E5E2AE4CED27AFA455E3F87F \ | ||
3992 | 53 | 7A030357C0F253A5BBCD282FFC4E521B37558F5C | ||
3993 | 54 | |||
3994 | 55 | |||
3995 | 56 | EXTRA_DIST = start-stop-agent initial.test final.test \ | ||
3996 | 57 | pubdemo.asc secdemo.asc cipher-1.asc cipher-2.asc \ | ||
3997 | 58 | geheim.txt pubkey-1.asc seckey-1.asc pinentry $(private_keys) | ||
3998 | 46 | 59 | ||
3999 | 47 | INCLUDES = -I$(top_builddir)/src | 60 | INCLUDES = -I$(top_builddir)/src |
4000 | 48 | 61 | ||
4001 | @@ -51,17 +64,25 @@ | |||
4002 | 51 | t_thread1_LDADD = ../../src/libgpgme-pthread.la -lpthread | 64 | t_thread1_LDADD = ../../src/libgpgme-pthread.la -lpthread |
4003 | 52 | 65 | ||
4004 | 53 | # We don't run t-genkey in the test suite, because it takes too long | 66 | # We don't run t-genkey in the test suite, because it takes too long |
4006 | 54 | noinst_PROGRAMS = $(TESTS) t-genkey | 67 | noinst_PROGRAMS = $(c_tests) t-genkey |
4007 | 55 | 68 | ||
4008 | 56 | clean-local: | 69 | clean-local: |
4010 | 57 | -gpg-connect-agent KILLAGENT /bye | 70 | -$(srcdir)/start-stop-agent --stop |
4011 | 58 | -rm -fR private-keys-v1.d | 71 | -rm -fR private-keys-v1.d |
4012 | 59 | 72 | ||
4014 | 60 | all-local: ./gpg.conf ./gpg-agent.conf ./pubring.gpg | 73 | all-local: ./gpg.conf ./gpg-agent.conf ./pubring.gpg \ |
4015 | 74 | ./private-keys-v1.d/gpg-sample.stamp | ||
4016 | 61 | 75 | ||
4017 | 62 | export GNUPGHOME := $(abs_builddir) | 76 | export GNUPGHOME := $(abs_builddir) |
4018 | 63 | 77 | ||
4020 | 64 | export GPG_AGENT_INFO := | 78 | export GPG_AGENT_INFO := |
4021 | 79 | |||
4022 | 80 | ./private-keys-v1.d/gpg-sample.stamp: $(srcdir)/$(private_keys) | ||
4023 | 81 | test -d ./private-keys-v1.d || mkdir ./private-keys-v1.d | ||
4024 | 82 | for k in $(private_keys); do \ | ||
4025 | 83 | cp $(srcdir)/$$k private-keys-v1.d/$$k.key; \ | ||
4026 | 84 | done | ||
4027 | 85 | echo x > ./private-keys-v1.d/gpg-sample.stamp | ||
4028 | 65 | 86 | ||
4029 | 66 | ./pubring.gpg: $(srcdir)/pubdemo.asc | 87 | ./pubring.gpg: $(srcdir)/pubdemo.asc |
4030 | 67 | -$(GPG) --no-permission-warning \ | 88 | -$(GPG) --no-permission-warning \ |
4031 | 68 | 89 | ||
4032 | === modified file 'tests/gpg/Makefile.in' | |||
4033 | --- tests/gpg/Makefile.in 2013-05-14 20:29:20 +0000 | |||
4034 | +++ tests/gpg/Makefile.in 2013-10-23 07:14:02 +0000 | |||
4035 | @@ -17,19 +17,19 @@ | |||
4036 | 17 | 17 | ||
4037 | 18 | # Copyright (C) 2000 Werner Koch (dd9jn) | 18 | # Copyright (C) 2000 Werner Koch (dd9jn) |
4038 | 19 | # Copyright (C) 2001, 2004, 2005, 2009 g10 Code GmbH | 19 | # Copyright (C) 2001, 2004, 2005, 2009 g10 Code GmbH |
4040 | 20 | # | 20 | # |
4041 | 21 | # This file is part of GPGME. | 21 | # This file is part of GPGME. |
4043 | 22 | # | 22 | # |
4044 | 23 | # GPGME is free software; you can redistribute it and/or modify it | 23 | # GPGME is free software; you can redistribute it and/or modify it |
4045 | 24 | # under the terms of the GNU Lesser General Public License as | 24 | # under the terms of the GNU Lesser General Public License as |
4046 | 25 | # published by the Free Software Foundation; either version 2.1 of the | 25 | # published by the Free Software Foundation; either version 2.1 of the |
4047 | 26 | # License, or (at your option) any later version. | 26 | # License, or (at your option) any later version. |
4049 | 27 | # | 27 | # |
4050 | 28 | # GPGME is distributed in the hope that it will be useful, but WITHOUT | 28 | # GPGME is distributed in the hope that it will be useful, but WITHOUT |
4051 | 29 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | 29 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
4052 | 30 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General | 30 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General |
4053 | 31 | # Public License for more details. | 31 | # Public License for more details. |
4055 | 32 | # | 32 | # |
4056 | 33 | # You should have received a copy of the GNU Lesser General Public | 33 | # You should have received a copy of the GNU Lesser General Public |
4057 | 34 | # License along with this program; if not, write to the Free Software | 34 | # License along with this program; if not, write to the Free Software |
4058 | 35 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA | 35 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
4059 | @@ -71,14 +71,7 @@ | |||
4060 | 71 | POST_UNINSTALL = : | 71 | POST_UNINSTALL = : |
4061 | 72 | build_triplet = @build@ | 72 | build_triplet = @build@ |
4062 | 73 | host_triplet = @host@ | 73 | host_triplet = @host@ |
4071 | 74 | TESTS = t-encrypt$(EXEEXT) t-encrypt-sym$(EXEEXT) \ | 74 | TESTS = initial.test $(am__EXEEXT_2) final.test |
4064 | 75 | t-encrypt-sign$(EXEEXT) t-sign$(EXEEXT) t-signers$(EXEEXT) \ | ||
4065 | 76 | t-decrypt$(EXEEXT) t-verify$(EXEEXT) t-decrypt-verify$(EXEEXT) \ | ||
4066 | 77 | t-sig-notation$(EXEEXT) t-export$(EXEEXT) t-import$(EXEEXT) \ | ||
4067 | 78 | t-trustlist$(EXEEXT) t-edit$(EXEEXT) t-keylist$(EXEEXT) \ | ||
4068 | 79 | t-keylist-sig$(EXEEXT) t-wait$(EXEEXT) \ | ||
4069 | 80 | t-encrypt-large$(EXEEXT) t-file-name$(EXEEXT) \ | ||
4070 | 81 | t-gpgconf$(EXEEXT) $(am__EXEEXT_1) | ||
4072 | 82 | noinst_PROGRAMS = $(am__EXEEXT_2) t-genkey$(EXEEXT) | 75 | noinst_PROGRAMS = $(am__EXEEXT_2) t-genkey$(EXEEXT) |
4073 | 83 | subdir = tests/gpg | 76 | subdir = tests/gpg |
4074 | 84 | DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ | 77 | DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ |
4075 | @@ -388,18 +381,33 @@ | |||
4076 | 388 | top_build_prefix = @top_build_prefix@ | 381 | top_build_prefix = @top_build_prefix@ |
4077 | 389 | top_builddir = @top_builddir@ | 382 | top_builddir = @top_builddir@ |
4078 | 390 | top_srcdir = @top_srcdir@ | 383 | top_srcdir = @top_srcdir@ |
4080 | 391 | TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) GPG_AGENT_INFO= | 384 | GPG_AGENT = @GPG_AGENT@ |
4081 | 385 | TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) LC_ALL=C GPG_AGENT_INFO= | ||
4082 | 392 | 386 | ||
4083 | 393 | # The keylist tests must come after the import and the edit test. | 387 | # The keylist tests must come after the import and the edit test. |
4084 | 394 | noinst_HEADERS = t-support.h | 388 | noinst_HEADERS = t-support.h |
4085 | 395 | @HAVE_W32_SYSTEM_FALSE@tests_unix = t-eventloop t-thread1 | 389 | @HAVE_W32_SYSTEM_FALSE@tests_unix = t-eventloop t-thread1 |
4086 | 396 | @HAVE_W32_SYSTEM_TRUE@tests_unix = | 390 | @HAVE_W32_SYSTEM_TRUE@tests_unix = |
4087 | 391 | c_tests = \ | ||
4088 | 392 | t-encrypt t-encrypt-sym t-encrypt-sign t-sign t-signers \ | ||
4089 | 393 | t-decrypt t-verify t-decrypt-verify t-sig-notation t-export \ | ||
4090 | 394 | t-import t-trustlist t-edit t-keylist t-keylist-sig t-wait \ | ||
4091 | 395 | t-encrypt-large t-file-name t-gpgconf $(tests_unix) | ||
4092 | 396 | |||
4093 | 397 | CLEANFILES = secring.gpg pubring.gpg pubring.kbx trustdb.gpg dirmngr.conf \ | 397 | CLEANFILES = secring.gpg pubring.gpg pubring.kbx trustdb.gpg dirmngr.conf \ |
4094 | 398 | gpg-agent.conf pubring.kbx~ S.gpg-agent gpg.conf pubring.gpg~ \ | 398 | gpg-agent.conf pubring.kbx~ S.gpg-agent gpg.conf pubring.gpg~ \ |
4099 | 399 | random_seed | 399 | random_seed S.gpg-agent |
4100 | 400 | 400 | ||
4101 | 401 | EXTRA_DIST = pubdemo.asc secdemo.asc cipher-1.asc cipher-2.asc \ | 401 | private_keys = \ |
4102 | 402 | geheim.txt pubkey-1.asc seckey-1.asc pinentry | 402 | 13CD0F3BDF24BE53FE192D62F18737256FF6E4FD \ |
4103 | 403 | 76F7E2B35832976B50A27A282D9B87E44577EB66 \ | ||
4104 | 404 | A0747D5F9425E6664F4FFBEED20FBCA79FDED2BD \ | ||
4105 | 405 | 13CBE3758AFE42B5E5E2AE4CED27AFA455E3F87F \ | ||
4106 | 406 | 7A030357C0F253A5BBCD282FFC4E521B37558F5C | ||
4107 | 407 | |||
4108 | 408 | EXTRA_DIST = start-stop-agent initial.test final.test \ | ||
4109 | 409 | pubdemo.asc secdemo.asc cipher-1.asc cipher-2.asc \ | ||
4110 | 410 | geheim.txt pubkey-1.asc seckey-1.asc pinentry $(private_keys) | ||
4111 | 403 | 411 | ||
4112 | 404 | INCLUDES = -I$(top_builddir)/src | 412 | INCLUDES = -I$(top_builddir)/src |
4113 | 405 | AM_CPPFLAGS = @GPG_ERROR_CFLAGS@ | 413 | AM_CPPFLAGS = @GPG_ERROR_CFLAGS@ |
4114 | @@ -871,14 +879,22 @@ | |||
4115 | 871 | 879 | ||
4116 | 872 | 880 | ||
4117 | 873 | clean-local: | 881 | clean-local: |
4119 | 874 | -gpg-connect-agent KILLAGENT /bye | 882 | -$(srcdir)/start-stop-agent --stop |
4120 | 875 | -rm -fR private-keys-v1.d | 883 | -rm -fR private-keys-v1.d |
4121 | 876 | 884 | ||
4123 | 877 | all-local: ./gpg.conf ./gpg-agent.conf ./pubring.gpg | 885 | all-local: ./gpg.conf ./gpg-agent.conf ./pubring.gpg \ |
4124 | 886 | ./private-keys-v1.d/gpg-sample.stamp | ||
4125 | 878 | 887 | ||
4126 | 879 | export GNUPGHOME := $(abs_builddir) | 888 | export GNUPGHOME := $(abs_builddir) |
4127 | 880 | 889 | ||
4129 | 881 | export GPG_AGENT_INFO := | 890 | export GPG_AGENT_INFO := |
4130 | 891 | |||
4131 | 892 | ./private-keys-v1.d/gpg-sample.stamp: $(srcdir)/$(private_keys) | ||
4132 | 893 | test -d ./private-keys-v1.d || mkdir ./private-keys-v1.d | ||
4133 | 894 | for k in $(private_keys); do \ | ||
4134 | 895 | cp $(srcdir)/$$k private-keys-v1.d/$$k.key; \ | ||
4135 | 896 | done | ||
4136 | 897 | echo x > ./private-keys-v1.d/gpg-sample.stamp | ||
4137 | 882 | 898 | ||
4138 | 883 | ./pubring.gpg: $(srcdir)/pubdemo.asc | 899 | ./pubring.gpg: $(srcdir)/pubdemo.asc |
4139 | 884 | -$(GPG) --no-permission-warning \ | 900 | -$(GPG) --no-permission-warning \ |
4140 | 885 | 901 | ||
4141 | === added file 'tests/gpg/final.test' | |||
4142 | --- tests/gpg/final.test 1970-01-01 00:00:00 +0000 | |||
4143 | +++ tests/gpg/final.test 2013-10-23 07:14:02 +0000 | |||
4144 | @@ -0,0 +1,4 @@ | |||
4145 | 1 | #!/bin/sh | ||
4146 | 2 | |||
4147 | 3 | ${srcdir}/start-stop-agent --stop | ||
4148 | 4 | exit 0 | ||
4149 | 0 | 5 | ||
4150 | === added file 'tests/gpg/initial.test' | |||
4151 | --- tests/gpg/initial.test 1970-01-01 00:00:00 +0000 | |||
4152 | +++ tests/gpg/initial.test 2013-10-23 07:14:02 +0000 | |||
4153 | @@ -0,0 +1,4 @@ | |||
4154 | 1 | #!/bin/sh | ||
4155 | 2 | |||
4156 | 3 | ${srcdir}/start-stop-agent --start | ||
4157 | 4 | exit 0 | ||
4158 | 0 | 5 | ||
4159 | === added file 'tests/gpg/start-stop-agent' | |||
4160 | --- tests/gpg/start-stop-agent 1970-01-01 00:00:00 +0000 | |||
4161 | +++ tests/gpg/start-stop-agent 2013-10-23 07:14:02 +0000 | |||
4162 | @@ -0,0 +1,45 @@ | |||
4163 | 1 | #!/bin/sh | ||
4164 | 2 | # Copyright (C) 2013 g10 Code GmbH | ||
4165 | 3 | # | ||
4166 | 4 | # This file is free software; as a special exception the author gives | ||
4167 | 5 | # unlimited permission to copy and/or distribute it, with or without | ||
4168 | 6 | # modifications, as long as this notice is preserved. This file is | ||
4169 | 7 | # distributed in the hope that it will be useful, but WITHOUT ANY | ||
4170 | 8 | # WARRANTY, to the extent permitted by law; without even the implied | ||
4171 | 9 | # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
4172 | 10 | |||
4173 | 11 | if [ -z "$(command -v gpg-connect-agent)" ]; then | ||
4174 | 12 | echo "gpg-agent not installed and thus not started" >&2 | ||
4175 | 13 | exit 0; | ||
4176 | 14 | fi | ||
4177 | 15 | |||
4178 | 16 | GPG_AGENT_INFO= | ||
4179 | 17 | export GPG_AGENT_INFO | ||
4180 | 18 | |||
4181 | 19 | token=$(echo "gpgme-$(pwd)" | tr ' ' '_') | ||
4182 | 20 | |||
4183 | 21 | if [ "$1" = "--stop" ]; then | ||
4184 | 22 | if [ "$(gpg-connect-agent getval\ $token /bye 2>/dev/null | head -1)" \ | ||
4185 | 23 | != "D set" ]; then | ||
4186 | 24 | echo "gpg-agent not running" >&2 | ||
4187 | 25 | exit 0 | ||
4188 | 26 | fi | ||
4189 | 27 | echo "stopping gpg-agent " >&2 | ||
4190 | 28 | gpg-connect-agent KILLAGENT /bye >/dev/null 2>&1 | ||
4191 | 29 | exit 0 | ||
4192 | 30 | fi | ||
4193 | 31 | |||
4194 | 32 | if [ "$(gpg-connect-agent getval\ $token /bye 2>/dev/null | head -1)" \ | ||
4195 | 33 | = "D set" ]; then | ||
4196 | 34 | echo "gpg-agent already running" >&2 | ||
4197 | 35 | exit 0 | ||
4198 | 36 | fi | ||
4199 | 37 | |||
4200 | 38 | echo "starting gpg-agent " >&2 | ||
4201 | 39 | gpg-connect-agent putval\ $token\ set /bye >/dev/null 2>&1 | ||
4202 | 40 | if [ "$(gpg-connect-agent getval\ $token /bye 2>/dev/null | head -1)" \ | ||
4203 | 41 | != "D set" ]; then | ||
4204 | 42 | echo "error starting gpg-agent" >&2 | ||
4205 | 43 | exit 1 | ||
4206 | 44 | fi | ||
4207 | 45 | exit 0 |
"This was missing in the previous upload" is confusing for the copy&pasted merge changelog, I dropped this bit. Uploaded, thank you!