gnupg.git
8 months agoRelease 2.1.21 gnupg-2.1.21
Werner Koch [Mon, 15 May 2017 14:11:09 +0000 (16:11 +0200)]
Release 2.1.21

Signed-off-by: Werner Koch <wk@gnupg.org>
8 months agopo: Auto-update
Werner Koch [Mon, 15 May 2017 14:04:06 +0000 (16:04 +0200)]
po: Auto-update

--

8 months agopo: Update German translation
Werner Koch [Mon, 15 May 2017 14:00:37 +0000 (16:00 +0200)]
po: Update German translation

8 months agogpg: Do not mark ", " translatable.
Werner Koch [Mon, 15 May 2017 13:56:46 +0000 (15:56 +0200)]
gpg: Do not mark ", " translatable.

* g10/tofu.c (ask_about_binding): Remove useless translation markers.
--

Translation and in particular punctuation marks can only be translated
with context.  Thus making a sole comma translatable is useless.

Signed-off-by: Werner Koch <wk@gnupg.org>
8 months agodirmngr,w32: Fix ldap crl read on windows
Andre Heinecke [Wed, 26 Apr 2017 07:39:06 +0000 (09:39 +0200)]
dirmngr,w32: Fix ldap crl read on windows

Summary:
* dirmngr/ldap-wrapper-ce.c (outstream_cookie_s): Add buffer_read_pos.
(buffer_get_data): Use seperate read pos.

--
Using a single buffer pos for reading and writing caused the read
to return 0 as it read from the end of the buffer. Now we use
a seperate reader position.

Differential: D427

Signed-off-by: Andre Heinecke <aheinecke@intevation.de>
8 months agocommon: Let format_text return an error.
Werner Koch [Mon, 15 May 2017 07:58:27 +0000 (09:58 +0200)]
common: Let format_text return an error.

* common/stringhelp.c (format_text): Return NULL on error.
* common/t-stringhelp.c (test_format_text): Adjust for change.
* g10/gpgcompose.c (show_help): Abort on out of core.
* g10/tofu.c (ask_about_binding): Abort on format_text error.
(show_statistics): Ditto.
(show_warning): Ditto.
--

For better re-usability function in common/ shot  better not use
xmalloc functions.

Signed-off-by: Werner Koch <wk@gnupg.org>
8 months agotests: Also run all OpenPGP tests using keyrings.
Justus Winter [Thu, 11 May 2017 15:17:12 +0000 (17:17 +0200)]
tests: Also run all OpenPGP tests using keyrings.

* tests/openpgp/all-tests.scm: Run each test twice, once with public
keys stored in a keybox, once with a keyring.
* tests/openpgp/defs.scm (create-gpghome): Create a public keyring to
make GnuPG use that instead of creating a keybox if '--use-keyring' is
given.
* tests/openpgp/setup.scm: Fix flag handling and usage.
--

This parametrizes the OpenPGP tests.  With this change, the test suite
is able to detect problems with the keyring store, e.g. like the one
fixed in 22739433e98be80e46fe7d01d52a9627c1aebaae.

GnuPG-bug-id: 3080
Signed-off-by: Justus Winter <justus@g10code.com>
8 months agotests: Make it possible to run all tests using our infrastructure.
Justus Winter [Mon, 20 Mar 2017 09:30:08 +0000 (10:30 +0100)]
tests: Make it possible to run all tests using our infrastructure.

* Makefile.am (TESTS_ENVIRONMENT): New variable.
(check-all): New phony target to run all tests.
* tests/gpgme/gpgme-defs.scm (have-gpgme?): New function that tests
whether the GPGME test suite is available instead of exiting the
process.
* tests/gpgscm/init.scm (export): New macro.
* tests/gpgscm/tests.scm (run-tests): New function.
(load-tests): Likewise.
* tests/gpgme/run-tests.scm: Simplify and move the parsing of the list
of tests to 'all-tests.scm'.
* tests/gpgsm/run-tests.scm: Likewise.
* tests/migrations/run-tests.scm: Likewise.
* tests/openpgp/run-tests.scm: Likewise.
* tests/gpgme/Makefile.am: To select the tests to run, use the
variable 'TESTS'.  This harmonizes the interface with the automake
test suite.
* tests/gpgsm/Makefile.am: Likewise.
* tests/migrations/Makefile.am: Likewise.
* tests/openpgp/Makefile.am: Likewise.
* tests/openpgp/README: Likewise.
* agent/all-tests.scm: New file.
* common/all-tests.scm: Likewise.
* g10/all-tests.scm: Likewise.
* g13/all-tests.scm: Likewise.
* tests/gpgme/all-tests.scm: Likewise.
* tests/gpgsm/all-tests.scm: Likewise.
* tests/migrations/all-tests.scm: Likewise.
* tests/openpgp/all-tests.scm: Likewise.
* tests/run-tests.scm: Likewise.
--

This change allows us to run all tests in parallel and write one XML
report capturing the results of every test.  It also lays the
foundation to parametrize test suites.

Signed-off-by: Justus Winter <justus@g10code.com>
8 months agotests: Move the makefile parser.
Justus Winter [Mon, 20 Mar 2017 09:21:06 +0000 (10:21 +0100)]
tests: Move the makefile parser.

* tests/gpgme/gpgme-defs.scm (parse-makefile, parse-makefile-expand):
Move...
* tests/gpgscm/makefile.scm: ... here.
* tests/gpgscm/Makefile.am (EXTRA_DIST): Add new file.

Signed-off-by: Justus Winter <justus@g10code.com>
8 months agogpgscm: Make it possible to set the logfile name.
Justus Winter [Thu, 11 May 2017 12:44:33 +0000 (14:44 +0200)]
gpgscm: Make it possible to set the logfile name.

* tests/gpgscm/tests.scm (test): Only set the default log filename
when it has not been set before.

Signed-off-by: Justus Winter <justus@g10code.com>
8 months agodoc: Fix name of program.
Justus Winter [Thu, 11 May 2017 07:51:58 +0000 (09:51 +0200)]
doc: Fix name of program.

--
Signed-off-by: Justus Winter <justus@g10code.com>
8 months agoRegister DCO for Ineiev.
NIIBE Yutaka [Wed, 10 May 2017 03:15:23 +0000 (12:15 +0900)]
Register DCO for Ineiev.

