* 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>
* 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: a8895c99a7
Signed-off-by: Justus Winter <justus@g10code.com>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
--
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>
* 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>
* 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>
* 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>
* 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>