aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* core: Support all components with dirinfo()Ingo Klöcker2021-12-101-0/+55
| | | | | | | | | | | | | | | * src/dirinfo.c (WANT_KEYBOXD_NAME, WANT_AGENT_NAME, WANT_SCDAEMON_NAME, WANT_DIRMNGR_NAME, WANT_PINENTRY_NAME): New. (dirinfo): Add fields keyboxd_name, agent_name, scdaemon_name, dirmngr_name, pinentry_name. (parse_output): Support "keyboxd", "gpg-agent", "scdaemon", "dirmngr", "pinentry". (get_gpgconf_item): Return new components. tests/t-engine-info.c (main): Add new components to the output. -- GnuPG-bug-id: 5727
* core: Make the gpgconf option parsing of string types more robustWerner Koch2021-11-251-2/+4
| | | | | | | | | | | | * src/engine-gpgconf.c (gpgconf_parse_option): Skip the string indicator if it is not the empty string. -- Some versions of GnuPG (~2.2.28 to 2.2.33) returned a compliance indicator which should be an int but actually used string as type. Simply skipping the indicator without checking that this is the indicator does not allow to work around this type mismatch by the gpgme users.
* core: Support dirinfo("socketdir")Werner Koch2021-11-252-10/+22
| | | | | | | | | | | | | | | | | | | * src/dirinfo.c (WANT_SOCKETDIR): New. (dirinfo): Add field socketdir. (parse_output): Support "socketdir". (get_gpgconf_item): Return socketdir. * tests/t-engine-info.c (main): Add socketdir to the output. * src/w32-util.c (_gpgme_create_process_utf8): Fix indentation. -- GnuPG-bug-id: 5613 This is not strictly necessary because we could deduce this from one of the other socket info items but it is more clean to have a dedicated info item. The socketdir item is available for 5 years now (GnuPG commit 8e3fa5a4b205c534de2142e5d071712f957cf06a)
* posix: Use poll instead, when available, removing use of select.NIIBE Yutaka2021-11-253-12/+141
| | | | | | | | | | | | | * configure.ac (HAVE_POLL_H): Add the check. * src/ath.c [!HAVE_POLL_H] (ath_select): Enable conditionally. * src/posix-io.c [HAVE_POLL_H] (_gpgme_io_select_poll): Use poll. * tests/gpg/t-cancel.c [HAVE_POLL_H] (do_select): Use poll. * tests/gpg/t-eventloop.c [HAVE_POLL_H] (do_select): Use poll. -- GnuPG-bug-id: 2385 Signed-off-by: NIIBE Yutaka <[email protected]>
* gpgme.pc: Fix library dependency and use of includedir, libdir.NIIBE Yutaka2021-11-121-3/+3
| | | | | | | | | | | | | | | | * src/gpgme.pc.in (Require): Move gpg-error, libassuan to... (Requires.private): ... here. (Cflags): Add -I${includedir}. (Libs): Add -L${libdir}. -- This will result better library dependency for applications using gpgme. It will break build of an application which directly uses gpg-error or libassuan without specifying them (which means, depending on redundant/wrong gpgme.pc). Signed-off-by: NIIBE Yutaka <[email protected]>
* core: Use flexible array member if compiler has support.NIIBE Yutaka2021-08-131-3/+3
| | | | | | | | | | | | | * configure.ac (AC_C_FLEXIBLE_ARRAY_MEMBER): Add. * src/engine-gpg.c (struct arg_and_data_s): Use FLEXIBLE_ARRAY_MEMBER. (_add_arg): Use offsetof instead of sizeof. (add_data): Likewise. -- Before this fix, GCC 11 warns (with its bound checking feature). Signed-off-by: NIIBE Yutaka <[email protected]>
* core: Fix results returned by gpgme_data_* functionsIngo Klöcker2021-08-032-4/+36
| | | | | | | | | | | | | src/debug.h (TRACE_SYSRES_OFF_T, _trace_sysres_off_t, TRACE_SYSRES_SSIZE_T, _trace_sysres_ssize_t): New. src/data.c (gpgme_data_read, gpgme_data_write, gpgme_data_seek): Use appropriate new tracing macros instead of casting the results to int. -- This change adds tracing macros for results of system functions of type __off_t and __ssize_t. GnuPG-bug-id: 5481
* core: Support closefrom also for glibc.Jiri Kucera2021-07-271-1/+1
| | | | | | | | | | * src/posix-io.c (_gpgme_io_spawn): Use glibc's closefrom. -- Since 2.34, glibc introduces closefrom (the implementation follows *BSD standard). Signed-off-by: Werner Koch <[email protected]>
* core: Allow specifying an expiration date for key signaturesIngo Klöcker2021-06-223-0/+38
| | | | | | | | | | | | | | | | | | * src/context.h (struct gpgme_context): Add 'cert_expire'. * src/engine-gpg.c (append_args_from_cert_expire): New. (gpg_edit): Set option according to the new flag. * src/gpgme.c (gpgme_release): Free 'cert_expire'. (gpgme_set_ctx_flag, gpgme_get_ctx_flag): Add "cert-expire". * tests/gpg/Makefile.am (c_tests): Add new test. (gpg.conf): Write "allow-weak-key-signatures" to gpg.conf. * tests/gpg/t-edit-sign.c: New. -- The new context flag "cert-expire" allows setting the expiration date for key signatures created with gpgme_op_interact. GnuPG-bug-id: 5336, 5505
* core: New data flags "io-buffer-size" and "sensitive".Werner Koch2021-06-145-39/+164
| | | | | | | | | | | | | | | | | | | | | * src/data.c (_gpgme_data_release): Free buffers. (gpgme_data_seek): Adjust from renamed fields. (gpgme_data_set_flag): Implement new flags. (_gpgme_data_inbound_handler): Allow the use of a malloced buffer. (_gpgme_data_outbound_handler): Ditto. * src/data.h (BUFFER_SIZE): Move out of the struct definition. (struct gpgme_data): Remove pending filed and introduce inbound and outbound fields. * src/conversion.c (_gpgme_wipememory): New. Taken from GnuPG. * src/cJSON.c (wipememory): Use this here too. * tests/run-decrypt.c (main): Add options "--large-buffers" and "--sensitive". -- GnuPG-bug-id: 5478 Signed-off-by: Werner Koch <[email protected]>
* core: Also detect AuthEnvelopedData (AEAD for CMS)Werner Koch2021-06-142-3/+3
| | | | | | * src/data-identify.c (basic_detection): Add OID. Signed-off-by: Werner Koch <[email protected]>
* core,w32: Increase BUFFER_SIZE to 4096Andre Heinecke2021-06-101-0/+4
| | | | | | | | | | | * src/data.h (BUFFER_SIZE): Increase to 4096 for Windows. -- This brings it in line to the PIPE_BUF size on desktop Linux systems. This should increase performance when working with large files on Windows a bit. GnuPG-Bug-Id: T5478
* core: Explicitly add GPG_ERROR_CFLAGSAndre Heinecke2021-06-091-1/+1
| | | | | | | | | * src/Makefile.am (AM_CFLAGS): Add GPG_ERROR_CFLAGS -- This fixes the include directory for libgpg error if it is installed in a different prefix then libassuan. Previously libassuan provided the include directory also implicitly.
* core: Fix a few checks for number of fields in keylist result parser.Ingo Klöcker2021-06-021-3/+3
| | | | | | | | | * src/keylist.c (keylist_colon_handler): Check for correct number of fields. -- This prevents NULL pointer dereferencing with older versions of gpg that may output less fields.
* core: Make sure to stay ABI compatible.Werner Koch2021-05-121-3/+3
| | | | | | | | | | | * src/gpgme.h.in (struct _gpgme_key_sig): Move trust_scope to the end of the struct. -- Fixes-commit: 276187f6b62a73e92b1c20f589510f80ab9e88d2 Note that we assume that splitting a reserved 28 bit field into 3 fields does not change the ABI.
* core: Extend gpgme_key_sig_t with trust signature members.Ingo Klöcker2021-05-053-1/+35
| | | | | | | | | | | | | | * src/gpgme.h.in (struct _gpgme_key_sig): Add fields 'trust_depth', 'trust_value', and 'trust_scope'. * src/key.c (gpgme_key_unref): Free trust_scope. * src/keylist.c (keylist_colon_handler): Set the fields. * tests/run-keylist.c (main): Print the fields. -- The trust signature values are part of gpg's output since the year 2003. This now adds support to gpgme. GnuPG-bug-id: 5245, 5419
* core: New flag GPGME_KEYSIGN_FORCE.Werner Koch2021-03-112-0/+8
| | | | | | | | | | * src/gpgme.h.in (GPGME_KEYSIGN_FORCE): New. * src/engine-gpg.c (gpg_keysign): Implement. * tests/run-keysign.c (show_usage): Add option --force -- GnuPG-bug-id: 4584
* core: Remove experimental feature GPGME_EXPORT_MODE_NOUID.Werner Koch2021-02-013-10/+6
| | | | | | | | | | | | | | * src/export.c (export_start): Remove GPGME_EXPORT_MODE_NOUID check. * src/engine-gpg.c (export_common): Ditto. -- Note that this constant was never announed and used only for internal tests. It made it into some release only by accident. The constants is kept in gpgme.h to not break any code but it is non-fucntionals. We do not consider this an ABI break. GnuPG-bug-id: 5284
* Release 1.15.1gpgme-1.15.1Werner Koch2021-01-081-1/+1
|
* core: Make listing of signatures work if only secret keys are listedIngo Klöcker2021-01-051-0/+6
| | | | | | | | | | * src/engine-gpg.c (gpg_keylist_build_options): Add "--with-sig-check" argument if signatures shall be listed. * tests/gpg/t-keylist-secret-sig.c: New. * tests/gpg/Makefile.am (c_tests): Add new test. -- GnuPG-bug-id: 3580
* core: Call _gpgme_passphrase_status_handler when exporting keys.NIIBE Yutaka2020-11-241-0/+4
| | | | | | | | | * src/export.c (export_status_handler): Call the handler. -- Fixes-commit: 3382ecb17eb5d2a373cf2eccb301854fff42f6aa Signed-off-by: NIIBE Yutaka <[email protected]>
* m4: Update with newer autoconf constructs.NIIBE Yutaka2020-11-201-2/+2
| | | | | | * src/gpgme.m4: Replace AC_HELP_STRING to AS_HELP_STRING. Signed-off-by: NIIBE Yutaka <[email protected]>
* Release 1.15.0gpgme-1.15.0Werner Koch2020-11-121-2/+1
| | | | | | | | * configure.ac: Bump LT versions to c=C35/A24/R0, cpp=C18/A13/R0, qt=C12/A5/R0. -- GnuPG-bug-id: 5131
* core: Support exporting secret keys.NIIBE Yutaka2020-11-121-0/+16
| | | | | | | | | | | | * src/export.c (export_start): Set command handler for passphrase interaction for the case when it's secret keys. (export_ext_start): Likewise. -- GnuPG-bug-id: 5046 Co-authored-by: Louis Dupré Bertoni Signed-off-by: NIIBE Yutaka <[email protected]>
* Require at least libgpg-error 1.36Werner Koch2020-11-095-60/+8
| | | | | | | | | | | | | | | | * configure.ac (NEED_GPG_ERROR_VERSION): Require 1.36. * src/cJSON.c: Remove code for older version. * src/engine.c (gpgme_get_engine_info): Ditto. * src/gpgme-json.c: Ditto. * src/op-support.c: Ditto. * src/util.h: Ditto. -- Libgpg-error 1.36 has been released more than 18 months ago so it is time to avoid hacks and require this verion. This will for example help Kleopatra to support PIV cards and improves the gpgme-json. Signed-off-by: Werner Koch <[email protected]>
* Parse STATUS_CANCELED_BY_USER.Ben Kibbey2020-11-043-1/+6
| | | | | | | | | * src/gpgme.h.in (GPGME_STATUS_CANCELED_BY_USER): New. * src/status-table.c (status_table_s): Add "CANCELED_BY_USER". * src/passphrase.c (_gpgme_passphrase_status_handler): Return GPG_ERR_CANCELED during GPGME_STATUS_CANCELED_BY_USER. Signed-off-by: Ben Kibbey <[email protected]>
* core: New function gpgme_op_revsig.Ingo Klöcker2020-10-2916-1/+300
| | | | | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (gpgme_op_revsig_start, gpgme_op_revsig): New. (GPGME_REVSIG_LFSEP): New. * src/context.h (ctx_op_data_id_t): Add OPDATA_REVSIG. * src/revsig.c: New. * src/Makefile.am (main_sources): Add revsig. * src/libgpgme.vers, src/gpgme.def: Add gpgme_op_revsig and gpgme_op_revsig_start. * src/engine.h, src/engine.c: (_gpgme_engine_op_revsig): New. * src/engine-backend.h (engine_ops): Add 'revsig' and adjust all engine initializers. * src/engine-gpg.c (gpg_revsig): New. (_gpgme_engine_ops_gpg): Set revsig to gpg_revsig. * doc/gpgme.texi: Document new functions. * tests/run-keysign.c: Add option --revoke. -- This extends GPGME to support the --quick-revoke-sig command added by GnuPG 2.2.24. This allows revoking key signatures. GnuPG-bug-id: 5094
* gpgsm: Fix leaked fd.NIIBE Yutaka2020-10-011-1/+1
| | | | | | | | | | | * src/engine-gpgsm.c (gpgsm_new): Close gpgsm->diag_cb.server_fd. -- GnuPG-bug-id: 5074 Reported by: VladislavGrudinin Fixes-commit: dd21ec997cf4b6ba18538c63c728478110ad1f60 Signed-off-by: NIIBE Yutaka <[email protected]>
* core: Fully implement the inquire callback for assuan_transactWerner Koch2020-09-091-8/+17
| | | | | | | | | | | | | | | | | | | * src/engine-assuan.c (inquire_cb): Implement returning data. * tests/opassuan/t-command.c (inq_cb): Send some test data. -- The old code only allowed to send an empty response which was good enough for scdaemon's KNOWNCARDP inquire but not to send actual data. A quick test using a test smartcard might be ./t-command 'scd setattr --inquire PRIVATE-DO-1' and then reading the data back using gpg-connect-agent 'scd getattr PRIVATE-DO-1' /bye Signed-off-by: Werner Koch <[email protected]>
* core: Add error handling to setexpireIngo Klöcker2020-08-144-53/+195
| | | | | | | | | | | | | | | | | | | * src/genkey.c (setexpire, gpgme_op_setexpire_start, gpgme_op_setexpire): Move to ... * src/setexpire.c: New. * src/Makefile.am (main_sources): Add that file. * src/context.h (ctx_op_data_id_t): Add OPDATA_SETEXPIRE. * lang/qt/tests/t-various.cpp (testSetExpire): Test error handling. -- Errors (and failures) emitted via status-fd need to be handled explicitly, i.e. we need to provide an appropriate status handler with corresponding op_data_t. Additionally, we need to set a passphrase command handler if a passphrase callback is set in the context, e.g. during tests. GnuPG-bug-id: 4395
* core: New function gpgme_op_setexpire.Ingo Klöcker2020-08-0414-0/+147
| | | | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (gpgme_op_setexpire_start, gpgme_op_setexpire): New. * src/libgpgme.vers, src/gpgme.def: Add new functions. * src/genkey.c (setexpire): New. (gpgme_op_setexpire_start, gpgme_op_setexpire): New. * src/engine.h, src/engine.c: (_gpgme_engine_op_setexpire): New. * src/engine-backend.h (engine_ops): Add 'setexpire' and adjust all engine initializers. * src/engine-gpg.c (gpg_setexpire): New. (_gpgme_engine_ops_gpg): Set setexpire to gpg_setexpire. * doc/gpgme.texi: Document new functions. * tests/run-genkey.c: Add option --setexpire. -- This extends GPGME to support the --quick-set-expire command added by GnuPG 2.1.22. This allows changing subkeys expiry date without going through the editinteractor interface. Co-authored-by: Andre Heinecke <[email protected]> GnuPG-bug-id: 4999
* core: Also allow GPGME_EXPORT_MODE_SSH for gpgme_op_export.Werner Koch2020-07-161-0/+1
| | | | | | | | | * src/export.c (export_start): Allow that mode. -- The test tools uses gpgme_op-export_ext and thus did not caught it. Signed-off-by: Werner Koch <[email protected]>
* core: New export mode to export as OpenSSH public key.Werner Koch2020-07-163-1/+12
| | | | | | | | | | | | * src/gpgme.h.in (GPGME_EXPORT_MODE_SSH): New. * src/export.c (export_ext_start): Allow for new mode. * src/engine-gpg.c (export_common): Implement. * tests/run-export.c (status_cb): New. (main): New options --status and --ssh. -- GnuPG-bug-id: 4310 Signed-off-by: Werner Koch <[email protected]>
* core: Deprecate the non-working trustlist functions.Werner Koch2020-07-1510-82/+13
| | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in: Clarify that the trustlist function should not be used. * src/engine.c (_gpgme_engine_op_trustlist): Always return an error. * src/engine-backend.h (struct engine_ops): Remove trustlist member. * src/engine-gpg.c (gpg_trustlist): Remove. (struct engine_ops): Remove that member. Also in all other engines. * tests/gpg/t-trustlist.c: Remove. * lang/python/tests/t-trustlist.py: Remove. -- This never worked in reality because the required feature has been removed from GnuPG version 1.3.2 soon after introduction of this feature in gpgme - 17 years ago. It was anyway marked as experimental. We keep the API and ABI, though. GnuPG-bug-id: 4834 Signed-off-by: Werner Koch <[email protected]>
* core: New keylist mode GPGME_KEYLIST_MODE_WITH_KEYGRIP.Werner Koch2020-07-153-1/+13
| | | | | | | | | | | | | | | | * src/gpgme.h.in (GPGME_KEYLIST_MODE_WITH_KEYGRIP): New. * src/gpgme-json.c (op_keylist): New flag "keygrip". * src/engine-gpg.c (gpg_keylist_build_options): Pass the options. * lang/cpp/src/global.h (WithKeygrip): New. * lang/cpp/src/context.cpp: Add check. * lang/cpp/src/key.cpp (Key::update): Handle WithKeygrip. * lang/cpp/src/verificationresult.cpp: Ditto. * lang/cpp/src/util.h (add_to_gpgme_keylist_mode_t): Ditto. -- GnuPG-bug-id: 4939 Signed-off-by: Werner Koch <[email protected]>
* core: Fix setting of the chain_model signature result.Werner Koch2020-06-051-1/+1
| | | | | | | | | | | | | * src/verify.c (parse_trust): Fix detection of "chain" keyword. -- Fixes-commit: da6f3dc0c53f11f7432b3c258702db07d6c37f9a from 2007 shortly after introducing this. I doubt that this info has ever been used (it is for qualified signatures, which are only supported using the legacy German RegTP rules for them which were soon overturned by the commercial CAs). Signed-off-by: Werner Koch <[email protected]>
* w32: Explicitly link ws2_32Andre Heinecke2020-05-081-2/+3
| | | | | | | | | * src/Makefile.am (gpgme_w32_extra_libs): New. (libgpgme_la_LIBADD, libgpgme_glib_la_LIBADD): Use it. -- Since w32-io.c directly uses functions from ws2_32 it should not rely on libgpg-error to pull in this dependency.
* core: Make sure the keygrip is available in WITH_SECRET mode.Werner Koch2020-05-081-1/+4
| | | | | | | | | | | | | * src/engine-gpg.c (gpg_keylist_build_options): Send --with-keygrip if --with-secret is used. -- Since GnuPG 2.2.19 the keygrip was not anymore send if only --with-secret was used in a public key listing. Given that --with-secret requires computation of the keygrip anyway, there is no point in not requesting the keyrip in this case. GnuPG-bug-id: 4820
* build: Fix library dependency.NIIBE Yutaka2020-03-271-1/+1
| | | | | | | | | | | * src/Makefile.am (gpgme_tool_LDADD): Add @GPG_ERROR_LIBS@. -- Since gpgme-tool uses gpg_strerror, it should be linked to -lgpg-error. Signed-off-by: NIIBE Yutaka <[email protected]>
* core: New context flags "include-key-block" and "auto-key-import".Werner Koch2020-03-173-0/+44
| | | | | | | | | | | | | | | | | | | | | | * src/gpgme.c (gpgme_set_ctx_flag): Add flags "include-key-block" and "auto-key-import". (gpgme_get_ctx_flag): Ditto. * src/context.h (struct gpgme_context): Add flags include_key_block and auto_key_import. * src/engine-gpg.c (struct engine_gpg): Likewise. (gpg_set_engine_flags): Set the flags for gpg versions >= 2.2.20. (gpg_decrypt): Set option according to the new flags. (gpg_encrypt): Ditto. (gpg_encrypt_sign): Ditto. (gpg_sign): Ditto. (gpg_verify): Ditto. tests/run-verify: Add option --auto-key-import. tests/run-sign: add option --include-key-block. -- GnuPG-bug-id: 4856 Signed-off-by: Werner Koch <[email protected]>
* core: Add MacOS fallbacks to look for binariesAndre Heinecke2020-01-171-20/+49
| | | | | | | | | | | | | | | * src/posix-util.c (find_executable): New. (walk_path_str): Factored out from walk_path. (walk_path): Replaced by find_executable. (_gpgme_get_gpg_path, _gpgme_get_gpgconf_path): Use find_executable. -- This should help to locate GnuPG on MacOS systems where it is not part of the PATH environment variable and should reduce the need to have fixed path known at GPGME compile time. mailvelope/issue699
* core: Extend gpgme_user_id_t with uidhash member.Werner Koch2019-12-133-0/+10
| | | | | | | | | | | | | | | | * src/gpgme.h.in (struct _gpgme_user_id): Add field 'uidhash'. * src/key.c (gpgme_key_unref): Free it. * src/keylist.c (keylist_colon_handler): Set it. * tests/run-keylist.c (main): Print it. -- The uidhash value is part of gpg's output since the year 2005. This now adds support to gpgme. The application for uidhash is to select a user id in an edit interactor: Instead of giving the number of the user id, the uidhash value can be be used to avoid tracking the user id numbers. Signed-off-by: Werner Koch <[email protected]>
* gpg: Avoid error diagnostics with --override-session-key when verifyingDaniel Kahn Gillmor2019-12-061-3/+6
| | | | | | | | | | | | | | | | * src/engine-gpg.c (gpg_decrypt): only send --no-keyring when we are not verifying. -- Without this change, the signature verification would fail. This problem was introduced in bded8ebc59c7fdad2617f4c9232a58047656834c in an attempt to avoid an error when *not* verifying. Clearly more test suite coverage is needed to avoid introducing this sort of problem in the future. GnuPG-bug-id: 3464 Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* gpgme-tool: Fix help text for INCLUDE_CERTS.Daniel Kahn Gillmor2019-12-031-1/+1
| | | | | | * src/gpgme-tool.c (hlp_include_certs): added missing newline. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* core,w32: Silence compiler warnings.Werner Koch2019-11-271-2/+3
| | | | | | | * src/w32-util.c (_gpgme_w32_cancel_synchronous_io): Add some casts. -- Signed-off-by: Werner Koch <[email protected]>
* core: Fix parsing of userid sigs after a subpkgAndre Heinecke2019-10-291-2/+3
| | | | | | | | | | * src/keylist.c (keylist_colon_handler): Do not clear out the tmp_uid when a subpacket line is encountered. -- When the uid is cleared no more signatures following the subpacket are parsed, so we now no longer clear it when a subpacket is encountered.
* core: Add cert-notation support and extended-editAndre Heinecke2019-10-293-5/+33
| | | | | | | | | | | | | | | | | | | | | * src/context.h (gpgme_context): Add new flag for extended-edit. * src/engine-gpg.c (append_args_from_sig_notations): Add flags to control the kind of notations. (gpg_edit): Respect extended-edit and notations. (gpg_encrypt_sign, gpg_sign): Update call to append_args_from_sig_notations. * src/gpgme.c (gpgme_set_ctx_flag, gpgme_get_ctx_flag): Support extended-edit. * NEWS, doc/gpgme.texi: Mention extended-edit. -- This provides a way to get the extended key-edit interface without breaking bad state machines that rely on the current command flow. A use case for this is to enable multiple local signatures, which can be used together with annotations for: GnuPG-Bug-Id: T4734
* core,w32: Initialize dbg_help for socket debuggingAndre Heinecke2019-10-281-1/+1
| | | | | | | | * src/w32-io.c (_gpgme_io_select): Initialize dbg_help. -- This fixes a crash on Windows because dbg_help might be used unitialized.
* core: Fix arg counting in enginge-gpgAndre Heinecke2019-07-161-4/+26
| | | | | | | | | | | | | | | | * src/engine-gpg.c (build_argv): Properly check for all arguments and allocate memory for them. -- This fixes a potential buffer overflow which could be created by using unusual and partially contradictory options. Like offline and auto-key-locate together while using ignore-mdc-error. As the list of arguments should not be user controlled the impact of this is very low. To ensure that this does not happen in the future an assert is also added with this patch.
* core: At debug levels up to 9 print only an ascii dump.Werner Koch2019-06-131-27/+59
| | | | | | | | | | | | * src/debug.c (_gpgme_debug_buffer): Switch between two output formats. -- The new format is much more practical than the bunch of hex digits followed by just 16 ascii chars. To get the old behaviour use a debug level of 10. Signed-off-by: Werner Koch <[email protected]>