--

Real name is confirmed by private mail.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
8 months agog10, sm, dirmngr, common: Add comment for fall through.
NIIBE Yutaka [Wed, 10 May 2017 02:01:15 +0000 (11:01 +0900)]
g10, sm, dirmngr, common: Add comment for fall through.

* common/b64dec.c (b64dec_proc): Comment to clarify.
* dirmngr/cdblib.c (cdb_make_put): Use same pattern to clarify.
* dirmngr/dirmngr-client.c (read_pem_certificate): Likewise.
* dirmngr/ks-engine-hkp.c (ks_hkp_get): Likewise.
* g10/armor.c (unarmor_pump): Likewise.
* g10/gpg.c (main): Likewise.
* g10/import.c (read_block): Likewise.
* g10/keygen.c (make_backsig): Likewise.
* g10/pkclist.c (check_signatures_trust):  Likewise.
* sm/gpgsm.c (main): Likewise.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
8 months agog10: Stop compiler warning for t-stutter.
NIIBE Yutaka [Wed, 10 May 2017 01:58:31 +0000 (10:58 +0900)]
g10: Stop compiler warning for t-stutter.

* g10/t-stutter.c (do_test): Refer current_test_group_failed.

--

Since this test does not follow the framework of TEST/TEST_P/ABORT,
the variable is not used.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
8 months agogpg: Properly account for ring trust packets.
Justus Winter [Mon, 8 May 2017 12:24:00 +0000 (14:24 +0200)]
gpg: Properly account for ring trust packets.

* g10/keyring.c (keyring_get_keyblock): Use the parser's packet count
instead of counting ourself.
* g10/packet.h (struct parse_packet_ctx_s): New field
'n_parsed_packets'.
(init_parse_packet): Initialize new field.
* g10/parse-packet.c (parse): Count packets.
--

The 'keyring' keystore depends on the number of packets for delete and
update operations.  With the rework of the ring trust packets, the
trust packets were no longer properly accounted for leading to keyring
corruptions.

The 'keybox' store was not affected.

GnuPG-bug-id: 3123
GnuPG-bug-id: 3135
GnuPG-bug-id: 3144
Fixes-commit: a8895c99a7d0750132477d80cd66caaf3a709113
Signed-off-by: Justus Winter <justus@g10code.com>
8 months agogpg: Fix typo.
Justus Winter [Mon, 8 May 2017 11:52:39 +0000 (13:52 +0200)]
gpg: Fix typo.

--
Signed-off-by: Justus Winter <justus@g10code.com>
8 months agotests: Clarify comments.
Justus Winter [Mon, 8 May 2017 10:37:20 +0000 (12:37 +0200)]
tests: Clarify comments.

--
Signed-off-by: Justus Winter <justus@g10code.com>
8 months agodoc: Fix documentation.
Justus Winter [Mon, 8 May 2017 10:18:19 +0000 (12:18 +0200)]
doc: Fix documentation.

--
Fixes-commit: da4db172f6f8fb254b770e59770c531a488e2400
Signed-off-by: Justus Winter <justus@g10code.com>
8 months agotests: Support tests that are expected to fail.
Justus Winter [Thu, 4 May 2017 13:12:49 +0000 (15:12 +0200)]
tests: Support tests that are expected to fail.

* tests/gpgscm/tests.scm (test-pool): Rework reporting.  Filter using
the computed test status instead of the return value.  Also print the
new categories 'failed expectedly' and 'passed unexpectedly'.
(test): If a test ends with a bang (!), it is expected to fail.  Adapt
status, status-string, and xml accordingly.
--

Allow tests to be marked as being expected to fail by appending a bang
(!) to the tests name.  If such a test fails, it will not be counted
as failure, but will still be prominently displayed in the report.  If
it succeeds unexpectedly, this is counted as a failure.

Fixes T3134.

GnuPG-bug-id: 3134
Signed-off-by: Justus Winter <justus@g10code.com>
8 months agotests: Add function to dump packets.
Justus Winter [Thu, 4 May 2017 12:24:50 +0000 (14:24 +0200)]
tests: Add function to dump packets.

* tests/openpgp/defs.scm (gpg-dump-packets): New function.

Signed-off-by: Justus Winter <justus@g10code.com>
8 months agospeedo,w32: Fix silent user mode installation
Andre Heinecke [Wed, 3 May 2017 14:28:24 +0000 (16:28 +0200)]
speedo,w32: Fix silent user mode installation

* build-aux/speedo/w32/inst.nsi (AddToPath): Move account
check here.
(PrintNonAdminWarning): Remove is_user_install variable.

--
The PrintNonAdminWarning is not called in silent mode so the
variable was never set.

Signed-off-by: Andre Heinecke <aheinecke@intevation.de>
8 months agogpgscm: Create and re-use frame objects.
Justus Winter [Thu, 6 Apr 2017 09:52:36 +0000 (11:52 +0200)]
gpgscm: Create and re-use frame objects.

* tests/gpgscm/scheme-private.h (struct scheme): New field
'frame_freelist'.
* tests/gpgscm/scheme.c (enum scheme_types): New type 'T_FRAME'.
(type_to_string): Handle new type.
(settype): New macro.
(gc_disable): Make sure there is at least one frame in the free list.
(mark): Handle frame objects.
(finalize_cell): Likewise.
(dump_stack_initialize): Initialize free list.
(dump_stack_free): Simplify.
(frame_length): New variable.
(dump_stack_make_frame): New function.
(frame_slots): Likewise.
(frame_payload): New macro.
(dump_stack_allocate_frame): New function.
(dump_stack_deallocate_frame): Likewise.
(dump_stack_preallocate_frame): Likewise.
(_s_return): Unpack frame object and deallocate it.
(s_save): Wrap state in an frame object.
(dump_stack_mark): Mark the free list.
--

TinySCHEME being a SECD-machine needs to push frames onto the dump
stack.  Previously, the dump stack was a list.  This required four
cells for the spine, as well as up to one additional cell to encode
the current opcode.  This was quite inefficient despite the fact that
we recovered the spine as well as the integer cell.

