aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* core: Make use of --homedir in gpgconf.Werner Koch2016-11-031-13/+45
| | | | | | | | | | * src/engine-gpgconf.c (struct engine_gpgconf): Add field 'version'. (have_gpgconf_version): New. (gpgconf_release): Free VERSION. (gpgconf_new): Set VERSION. (gpgconf_read, gpgconf_write): Use --homedir with recent gnupg. Signed-off-by: Werner Koch <[email protected]>
* core: New API functions gpgme_set_sender, gpgme_get_sender.Werner Koch2016-10-2512-20/+104
| | | | | | | | | | | | | | | | | | | | | | | * src/context.h (struct gpgme_context): Add field 'sender'. * src/gpgme.c: Include mbox-util.h. (gpgme_release): Free SENDER. (gpgme_set_sender): New. (gpgme_get_sender): New. * src/gpgme.def, src/libgpgme.vers: Add new functions. * src/engine-gpg.c (append_args_from_sender): New. (gpg_encrypt_sign, gpg_sign): Call append_args_from_sender. (gpg_verify): Add arg CTX. Call append_args_from_sender/ * src/engine-gpgsm.c (gpgsm_verify): Add dummy arg CTX. * src/engine-uiserver.c (uiserver_verify): Ditto. * src/engine.c (_gpgme_engine_op_verify): Add arg CTX. * src/verify.c (verify_start): Pass CTX to engine function. * tests/gpg/t-verify.c (main): Add some checks for new functions. * tests/run-sign.c (main): Add option --sender. * tests/run-verify.c (main): Ditto. Signed-off-by: Werner Koch <[email protected]>
* core: Fix w32 crash in find_program_in_dirAndre Heinecke2016-10-101-1/+1
| | | | | | | | * src/w32-util.c (find_program_in_dir): Fix call to _gpgme_strconcat. -- This fixes a crash introduced by dc39552d0 because it tried to concat a strlen.
* core: New helper function gpgme_addrspec_from_uid.Werner Koch2016-10-084-1/+27
| | | | | | | | * src/gpgme.h.in: Add gpgme_addrspec_from_uid. * src/gpgme.def, src/libgpgme.vers: Ditto. * src/mbox-util.c (gpgme_addrspec_from_uid): New. Signed-off-by: Werner Koch <[email protected]>
* Clarify licensingDaniel Kahn Gillmor2016-09-273-3/+3
| | | | | | | | | * src/b64dec.c, src/mbox-util.c, src/mbox-util.h: These three files are explicitly licensed under LGPL, but their comments suggest that details about the warranty can be found in the GPL. Adjust comments to refer to the correct license. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* Fix spellingDaniel Kahn Gillmor2016-09-232-2/+2
| | | | | | | | | * lang/cpp/src/context.h, lang/qt/src/protocol.h, lang/qt/src/wkspublishjob.h, src/data-identify.c, src/engine-gpg.c: minor spelling cleanup. -- Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* w32: Silence some warnings about unused parameters.Werner Koch2016-09-221-0/+14
| | | | | | | * src/assuan-support.c (my_recvmsg, my_sendmsg, my_waitpid) (my_socketpair) [W32]: Mark unused parameters. Signed-off-by: Werner Koch <[email protected]>
* core: Fix error checking in _gpgme_mkstemp.Werner Koch2016-09-221-1/+3
| | | | | | | * src/w32-util.c (_gpgme_mkstemp): Fix error checking. (dlopen): Mark FLAGS as unused. Signed-off-by: Werner Koch <[email protected]>
* core: New helper function _gpgme_strconcat.Werner Koch2016-09-223-24/+77
| | | | | | | | | | | | | | | | | | | | | | * src/conversion.c: Include stdarg.h. (do_strconcat): New. (_gpgme_strconcat): New. * src/util.h: Provide fallback for GPGRT_ATTR_SENTINEL. (_gpgme_strconcat): New with sentinel. * src/w32-util.c (find_program_in_dir): Replace malloc and stpcpy by _gpgme_strconcat. (find_program_at_standard_place): Ditto. (_gpgme_set_default_gpg_name): Ditto. (_gpgme_set_default_gpgconf_name): Ditto. (_gpgme_mkstemp): Ditto. (_gpgme_set_override_inst_dir): Repalce malloc and strcpy by strdup. -- The function has been taken from gnupg/common/stringhelp.c and license changed to LPGLv2.1+. I am the original author of that code. Signed-off-by: Werner Koch <[email protected]>
* gpg: Add option --exit-on-status-write-errorDaiki Ueno2016-09-221-0/+2
| | | | | | | | | | | | | | * src/engine-gpg.c (gpg_new): Add --exit-on-status-write-error if the engine version is latest enough to expect progress output from gpg. -- GnuPG-bug-id: 1415 Signed-off-by: Daiki Ueno <[email protected]> Changed the version test from the patch to use the newer have_gpg_version. Signed-off-by: Werner Koch <[email protected]>
* Release 1.7.0gpgme-1.7.0Werner Koch2016-09-212-2/+2
| | | | | | * configure.ac: Bump LT vesion to C26/A15/R0. Signed-off-by: Werner Koch <[email protected]>
* core: Remove moc artifactAndre Heinecke2016-09-192-62/+1
| | | | | | | | | | * src/moc_kdpipeiodevice.cpp: Removed. * src/Makefile.am (EXTRA_DIST): Remove moc_kdpipeiodevice.cpp. -- This file was overlooked in 58ed9c17 which removed the unused and obsolete w32-qt code. See lang/qt QIODeviceDataProvider which replaced kdpipeiodevice.
* core: Check for GPG_TTY as well as DISPLAY.Ben Kibbey2016-09-195-15/+67
| | | | | | | | | | | | | | * src/engine-assuan.c (llass_new): Update --ttyname from GPG_TTY. * src/engine-g13.c (g13_new): Ditto. * src/engine-gpg.c (gpg_new): Ditto. * src/engine-uiserver.c (uiserver_new): Ditto. * src/engine-gpgsm.c (gpgsm_new): Ditto. -- Useful when no DISPLAY is set and there is no attached terminal to the current process. Signed-off-by: Ben Kibbey <[email protected]>
* core: Document the version a function has been deprecated.Werner Koch2016-09-161-72/+76
| | | | | | | | | * src/gpgme.h.in (_GPGME_DEPRECATED): Change to take versio numbers for documentation. Change all places. (_GPGME_DEPRECATED_OUTSIDE_GPGME): Ditto. * lang/python/gpgme-h-clean.py: Adjust RE. Signed-off-by: Werner Koch <[email protected]>
* core: Map GPGME_STATUS_EOF to the empty string.Werner Koch2016-09-162-3/+2
| | | | | | | | * src/status-table.c (_gpgme_status_to_string): Return "" for EOF. * src/engine-gpg.c (read_status): Ditto. The old code accidently used GPGME_STATUS_EOF which is the integer 0 and neiteyr NULL nor a string. Signed-off-by: Werner Koch <[email protected]>
* core: Fix typos.Justus Winter2016-09-161-2/+2
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* core: Remove stub to try implementing gpg < 2.1 support for createkey.Werner Koch2016-09-161-27/+2
| | | | | | | * src/engine-gpg.c (gpg_createkey_legacy): Remove. (gpg_genkey): Remove call. Signed-off-by: Werner Koch <[email protected]>
* core: Fix setting og the verification result.Werner Koch2016-09-161-17/+2
| | | | | | | * src/verify.c (parse_new_sig): Proberly handle the RC in an ERRSIG status. Signed-off-by: Werner Koch <[email protected]>
* core: New function gpgme_op_interact, deprecate gpgme_op_edit.Werner Koch2016-09-156-15/+146
| | | | | | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (gpgme_interact_cb_t): New. (GPGME_INTERACT_CARD): New. (gpgme_op_interact_start, gpgme_op_interact): New. * src/libgpgme.vers, src/gpgme.def: Add new functions. * src/edit.c (op_data_t): Rename fnc to fnc_old and change users. Add fnc. (edit_status_handler): Call old or new callback. (command_handler): Ditto. (interact_start): New. (gpgme_op_interact_start, gpgme_op_interact_start): New. * src/status-table.c (_gpgme_status_to_string): New. * tests/gpg/t-edit.c (edit_fnc): Rename to interact_fnc and change type of STATUS. Use gpgme_io_writen. (main): s/gpgme_op_edit/gpgme_op_interact/. -- This change will eventually allow us to remove all those status codes from gpgme.h. Signed-off-by: Werner Koch <[email protected]>
* core: Minor change of the gpgme_op_edit semantics.Werner Koch2016-09-155-9/+32
| | | | | | | | | | | | | | | | | | * src/edit.c (command_handler): Handle special error code. * src/engine-gpg.c (read_status): Ditto. * src/engine-gpgsm.c (status_handler): Ditto. * src/engine-uiserver.c (status_handler): Ditto. * src/util.h (GPG_ERR_FALSE): Define for older libgpg-error versions. -- An edit callback may now simply return GPG_ERR_FALSE to indicate that it did not handled the status code. GPGME will the do the appropriate action, which is to send an empty line. Note that it is highly unlikely that GPG_ERR_FALSE has ever been used by an application as return value from an edit interactor. Signed-off-by: Werner Koch <[email protected]>
* core: New function gpgme_op_tofu_policyWerner Koch2016-09-1416-2/+267
| | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (gpgme_op_tofu_policy_start): New function. (gpgme_op_tofu_policy): New function. * src/libgpgme.vers, src/gpgme.def: Add new functions. * src/tofupolicy.c: New. * src/Makefile.am (main_sources): Add that file. * src/context.h (ctx_op_data_id_t): Add OPDATA_TOFU_POLICY. * src/engine.c (_gpgme_engine_op_tofu_policy): New. * src/engine-backend.h (engine_ops): Add funcptr 'tofu_policy'. Adjust all engine initializations. * src/engine-gpg.c (gpg_tofu_policy): New. (_gpgme_engine_ops_gpg): Register this function. * tests/run-tofu.c: New. * tests/Makefile.am (noinst_PROGRAMS): Add it. Signed-off-by: Werner Koch <[email protected]>
* core: Defer implementation of gpgme_op_createkey with gpg < 2.1Werner Koch2016-09-141-0/+6
| | | | | | * src/engine-gpg.c (gpg_createkey_legacy): Mark unused variables. Signed-off-by: Werner Koch <[email protected]>
* core: New function gpgme_op_keysign.Werner Koch2016-09-1416-12/+371
| | | | | | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (gpgme_op_keysign_start, gpgme_op_keysign): New. (GPGME_KEYSIGN_LOCAL): New. (GPGME_KEYSIGN_LFSEP): New. (GPGME_KEYSIGN_NOEXPIRE): New. * src/context.h (ctx_op_data_id_t): Add OPDATA_KEYSIGN. * src/keysign.c: New. * src/Makefile.am (main_sources): Add keysig. * src/libgpgme.vers, src/gpgme.def: Add gpgme_op_keysign_start. * src/engine.c (_gpgme_engine_op_keysign): New. * src/engine-backend.h (engine_ops): Add 'keysign' and adjust all engine initializers. * src/engine-gpg.c (_add_arg): Add args PREFIX and ARGLEN and change callers to set them. (add_arg_pfx): New. (add_arg_len): New. (gpg_keysign): New. (_gpgme_engine_ops_gpg): Set keysign to gpg_keysign. * tests/run-keysign.c: New. * tests/Makefile.am (noinst_PROGRAMS): Add run-keysign. Signed-off-by: Werner Koch <[email protected]>
* core: New function gpgme_op_revuid.Werner Koch2016-09-146-13/+68
| | | | | | | | | | | | | * src/engine.h (GENKEY_EXTRAFLAG_REVOKE): New. * src/genkey.c (adduid_start): Rename to addrevuid_start. Add arg REVOKE and pass it as extraflags. Remove useless ARMOR extraflag. Adjust callers. (gpgme_op_revuid_start, gpgme_op_revuid): New. * src/gpgme.def, src/libgpgme.vers: Add them. * tests/run-genkey.c: Add option --revuid. Signed-off-by: Werner Koch <[email protected]>
* core: Change a parameter for the engine's genkey function.Werner Koch2016-09-146-23/+37
| | | | | | | | | | | | | | | * src/engine.h (GENKEY_EXTRAFLAG_ARMOR): New. * src/engine-backend.h (engine_ops): Rename USE_ARMOR in genkey to EXTRAFLAGS. * src/engine.c (_gpgme_engine_op_genkey): Ditto. * src/engine-gpg.c (gpg_createkey_from_param): Ditto and test the flags. (gpg_createkey_legacy): Ditto. (gpg_createkey): Ditto. (gpg_addkey): Ditto. (gpg_genkey): Ditto. Signed-off-by: Werner Koch <[email protected]>
* core: New function gpgme_op_adduid.Werner Koch2016-09-145-16/+135
| | | | | | | | | | | | | * src/genkey.c: Replace most error codes GPG_ERR_INV_VALUE by GPG_ERR_INV_ARG. (struct op_data_t): Add field UIDMODE. (genkey_status_handler): Use UIDMODE. (adduid_start): New. (gpgme_op_adduid_start, gpgme_op_adduid): New. * src/gpgme.def, src/libgpgme.vers: Add them. * tests/run-genkey.c: Add option --adduid. Signed-off-by: Werner Koch <[email protected]>
* core: New function gpgme_op_createsubkey.Werner Koch2016-09-144-27/+157
| | | | | | | | | | | | * src/genkey.c (createsubkey_start): New. (gpgme_op_createsubkey_start, gpgme_op_createsubkey): New. * src/gpgme.def, src/libgpgme.vers: Add them. * src/engine-gpg.c (gpg_createkey): Factor some code out to ... (gpg_add_algo_usage_expire): new. (gpg_addkey): Implement. * tests/run-genkey.c: Add option --addkey. Signed-off-by: Werner Koch <[email protected]>
* core: Use const char * where appropriate.Werner Koch2016-09-138-25/+35
| | | | Signed-off-by: Werner Koch <[email protected]>
* core: Cast away the common const problem with spawn and argv.Werner Koch2016-09-132-5/+5
| | | | | | * src/dirinfo.c (read_gpgconf_dirs): Use a cast to assignd to ARGV. Signed-off-by: Werner Koch <[email protected]>
* core: Fix condition-always-true warning in trace macro.Werner Koch2016-09-131-1/+1
| | | | | | * src/data-compat.c (old_user_read): Cast AMT. Signed-off-by: Werner Koch <[email protected]>
* core: Mark unused function args.Werner Koch2016-09-1320-1/+86
| | | | Signed-off-by: Werner Koch <[email protected]>
* core: Do not pass const char* to functions taking a char*.Werner Koch2016-09-135-8/+20
| | | | Signed-off-by: Werner Koch <[email protected]>
* core: New function gpgme_op_create_key.Werner Koch2016-09-1310-58/+413
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/engine-backend.h (engine_ops): Change prototype of genkey. * src/engine-gpgsm.c (gpgsm_genkey): Change accordingly. * src/engine-gpg.c (gpg_genkey): Change it to a dispatcher. (gpg_createkey_from_param): New for the old functionality. (gpg_createkey_legacy): New. Stub for now. (gpg_createkey): New. (gpg_addkey): New. Stub for now. (gpg_adduid): New. Stub for now. * src/engine.c (_gpgme_engine_op_genkey): Add new args. * src/genkey.c (op_data_t): Add field ERROR_CODE. (parse_error): New. (genkey_status_handler): Parse ERROR status line. (genkey_start): Use NULL/0 for the new args. (createkey_start): New. (gpgme_op_createkey_start, gpgme_op_createkey): New. * src/gpgme.def, src/libgpgme.vers: Add gpgme_op_createkey_start and gpgme_op_createkey. * src/gpgme.h.in (_gpgme_op_genkey_result): Add fields PUBKEY and SECKEY. (GPGME_CREATE_SIGN): New. (GPGME_CREATE_ENCR): New. (GPGME_CREATE_CERT): New. (GPGME_CREATE_AUTH): New. (GPGME_CREATE_NOPASSWD): New. (GPGME_CREATE_SELFSIGNED): New. (GPGME_CREATE_NOSTORE): New. (GPGME_CREATE_WANTPUB): New. (GPGME_CREATE_WANTSEC): New. (GPGME_CREATE_FORCE): New. * tests/run-genkey.c: New. * tests/Makefile.am (noinst_PROGRAMS): Add it. -- This function uses the new --quick-gen-key API of gpg. A limited compatibility mode to use older gpg versions and gpgsm will eventually be provided. Not all flags are currently implemented. ./run-genkey --unprotected --force [email protected] Create a new standard key with the given user id. --force is used to allow creating more than one key with that user id in the keyring. ./run-genkey --unprotected --force \ [email protected] default default 2145826800 Creates a new standard key with an expiration date of 2037-12-31. ./run-genkey --unprotected --force \ [email protected] future-default default 2145826800 Create a standard key using the fugure default algorithms. Signed-off-by: Werner Koch <[email protected]>
* core,cpp: Extend the TOFU information.Werner Koch2016-09-073-10/+40
| | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (struct _gpeme_tofu_info): Rename FIRSTSEEN to SIGNFIRST and LASTSEEN to SIGNLAST. Add ENCRFIST and ENCRLAST. * src/keylist.c (parse_tfs_record): Parse to ENCRFIRST and ENCRLAST. * src/verify.c (parse_tofu_stats): Ditto. * tests/run-keylist.c (main): Adjust and print encrypt stats. * tests/run-verify.c (print_result): Ditto. * lang/cpp/src/tofuinfo.h (TofuInfo): Rename firstSeen to signFirst and lastSeen to signLast. Add encrCount, encrFirst and encrLast. * lang/cpp/src/tofuinfo.cpp (encrCount, encrFirst, encrLast): New. -- The latest GnuPG commits have the needed changes but we also allow the use of currently released GnuPG version. Signed-off-by: Werner Koch <[email protected]>
* core: Check for gpg version for loopback modeAndre Heinecke2016-09-061-1/+1
| | | | | | | | | | * src/engine-gpg.c (build_argv): Check for version 2.1.0 before adding pinentry-mode. -- This is a compatibility fix for older versions that don't support this flag which would otherwise result in an invalid argument error.
* core: Fix passphrase cb for mixed sym encryptAndre Heinecke2016-09-062-3/+2
| | | | | | | | | | * src/encrypt.c (encrypt_start): Handle SYMMETRIC flag. * src/encrypt-sign.c (encrypt_sign_start): Ditto. -- This causes the passphrace command handler to be properly registered which in turn will result in the passphrase callback beeing called.
* core: Add GPGME_KEYLIST_MODE_WITH_TOFU.Werner Koch2016-08-253-6/+104
| | | | | | | | | | | | | | | | * src/gpgme.h.in (GPGME_KEYLIST_MODE_WITH_TOFU): New. * src/engine-gpg.c (gpg_keylist_build_options): Use that. * src/keylist.c: Include limits.h. (parse_tfs_record): New. (keylist_colon_handler): Support TFS record. * tests/run-keylist.c: Include time.h. (isotimestr): New. (main): Add option --tofu. Print TOFU info. * tests/run-verify.c: Include time.h. (isotimestr): New. (print_result): Use isotimestr for TOFU dates. Signed-off-by: Werner Koch <[email protected]>
* core: Adjust for TOFU_STATS change in gnupg 2.1.16.Werner Koch2016-08-242-9/+5
| | | | | | | | | | | | | | | * src/gpgme.h.in (_gpgme_tofu_info): Change 'firstseen' and 'lastseen' to a timestamp value. * src/verify.c (parse_tofu_stats): Do not cap these values at UINT_MAX. -- Using an unsigned long here is okay: We will never get an error and even on machines where unsigned long is 32 bit (e.g. Windows64) this allows us to operate until 2106. By then Windows will be a footnote in history or Windows128 has changed that type to something larger than 32 bit ;-) Signed-off-by: Werner Koch <[email protected]>
* core: Set the 'encrcount' field in gpgme_tofu_info_t.Werner Koch2016-08-241-2/+8
| | | | | | * src/verify.c (parse_tofu_stats): Set ENCRCOUNT field. Signed-off-by: Werner Koch <[email protected]>
* core: Put the protocol into a TOFU created key object.Werner Koch2016-08-231-2/+3
| | | | | | | | * src/verify.c (parse_tofu_user): Add arg 'protocol' and store it in the KEY. (_gpgme_verify_status_handler): Pass protocol. Signed-off-by: Werner Koch <[email protected]>
* core: Change the way TOFU information are represented.Werner Koch2016-08-235-95/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (struct _gpgme_signature): Remove field 'tofu'. Add field 'key'. (struct _gpgme_key): Add field 'fpr'. (struct _gpgme_user_id): Add field 'tofu'. (struct _gpgme_tofu_info): Remove fields 'address' and 'fpr'. * src/key.c (gpgme_key_unref): Release TOFU and FPR. * src/keylist.c (keylist_colon_handler): Store the fingerprint of the first subkey also in KEY. * src/verify.c (release_tofu_info): Remove. (release_op_data): Release KEY. (parse_tofu_user): Rewrite for new data structure. (parse_tofu_stats): Ditto. (parse_tofu_stats_long): Ditto. * tests/run-verify.c (print_result): Ditto. * tests/run-keylist.c (main): Print more fields. -- TOFU information are now associated with the user ID and not with a separate object. Note that this breaks code relying on the former non-released TOFU feature. The C++ bindings won't work right now. Signed-off-by: Werner Koch <[email protected]>
* core: Extend gpgme_user_id_t with 'address'.Werner Koch2016-08-235-25/+62
| | | | | | | | | * src/mbox-util.c, src/mbox-util.h: Adjust for use in gpgme. * src/Makefile.am (main_sources): Add mbox-util. * src/key.c (_gpgme_key_append_name): Set 'address' field of uid. (gpgme_key_unref): Free it. Signed-off-by: Werner Koch <[email protected]>
* core: New code for parsing mail addresses.Werner Koch2016-08-222-0/+268
| | | | | | | | | | | | | | * src/mbox-util.c: New. * src/mbox-util.h: New. -- The files haven been copied verbatim from GnuPG 2.1.15 commit 54245979e691129ed9d3a6c642087fb8d3227449 after the license has been changed in GnuPG. We need this file too match GnuPG's idea of a mail address. Signed-off-by: Werner Koch <[email protected]>
* core: Add new items for gpgme_get_dirinfo.Werner Koch2016-08-221-3/+65
| | | | | | | | | | | | | * src/dirinfo.c (WANT_SYSCONFDIR, WANT_LIBEXECDIR, WANT_LIBDIR): New. (WANT_DATADIR, WANT_LCOALEDIR, WANT_AGENT_SSH_SOCKET): New (WANT_DIRMNGR_SOCKET): New. (dirinfo): Add fields 'sysconfdir', 'bindir', 'libexecdir', 'libdir', 'datadir', 'localedir', 'agent_ssh_socket', and 'dirmngr_socket'. (parse_output): Set these fields. (get_gpgconf_item): Return them. (gpgme_get_dirinfo): Likewise. Signed-off-by: Werner Koch <[email protected]>
* core: Base gpgme_get_dirinfo(uiserver-socket) on the socket dir.Werner Koch2016-08-221-10/+23
| | | | | | | * src/dirinfo.c (dirname_len): New. (parse_output): Change computation of UISRV_SOCKET. Signed-off-by: Werner Koch <[email protected]>
* core: New commands --lang and --have-lang for gpgme-configWerner Koch2016-08-211-10/+25
| | | | | | | | * configure.ac (GPGME_CONFIG_AVAIL_LANG): New ac_subst. * src/gpgme-config.in (avail_lang): Add commands --lang and --have-lang. Signed-off-by: Werner Koch <[email protected]>
* core: Remove (now) useless diagnosticAndre Heinecke2016-08-181-2/+0
| | | | | | | | | | | * src/w32-io.c(_gpgme_io_spawn): Remove spawnhelper not found diagnostic. -- When spawnhelper is not found the error is now catched before the CreateProcess call so the added diagnostic in bb2d11c (which was not helpful because the value for spawnhelper would be NULL in that case) is now no longer needed.
* core: Fail loudly in case w32 spawner not foundAndre Heinecke2016-08-181-0/+26
| | | | | | | | | | | | | | | | * src/w32-io.c (_gpgme_io_spawn): Show a message box in case gpgme-w32spawn.exe not found. -- Otherwise every engine call will just fail with unsupported protocol. Even in the debug output the problem was not made clear because CreateProcess will fail with error code 87 (Invalid Parameter) because spawnhelper is NULL. The helpful error message for ERROR_INVALID_PARAMETER would have been: "is 'NULL' correctly installed" As GpgME basically becomes useless on Windows without the spawnhelper we want to fail very loud in that case.
* core: New global flag "require-gnupg".Werner Koch2016-08-163-0/+39
| | | | | | | | | | | * src/gpgme.c (gpgme_set_global_flag): Add flag. * src/engine.c (engine_minimal_version): New variable. (_gpgme_set_engine_minimal_version): New function. (gpgme_get_engine_info): Check that flag. * tests/run-keylist.c (main): New option --require-gnupg. Signed-off-by: Werner Koch <[email protected]>
* core: Simplify setting of dummy versions.Werner Koch2016-08-165-14/+42
| | | | | | | | | | | | | | | | * src/engine.c (_gpgme_engine_info_release): Do not assert but free FILE_NAME. (gpgme_get_engine_info): Provide default for VERSION and REQ_VERSION. Use calloc instead of malloc. (_gpgme_set_engine_info): Ditto. * src/engine-assuan.c (llass_get_version): Return NULL. (llass_get_req_version): Ditto. * src/engine-spawn.c (engspawn_get_version): Ditto. (engspawn_get_req_version): Ditto. * src/engine-uiserver.c (uiserver_get_version): Ditto. (uiserver_get_req_version): Ditto. Signed-off-by: Werner Koch <[email protected]>