We introduce frame objects, which are a special variant of vectors of
length four.  Since the length is fixed, this frees up the length
field of the vector object to store the unboxed opcode.  A frame
object now fits in two cells.

Saving two or three cells is a mere byproduct, the performance gain
comes from increased locality, unboxed opcode representation, and the
ability to easily put the objects in a free list, keeping the garbage
collector out of the continuous motion of the virtual machine.

Signed-off-by: Justus Winter <justus@g10code.com>
8 months agogpgscm: Merge opexe_0.
Justus Winter [Wed, 5 Apr 2017 15:30:44 +0000 (17:30 +0200)]
gpgscm: Merge opexe_0.

* tests/gpgscm/scheme-private.h (struct scheme): Remove field 'op'.
* tests/gpgscm/scheme.c (opexe_0): Inline into 'Eval_Cycle'.
(_Error_1): Return the opcode to evaluate next.
(Error_1): Do not return, but set the opcode and goto dispatch.
(Error_0): Likewise.
(s_goto): Likewise.
(s_return): Likewise.
(s_return_enable_gc): Likewise.
(s_thread_to): Remove superfluous cast.
(_s_return): Return the opcode to evaluate next.
(scheme_init_custom_alloc): Adapt to removal of field 'op'.

Signed-off-by: Justus Winter <justus@g10code.com>
8 months agospeedo,w32: Allow installation as normal user
Andre Heinecke [Wed, 3 May 2017 12:40:16 +0000 (14:40 +0200)]
speedo,w32: Allow installation as normal user

* build-aux/speedo/w32/g4wihelp.c (ENV_HK_USER, ENV_REG_USER):
New defines.
(path_add): Handle is_user_install variable. Don't abort
if Path reg key does not exist. Fix crash if Path reg key
does not contain a semicolon.
(path_remove): Handle is_user_install variable. Fix crash
if Path reg key does not exist.
* build-aux/speedo/w32/inst.nsi: Remove obsolete HAVE_STARTMENU
this was double guarded with WITH_GUI. Add Multiuser plugin and
defines for this. Use SHCTX instead of HKLM / HKCU.
(PrintNonAdminWarning): Only Warn and don't abort.

--
The default is still to install as Adminstrator system wide
but the user now has the option to explicitly install GnuPG without
Administrator rights. A warning will be shown in that case but
a user may continue.

A per user install is by default under %LOCALAPPDATA%\GnuPG

Related Task: T2971

Signed-off-by: Andre Heinecke <aheinecke@intevation.de>
8 months agog10: Remove skeleton options files.
Daniel Kahn Gillmor [Mon, 17 Apr 2017 14:51:55 +0000 (10:51 -0400)]
g10: Remove skeleton options files.

* build-aux/speed/w32/inst.nsi: stop installing skeleton files.
* doc/gpg.texi: stop documenting skeleton files.
* g10/Makefile.am: stop installing skeleton files.
* g10/openfile.c (copy_options_file): Remove.
(try_make_homedir): do not call copy_options_file.

--

The defaults for gpg and dirmngr are good.  Both programs should work
fine for the simple case without any config file.  The skeleton config
files were being copied at first use (when the defaults are fine).
But when the user needs to fiddle with them (after they've become
sophisticated users), they're likely out of date because gpg has been
upgraded since then.  So they're used for documentation, but they're
stale documentation, which is probably worse than a clean empty file.

GnuPG-bug-id: 3086
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
8 months agoSpelling fixes in docs and comments.
NIIBE Yutaka [Fri, 28 Apr 2017 01:06:33 +0000 (10:06 +0900)]
Spelling fixes in docs and comments.

--

In addition, fix trailing spaces in tests/inittests.

GnuPG-bug-id: 3121
Reported-by: ka7 (klemens)
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
8 months agog10: For signing, prefer available card key when no -u option.
NIIBE Yutaka [Thu, 27 Apr 2017 01:33:58 +0000 (10:33 +0900)]
g10: For signing, prefer available card key when no -u option.

* g10/skclist.c (build_sk_list): Ask gpg-agent if card is available.
Then, use the card key if any.

--

GnuPG-bug-id: 1983
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
8 months agog10: Minor clean up.
NIIBE Yutaka [Wed, 26 Apr 2017 02:39:28 +0000 (11:39 +0900)]
g10: Minor clean up.

* g10/main.h (complete_sig): Remove declaration.
* g10/sign.c (complete_sig): Make it static.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
8 months agodirmngr: Fix aliasing problem in dns.c.
NIIBE Yutaka [Tue, 25 Apr 2017 12:00:41 +0000 (21:00 +0900)]
dirmngr: Fix aliasing problem in dns.c.

* dirmngr/dns.c (dns_ai_setent): Care about aliasing.

--

Co-authored-by: Tomas Mraz
GnuPG-bug-id: 3105
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
8 months agotests: Remove *.conf.tmpl from Makefile.
NIIBE Yutaka [Tue, 25 Apr 2017 02:39:59 +0000 (11:39 +0900)]
tests: Remove *.conf.tmpl from Makefile.

* tests/openpgp/Makefile.am (TEST_FILES): Remove gpg.conf.tmpl
and gpg-agent.conf.tmpl.

--

Fixes-commit: 06a177ceea529269a7404740c60416bd6a4567b1
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
8 months agog10: invalidate the fd cache for keyring.
NIIBE Yutaka [Mon, 24 Apr 2017 22:48:51 +0000 (07:48 +0900)]
g10: invalidate the fd cache for keyring.

* g10/keyring.c (keyring_search_reset): Don't keep the FD cache.

--

GnuPG-bug-id: 3096
Fixes-commit: 5556eca5acd46983bff0b38a1ffbc2f07fbaba9f
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
8 months agow32: Enable wildcard expansion with mingw-w64
Andre Heinecke [Tue, 12 Aug 2014 19:22:23 +0000 (21:22 +0200)]
w32: Enable wildcard expansion with mingw-w64

* g10/gpg.c: Define _dowildcard = -1;

--
If this value is defined wildcard support in the c runtime
is enabled again. This fixes a regression caused by switching to
mingw 3.0

Signed-off-by: Andre Heinecke <aheinecke@intevation.de>
8 months agotests: Fix Python detection.
Justus Winter [Mon, 24 Apr 2017 15:32:41 +0000 (17:32 +0200)]
tests: Fix Python detection.

* tests/gpgme/gpgme-defs.scm (python): Fix Python detection.
--
In 25e6444b3f4601c7821beab06bc4520deacb007b we changed the way GPGME
creates the build directory for the Python bindings.  We now use the
basename of the interpreter as an identifier, that means we have to
get the base name right, a link to the same binary is not sufficient.

Signed-off-by: Justus Winter <justus@g10code.com>
8 months agogpgscm: Refactor cell finalization.
Justus Winter [Thu, 20 Apr 2017 15:39:41 +0000 (17:39 +0200)]
gpgscm: Refactor cell finalization.

* tests/gpgscm/scheme.c (finalize_cell): Use switch, return whether
the cell may be freed.
(gc): Update callsite.

Signed-off-by: Justus Winter <justus@g10code.com>
8 months agogpgscm: Tweak error message display.
Justus Winter [Thu, 20 Apr 2017 15:38:43 +0000 (17:38 +0200)]
gpgscm: Tweak error message display.

* tests/gpgscm/init.scm (throw'): If the first argument to the error
is a string, display it as such.

Signed-off-by: Justus Winter <justus@g10code.com>
8 months agotests: Deduplicate and simplify code.
Justus Winter [Thu, 20 Apr 2017 15:35:15 +0000 (17:35 +0200)]
tests: Deduplicate and simplify code.

* tests/gpgme/gpgme-defs.scm (create-file): Move...
* tests/gpgsm/gpgsm-defs.scm (create-file): ... likewise...
* tests/openpgp/defs.scm (create-file): Here.
(create-gpghome): Use 'create-file'.
* tests/openpgp/gpg-agent.conf.tmpl: Delete file.
* tests/openpgp/gpg.conf.tmpl: Likewise.

Signed-off-by: Justus Winter <justus@g10code.com>
8 months agogpgscm: Fix test.
Justus Winter [Thu, 20 Apr 2017 15:32:25 +0000 (17:32 +0200)]
gpgscm: Fix test.

* tests/gpgscm/t-child.scm: Use 'string-length' on the string.

Signed-off-by: Justus Winter <justus@g10code.com>
8 months agogpgscm: Improve syntax checking.
Justus Winter [Thu, 20 Apr 2017 13:09:13 +0000 (15:09 +0200)]
gpgscm: Improve syntax checking.

* tests/gpgscm/scheme.c (opexe_0): Make sure closure arguments are
symbols.

Signed-off-by: Justus Winter <justus@g10code.com>
8 months agogpgscm: Emit JUnit-style XML reports.
Justus Winter [Tue, 18 Apr 2017 16:51:06 +0000 (18:51 +0200)]
gpgscm: Emit JUnit-style XML reports.

* tests/gpgscm/Makefile.am (EXTRA_DIST): Add new file.
* tests/gpgscm/lib.scm (string-translate): New function.
* tests/gpgscm/main.c (main): Load new file.
* tests/gpgscm/tests.scm (dirname): New function.
(test-pool): Record execution times, emit XML report.
(test): Record execution times, record log file name, emit XML report.
(run-tests-parallel): Write XML report.
(run-tests-sequential): Likewise.
* tests/gpgscm/xml.scm: New file.
* tests/gpgme/Makefile.am (CLEANFILES): Add 'report.xml'.
* tests/gpgsm/Makefile.am: Likewise.
* tests/migrations/Makefile.am: Likewise.
* tests/openpgp/Makefile.am: Likewise.

Signed-off-by: Justus Winter <justus@g10code.com>
8 months agogpgscm: Make logging less verbose and more useful.
Justus Winter [Thu, 20 Apr 2017 09:49:17 +0000 (11:49 +0200)]
gpgscm: Make logging less verbose and more useful.

* tests/gpgscm/tests.scm (call-with-io): When being verbose, include
the pid in the output, and avoid duplicating the command arguments.

Signed-off-by: Justus Winter <justus@g10code.com>
8 months agogpgscm: Make test framework less functional.
Justus Winter [Tue, 18 Apr 2017 10:27:49 +0000 (12:27 +0200)]
gpgscm: Make test framework less functional.

* tests/gpgscm/tests.scm (test-pool, tests): Previously, these methods
updated objects by creating new updated copies of the object being
manipulated.  This made the code awkward without any benefit,
therefore I change it to just update the object.

Signed-off-by: Justus Winter <justus@g10code.com>
8 months agotests: Locate resources and scripts relative to top source dir.
Justus Winter [Wed, 22 Mar 2017 11:40:42 +0000 (12:40 +0100)]
tests: Locate resources and scripts relative to top source dir.

--

Locate every resource and every script used in the tests using a path
relative to the top of the source tree.

This is a purely mechanical change, mostly done using regular
expressions, with a few manual fixups here and there.

Signed-off-by: Justus Winter <justus@g10code.com>
8 months agogpgscm: Move 'trace' and 'stringify'.
Justus Winter [Wed, 19 Apr 2017 14:09:44 +0000 (16:09 +0200)]
gpgscm: Move 'trace' and 'stringify'.

* tests/gpgscm/tests.scm (trace, stringify): Move...
* tests/gpgscm/lib.scm: ... here.

Signed-off-by: Justus Winter <justus@g10code.com>
8 months agogpgscm: Avoid fruitless garbage collection cycles.
Justus Winter [Thu, 20 Apr 2017 13:04:52 +0000 (15:04 +0200)]
gpgscm: Avoid fruitless garbage collection cycles.

* tests/gpgscm/scheme-private.h (CELL_MINRECOVER): New macro.
* tests/gpgscm/scheme.c (_get_cell): Move the heuristic to get more
cells...
(gc): ... here where every caller benefits from the optimization.

Signed-off-by: Justus Winter <justus@g10code.com>
8 months agog13: Fix for Solaris.
NIIBE Yutaka [Thu, 20 Apr 2017 11:43:29 +0000 (20:43 +0900)]
g13: Fix for Solaris.

* configure.ac: Check sys/mkdev.h.
* g13/sh-dmcrypt.c: Include sys/mkdev.h.

--

GnuPG-bug-id: 3098
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agodirmngr: Fix final close of LISTEN_FD.
NIIBE Yutaka [Tue, 18 Apr 2017 00:04:11 +0000 (09:04 +0900)]
dirmngr: Fix final close of LISTEN_FD.

* dirmngr/dirmngr.c (handle_connections): Close LISTEN_FD.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agodirmngr: Fix API difference for Windows.
NIIBE Yutaka [Tue, 18 Apr 2017 00:03:14 +0000 (09:03 +0900)]
dirmngr: Fix API difference for Windows.

* dirmngr/http.c (read_server, write_server): Use assuan_fd_t.
(http_wait_response): Use FD2INT to get unsigned integer fd.
(read_server, write_server): Likewise.
(simple_cookie_read, simple_cookie_write): Use assuan_fd_t.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agoagent: More minor change.
NIIBE Yutaka [Mon, 17 Apr 2017 11:03:36 +0000 (20:03 +0900)]
agent: More minor change.

* agent/command.c (cmd_pksign): Remove redundant assignment.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agoagent: Minor cleanup.
NIIBE Yutaka [Mon, 17 Apr 2017 07:43:36 +0000 (16:43 +0900)]
agent: Minor cleanup.

* agent/command-ssh.c (ssh_key_to_protected_buffer): Not touch ERR.
* agent/command.c (cmd_genkey, cmd_import_key): Clean up.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agotests: Minor memory fix.
NIIBE Yutaka [Mon, 17 Apr 2017 00:44:37 +0000 (09:44 +0900)]
tests: Minor memory fix.

* tests/openpgp/fake-pinentry.c (get_passphrase): Free the memory.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agog10: Fix parse_ring_trust.
NIIBE Yutaka [Mon, 17 Apr 2017 00:33:19 +0000 (09:33 +0900)]
g10: Fix parse_ring_trust.

* g10/parse-packet.c (parse_ring_trust): Fix condition.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agog10: Minor fixes.
NIIBE Yutaka [Mon, 17 Apr 2017 00:15:13 +0000 (09:15 +0900)]
g10: Minor fixes.

* g10/export.c (cleartext_secret_key_to_openpgp): No initialization.
(do_export_one_keyblock): Initialize with GPG_ERR_NOT_FOUND.
* g10/getkey.c (get_best_pubkey_byname): Add non-null check.
* g10/tofu.c (tofu_set_policy): ERR initialize to 0.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agog10: Fix import/export filter property match.
NIIBE Yutaka [Mon, 17 Apr 2017 00:08:31 +0000 (09:08 +0900)]
g10: Fix import/export filter property match.

* g10/import.c (impex_filter_getval): Fix to "else if".

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agoagent: Clean up error initialize/return.
NIIBE Yutaka [Fri, 14 Apr 2017 03:54:06 +0000 (12:54 +0900)]
agent: Clean up error initialize/return.

* agent/call-pinentry.c (start_pinentry): Return RC.
* agent/command-ssh.c (ssh_handler_request_identities): Don't set ERR.
* agent/findkey.c (try_unprotect_cb): Return ERR.
(unprotect): Don't set RC.
* agent/gpg-agent.c (handle_connections): Don't set fd.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agodirmngr: More fix for test program.
NIIBE Yutaka [Fri, 14 Apr 2017 00:18:41 +0000 (09:18 +0900)]
dirmngr: More fix for test program.

* dirmngr/t-http.c (main): Care about no TLS.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agodirmngr: More fix for Windows.
NIIBE Yutaka [Thu, 13 Apr 2017 23:32:49 +0000 (08:32 +0900)]
dirmngr: More fix for Windows.

* dirmngr/http.c (simple_cookie_read, simple_cookie_write): Only
valid with HTTP_USE_NTBTLS.
(_my_socket_new): Simply cast to int since it's for debug.
(_my_socket_ref, _my_socket_unref): Likewise.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agodirmngr: Fix http.c for sockaddr_storage.
NIIBE Yutaka [Thu, 13 Apr 2017 05:46:57 +0000 (14:46 +0900)]
dirmngr: Fix http.c for sockaddr_storage.

dirmngr/http.c (use_socks): Use sockaddr_storage.
(my_sock_new_for_addr, connect_server): Likewise.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agodirmngr: Fix alignment of ADDR.
NIIBE Yutaka [Thu, 13 Apr 2017 05:33:33 +0000 (14:33 +0900)]
dirmngr: Fix alignment of ADDR.

* dirmngr/dns-stuff.h (dns_addrinfo_s): Use struct sockaddr_storage
for size and alignment.
* dirmngr/dns-stuff.c (resolve_name_libdns): Follow the change.
(resolve_dns_name): Use struct sockaddr_storage.
(resolve_addr_standard, resolve_dns_addr): Likewise.
(resolve_dns_addr): Likewise.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agodirmngr: Fix thread key type.
NIIBE Yutaka [Thu, 13 Apr 2017 04:06:38 +0000 (13:06 +0900)]
dirmngr: Fix thread key type.

* dirmngr/dirmngr.c (my_tlskey_current_fd): Use npth_key_t.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agocommon, g10: Fix enumeration types.
NIIBE Yutaka [Thu, 13 Apr 2017 03:54:52 +0000 (12:54 +0900)]
common, g10: Fix enumeration types.

* common/openpgpdefs.h (CIPHER_ALGO_PRIVATE10, PUBKEY_ALGO_PRIVATE10)
(DIGEST_ALGO_PRIVATE10, COMPRESS_ALGO_PRIVATE10): New.
* g10/misc.c (map_pk_gcry_to_openpgp): Add type conversion.
(map_cipher_openpgp_to_gcry, openpgp_cipher_algo_name)
(openpgp_pk_test_algo2, map_md_openpgp_to_gcry)
(pubkey_get_npkey): Add default handling.

--

Compilers may emit code assuming the maximum value of enum type.
According to OpenPGP specification, there are cases for private uses.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agodirmngr: More fix for Windows.
NIIBE Yutaka [Thu, 13 Apr 2017 00:52:19 +0000 (09:52 +0900)]
dirmngr: More fix for Windows.

* dirmngr/dns.c (socket_fd_t, STDCALL): New.
(dns_te_initname): Use.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agodirmngr: Fix type of sock.
NIIBE Yutaka [Wed, 12 Apr 2017 11:50:50 +0000 (20:50 +0900)]
dirmngr: Fix type of sock.

* dirmngr/http.c (send_request): Use assuan_fd_t for SOCK.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agotools: Fix condition for gpg-connect-agent.
NIIBE Yutaka [Wed, 12 Apr 2017 07:01:16 +0000 (16:01 +0900)]
tools: Fix condition for gpg-connect-agent.

* tools/gpg-connect-agent.c (start_agent): Add paren.

--

The intention is comparing the error code depending opt.use_dirmngr.
Considering C Operator Precedence, we should have paren here.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agodirmngr: Fix possible null reference.
NIIBE Yutaka [Wed, 12 Apr 2017 06:58:11 +0000 (15:58 +0900)]
dirmngr: Fix possible null reference.

* dirmngr/dns.c (dns_error_t dns_trace_fput): Check NULL.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agocommon: Simplify format_text.
NIIBE Yutaka [Wed, 12 Apr 2017 05:47:30 +0000 (14:47 +0900)]
common: Simplify format_text.

* common/stringhelp.c (format_text): Don't allow IN_PLACE formatting.
* common/stringhelp.h: Change the API with no IN_PLACE.
* common/t-stringhelp.c (test_format_text): Follow the change.
* g10/gpgcompose.c (show_help): Likewise.
* g10/tofu.c (format_conflict_msg_part1, ask_about_binding)
(show_statistics, show_warning): Likewise.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agogpgscm: Fix test program.
NIIBE Yutaka [Wed, 12 Apr 2017 03:05:53 +0000 (12:05 +0900)]
gpgscm: Fix test program.

* tests/gpgscm/t-child.c (main): Fix for setmode.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agodirmngr: Fix plus1_ns.
NIIBE Yutaka [Wed, 12 Apr 2017 02:44:10 +0000 (11:44 +0900)]
dirmngr: Fix plus1_ns.

* dirmngr/dns.c (plus1_ns): Fix the initial implementation.

--

Fixes-commit: 64904ce627b6b0661acf15b5b70103c4842bb0f3
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agoscd: Handle unexpected suspend/resume by CCID driver.
NIIBE Yutaka [Wed, 12 Apr 2017 02:21:08 +0000 (11:21 +0900)]
scd: Handle unexpected suspend/resume by CCID driver.

* scd/ccid-driver.c (bulk_in): Handle unexpected failure.

--

GnuPG-bug-id: 3083
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agodirmngr: Fix dns-stuff.c in another way.
NIIBE Yutaka [Wed, 12 Apr 2017 01:19:27 +0000 (10:19 +0900)]
dirmngr: Fix dns-stuff.c in another way.

* dirmngr/dns-stuff.c (T_CERT): Define our own.

--

T_CERT may be defined by another enum type even if the value is same.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agoRevert "dirmngr: Fix dns-stuff.c."
NIIBE Yutaka [Wed, 12 Apr 2017 01:00:37 +0000 (10:00 +0900)]
Revert "dirmngr: Fix dns-stuff.c."

This reverts commit 1538523156be568046f632d1775eae30ea8bd556.

9 months agodirmngr: Fix dns-stuff.c.
NIIBE Yutaka [Wed, 12 Apr 2017 00:48:27 +0000 (09:48 +0900)]
dirmngr: Fix dns-stuff.c.

* dirmngr/dns-stuff.c: Don't include arpa/nameser.h.

--

It is not needed at all.  T_CERT may be defined by different type of
ns_type.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agoagent: Simplify stream_read_cstring.
NIIBE Yutaka [Wed, 12 Apr 2017 00:24:48 +0000 (09:24 +0900)]
agent: Simplify stream_read_cstring.

* agent/command-ssh.c (stream_read_cstring): Just call
stream_read_string.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agodirmngr: Use a function to increment network short.
NIIBE Yutaka [Wed, 12 Apr 2017 00:11:20 +0000 (09:11 +0900)]
dirmngr: Use a function to increment network short.

* dirmngr/dns.c (plus1_ns): New.
(dns_p_push): Use it.

--

On OpenBSD, htons and ntohs are expanded to GCC's statement
expressions where local variable is allowed.  Consecutive use
of htons and ntohs causes problem of variable name.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agog10: Minor clean up for export.c.
NIIBE Yutaka [Tue, 11 Apr 2017 23:47:23 +0000 (08:47 +0900)]
g10: Minor clean up for export.c.

* g10/export.c (export_ssh_key): Check IDENTIFIER for error.
Release base64 thing on error of get_membuf.

--

Compiler (older) may misunderstand the variable IDENTIFIER is not
initialized, while good one can do better analysys on the value for
ERR (and thus, IDENTIFIER).

On the error of get_membuf, still, b64enc_finish should be called,
even if it lost the ERR value.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agog13: Include sys/sysmacros.h if available.
NIIBE Yutaka [Tue, 11 Apr 2017 10:59:07 +0000 (19:59 +0900)]
g13: Include sys/sysmacros.h if available.

* configure.ac: Add test for sys/sysmacros.h.
* g13/sh-dmcrypt.c: Include sys/sysmacros.h.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agotests: Fix distcheck.
Justus Winter [Tue, 11 Apr 2017 09:50:54 +0000 (11:50 +0200)]
tests: Fix distcheck.

* tests/gpgscm/Makefile.am (EXTRA_DIST): Add 'gnupg.scm'.

Fixes-commit: ccd2187212c12b84c86a10fd4417a16536243179
Signed-off-by: Justus Winter <justus@g10code.com>
9 months agotests: Avoid relying on implicit gpg commands.
Justus Winter [Tue, 11 Apr 2017 09:37:37 +0000 (11:37 +0200)]
tests: Avoid relying on implicit gpg commands.

* tests/openpgp/armdetach.scm: Always use an explicit command instead
of relying on gpg to guess what we want.
* tests/openpgp/armdetachm.scm: Likewise.
* tests/openpgp/armencrypt.scm: Likewise.
* tests/openpgp/armencryptp.scm: Likewise.
* tests/openpgp/armor.scm: Likewise.
* tests/openpgp/armsignencrypt.scm: Likewise.
* tests/openpgp/armsigs.scm: Likewise.
* tests/openpgp/clearsig.scm: Likewise.
* tests/openpgp/compression.scm: Likewise.
* tests/openpgp/conventional-mdc.scm: Likewise.
* tests/openpgp/conventional.scm: Likewise.
* tests/openpgp/decrypt-dsa.scm: Likewise.
* tests/openpgp/decrypt.scm: Likewise.
* tests/openpgp/detach.scm: Likewise.
* tests/openpgp/detachm.scm: Likewise.
* tests/openpgp/ecc.scm: Likewise.
* tests/openpgp/encrypt-dsa.scm: Likewise.
* tests/openpgp/encrypt-multifile.scm: Likewise.
* tests/openpgp/encrypt.scm: Likewise.
* tests/openpgp/encryptp.scm: Likewise.
* tests/openpgp/seat.scm: Likewise.
* tests/openpgp/signencrypt-dsa.scm: Likewise.
* tests/openpgp/signencrypt.scm: Likewise.
* tests/openpgp/sigs-dsa.scm: Likewise.
* tests/openpgp/sigs.scm: Likewise.

Signed-off-by: Justus Winter <justus@g10code.com>
9 months agotests: Make tests more robust.
Justus Winter [Tue, 11 Apr 2017 08:46:09 +0000 (10:46 +0200)]
tests: Make tests more robust.

* tests/openpgp/defs.scm (have-opt-always-trust): Execute in empty
ephemeral home directory.  This prevents gpg from picking up the
configuration from the current gnupghome (if any).
* tests/migrations/common.scm (untar-armored): Likewise.

Signed-off-by: Justus Winter <justus@g10code.com>
9 months agotests: Move common functionality.
Justus Winter [Tue, 11 Apr 2017 08:43:52 +0000 (10:43 +0200)]
tests: Move common functionality.

* tests/openpgp/defs.scm (with-home-directory,
with-ephemeral-home-directory): Move...
* tests/gpgscm/gnupg.scm: ... to this new file.
* tests/gpgscm/main.c (main): Load the new file.

Signed-off-by: Justus Winter <justus@g10code.com>
9 months agodirmngr: Fix build for Windows.
NIIBE Yutaka [Tue, 11 Apr 2017 07:12:34 +0000 (16:12 +0900)]
dirmngr: Fix build for Windows.

* dirmngr/ldap-wrapper-ce.c (outstream_cookie_writer): Use
gpgrt_ssize_t.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agog10,tools: Fix bzlib.h include order.
NIIBE Yutaka [Tue, 11 Apr 2017 04:52:19 +0000 (13:52 +0900)]
g10,tools: Fix bzlib.h include order.

* g10/compress-bz2.c: Include bzlib.h after gcrypt.h.
* tools/gpgsplit.c: Likewise.

--

bzlib.h may include windows.h on Windows.  It is better
after gcrypt.h which may include winsock2.h.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agog10: Minor clean up for TOFU.
NIIBE Yutaka [Tue, 11 Apr 2017 03:51:47 +0000 (12:51 +0900)]
g10: Minor clean up for TOFU.

* g10/tofu.c (ask_about_binding): Fix for qualifier.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agocommon: Portability fix for logging.c.
NIIBE Yutaka [Tue, 11 Apr 2017 02:53:52 +0000 (11:53 +0900)]
common: Portability fix for logging.c.

* common/logging.c (S_IRGRP, S_IWGRP, S_IROTH, S_IWOTH): Avoid
duplicated definition.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agotools: Portability fix for gpgparsemail.
NIIBE Yutaka [Tue, 11 Apr 2017 02:23:05 +0000 (11:23 +0900)]
tools: Portability fix for gpgparsemail.

* tools/rfc822parse.c (my_stpcpy): Rename from stpcpy.

--

When HAVE_STPCPY is not defined (no definition in libc), still,
compiler may have definition as a built-in function (for some specific
case like second argument is constant).  In that case, having stpcpy
implementation with the same name but different signature ("static"
qualifier) is not good.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agogpgscm: Fix opcode dispatch.
Justus Winter [Wed, 5 Apr 2017 14:56:46 +0000 (16:56 +0200)]
gpgscm: Fix opcode dispatch.

* tests/gpgscm/scheme.c (opexe_0): Consider 'op', not 'sc->op'.  The
former is the opcode we are currently executing.

Signed-off-by: Justus Winter <justus@g10code.com>
9 months agogpgscm: Mmap script files.
Justus Winter [Wed, 5 Apr 2017 12:11:57 +0000 (14:11 +0200)]
gpgscm: Mmap script files.

* tests/gpgscm/main.c (load): Try to mmap the script.
* tests/gpgscm/scheme.c (scheme_load_memory): New function, a
generalization of 'scheme_load_string'.
* tests/gpgscm/scheme.h (scheme_load_memory): New prototype.

Signed-off-by: Justus Winter <justus@g10code.com>
9 months agogpgscm: Refactor checking for opcode arguments.
Justus Winter [Mon, 3 Apr 2017 09:25:49 +0000 (11:25 +0200)]
gpgscm: Refactor checking for opcode arguments.

* tests/gpgscm/scheme.c (op_code_info): Fix type, add forward
declaration.
(check_arguments): New function.
(Eval_cycle): Use the new function.

Signed-off-by: Justus Winter <justus@g10code.com>
9 months agogpgscm: Improve syntax dispatch.
Justus Winter [Wed, 29 Mar 2017 16:10:17 +0000 (18:10 +0200)]
gpgscm: Improve syntax dispatch.

* tests/gpgscm/scheme.c (assign_syntax): Add opcode parameter, store
opcode in the tag.
(syntaxnum): Add sc parameter, retrieve opcode from tag.
(opexe_0): Adapt callsite.
(scheme_init_custom_alloc): Likewise.

Signed-off-by: Justus Winter <justus@g10code.com>
9 months agogpgscm: Make tags mandatory.
Justus Winter [Wed, 29 Mar 2017 16:05:33 +0000 (18:05 +0200)]
gpgscm: Make tags mandatory.

* tests/gpgscm/opdefines.h: Make tags mandatory.
* tests/gpgscm/scheme.c: Likewise.
* tests/gpgscm/scheme.h: Likewise.
--

Tags provide a constant-time lookup mechanism for almost every object.
This is useful for the interpreter itself, and the code for tags is
tiny.

Signed-off-by: Justus Winter <justus@g10code.com>
9 months agogpgscm: Add and use opcode for reversing a list in place.
Justus Winter [Tue, 4 Apr 2017 10:02:54 +0000 (12:02 +0200)]
gpgscm: Add and use opcode for reversing a list in place.

* tests/gpgscm/lib.scm (string-split-pln): Use 'reverse!'.
(string-rtrim): Likewise.
* tests/gpgscm/opdefines.h (reverse!): New opcode.
* tests/gpgscm/scheme.c (opexe_0): Handle new opcode.

Signed-off-by: Justus Winter <justus@g10code.com>
9 months agogpgscm: Deduplicate code.
Justus Winter [Wed, 29 Mar 2017 15:09:01 +0000 (17:09 +0200)]
gpgscm: Deduplicate code.

* tests/gpgscm/scheme.c (oblist_add_by_name): Deduplicate.
(new_slot_spec_in_env): Likewise.

Fixes-commit: 6a3f857224eab108ae38e6259194b01b0ffdad8b
Signed-off-by: Justus Winter <justus@g10code.com>
9 months agogpgscm: Move dispatch table into rodata.
Justus Winter [Wed, 29 Mar 2017 14:32:36 +0000 (16:32 +0200)]
gpgscm: Move dispatch table into rodata.

* tests/gpgscm/opdefines.h: Use 0 instead of NULL.
* tests/gpgscm/scheme.c (op_code_info): Use char arrays instead of
pointers, make arity parameters smaller.
(INF_ARG): Adapt.
(_OP_DEF): Likewise.
(dispatch_table): Likewise.
(procname): Likewise.
(Eval_cycle): Likewise.
(scheme_init_custom_alloc): Likewise.

Signed-off-by: Justus Winter <justus@g10code.com>
9 months agogpgscm: Use more threaded code.
Justus Winter [Wed, 29 Mar 2017 12:24:49 +0000 (14:24 +0200)]
gpgscm: Use more threaded code.

* tests/gpgscm/scheme.c (opexe_0): Use 's_thread_to' instead of
's_goto' wherever possible.

Signed-off-by: Justus Winter <justus@g10code.com>
9 months agogpgscm: Remove now obsolete dispatcher function from the opcodes.
Justus Winter [Wed, 29 Mar 2017 12:11:58 +0000 (14:11 +0200)]
gpgscm: Remove now obsolete dispatcher function from the opcodes.

* tests/gpgscm/opdefines.h: Remove now obsolete dispatcher function
from the opcodes.
* tests/gpgscm/scheme-private.h (_OP_DEF): Adapt.
* tests/gpgscm/scheme.c (dispatch_func): Remove type declaration.
(op_code_info): Remove 'func'.
(_OP_DEF): Adapt.
(Eval_Cycle): Always call 'opexe_0'.

Signed-off-by: Justus Winter <justus@g10code.com>
9 months agogpgscm: Merge 'opexe_6'.
Justus Winter [Wed, 29 Mar 2017 12:05:22 +0000 (14:05 +0200)]
gpgscm: Merge 'opexe_6'.

* tests/gpgscm/scheme.c (opexe_6): Merge into 'opexe_0'.
* tests/gpgscm/opdefines.h: Adapt.
--

Having separate functions to execute opcodes reduces our ability to
thread the code and prevents the dispatch_table from being moved to
rodata.

Signed-off-by: Justus Winter <justus@g10code.com>
9 months agogpgscm: Merge 'opexe_5'.
Justus Winter [Wed, 29 Mar 2017 11:57:54 +0000 (13:57 +0200)]
gpgscm: Merge 'opexe_5'.

* tests/gpgscm/scheme.c (opexe_5): Merge into 'opexe_0'.
* tests/gpgscm/opdefines.h: Adapt.
--

Having separate functions to execute opcodes reduces our ability to
thread the code and prevents the dispatch_table from being moved to
rodata.

Signed-off-by: Justus Winter <justus@g10code.com>
9 months agogpgscm: Merge 'opexe_4'.
Justus Winter [Wed, 29 Mar 2017 11:47:54 +0000 (13:47 +0200)]
gpgscm: Merge 'opexe_4'.

* tests/gpgscm/scheme.c (opexe_4): Merge into 'opexe_0'.
* tests/gpgscm/opdefines.h: Adapt.
--

Having separate functions to execute opcodes reduces our ability to
thread the code and prevents the dispatch_table from being moved to
rodata.

Signed-off-by: Justus Winter <justus@g10code.com>
9 months agogpgscm: Merge 'opexe_3'.
Justus Winter [Wed, 29 Mar 2017 11:45:25 +0000 (13:45 +0200)]
gpgscm: Merge 'opexe_3'.

* tests/gpgscm/scheme.c (opexe_3): Merge into 'opexe_0'.
* tests/gpgscm/opdefines.h: Adapt.
--

Having separate functions to execute opcodes reduces our ability to
thread the code and prevents the dispatch_table from being moved to
rodata.

Signed-off-by: Justus Winter <justus@g10code.com>
9 months agogpgscm: Merge 'opexe_2'.
Justus Winter [Wed, 29 Mar 2017 11:40:01 +0000 (13:40 +0200)]
gpgscm: Merge 'opexe_2'.

* tests/gpgscm/scheme.c (opexe_2): Merge into 'opexe_0'.
* tests/gpgscm/opdefines.h: Adapt.
--

Having separate functions to execute opcodes reduces our ability to
thread the code and prevents the dispatch_table from being moved to
rodata.

Signed-off-by: Justus Winter <justus@g10code.com>
9 months agogpgscm: Merge 'opexe_1'.
Justus Winter [Wed, 29 Mar 2017 11:32:38 +0000 (13:32 +0200)]
gpgscm: Merge 'opexe_1'.

* tests/gpgscm/scheme.c (opexe_1): Merge into 'opexe_0'.
* tests/gpgscm/opdefines.h: Adapt.
--

Having separate functions to execute opcodes reduces our ability to
thread the code and prevents the dispatch_table from being moved to
rodata.

Signed-off-by: Justus Winter <justus@g10code.com>