aboutsummaryrefslogtreecommitdiffstats
path: root/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-09-20core: Check STATUS_FAILURE in export operations.wk-masterWerner Koch1-3/+12
* src/export.c (op_data_t): Add failure_code. (export_status_handler): Set it. (gpgme_op_export_ext, gpgme_op_export_keys): Also check the failure code. -- That is just in case we missed an error code. For example with older gpg versions (e.g. 2.3.8) and exporting to a keyserver.
2023-09-04New mode to list a v5 fingerprint for v4 packets.Werner Koch4-2/+55
* src/gpgme.h.in (GPGME_KEYLIST_MODE_WITH_V5FPR): New. (struct _gpgme_subkey): Add field v5fpr. * src/engine-gpg.c (gpg_keylist_build_options): Pass new option to gpg. * src/key.c (gpgme_key_unref): Free new field. * src/keylist.c (op_data_t): Parse and add "fp2" line. * tests/run-keylist.c (show_usage): Add option --v5fpr. * src/keylist.c (op_data_t): Add field failure_code. (keylist_status_handler): Handle special value. (gpgme_op_keylist_end): Return an error if a FAILURE line has been seen. -- Note that the failure code part has been added to better diagnose problems if a wrong gpg version is used. If verything works right we should not get this because we check that the gnupg version sis either >= 2.4.4 or less than 2.3 and >= 2.2.42. Note further that the v5fpr field may also be used to get the SHA-256 fingerprint of X.509 certificates (even without passing the new mode flag). GnuPG-bug-id: 6705
2023-08-31Support GPGME_ENCRYPT_ALWAYS_TRUST also for S/MIME.Werner Koch1-1/+12
* src/engine-gpgsm.c (gpgsm_encrypt): Send the always-trust options. * tests/run-encrypt.c: Add option --always-trust. -- Note that the run-encrypt test tool used to assume always-trust for OpenPGP since 1.7.0 This bug has also been fixed by introducing the explicit option. GnuPG-bug-id: 6559
2023-08-14core: Use offline mode for all operations of gpgsm engineIngo Klöcker6-47/+33
* src/engine-backend.h (keylist, keylist_ext): Remove engine_flags. * src/engine-gpg.c (gpg_keylist, gpg_keylist_ext): Ditto. * src/engine.c, src/engine.h (_gpgme_engine_op_keylist): Ditto. (_gpgme_engine_op_keylist_ext): Ditto. * src/engine.h (GPGME_ENGINE_FLAG_OFFLINE): Remove. * src/engine-gpgsm.c (struct engine_gpgsm): New field flags with offline flag. (have_gpgsm_version): New. (gpg_set_engine_flags): Set the offline flag. (start): Send OPTION "offline". (gpgsm_keylist, gpgsm_keylist_ext): Remove engine_flags. Remove sending of OPTION "offline". * src/keylist.c (gpgme_op_keylist_start, gpgme_op_keylist_ext_start): Remove setting of offline flag. -- GnuPG-bug-id: 6648
2023-08-14core: Store engine's version string in gpgsm engineIngo Klöcker1-2/+14
* src/engine-gpgsm.c (struct engine_gpgsm): Add field 'version'. (gpgsm_new): Copy version string. (gpgsm_release): Free VERSION. -- GnuPG-bug-id: 6648
2023-07-28core: Prevent wrong plaintext when verifying clearsigned signatureIngo Klöcker1-3/+1
* src/engine-gpg.c (gpg_verify): Use a separate pipe instead of stdout for reading the plaintext. * tests/gpg/t-support.h (PGM): Define if undefined. (print_data): Undefine BUF_SIZE. (check_data): New. * tests/gpg/t-verify.c (clearsigned_plus_key_block): New. (main): Add test. -- Reading the plaintext from stdout is a bad idea because gpg can also print other stuff on stdout, e.g. the keys contained in a public key block. This is fixed by reading the plaintext via a special pipe. GnuPG-bug-id: 6622
2023-07-28core: Return bad data error instead of general error on unexpected dataIngo Klöcker1-1/+1
* src/verify.c (_gpgme_verify_status_handler): Return GPG_ERR_BAD_DATA instead of GPG_ERR_GENERAL. -- This gives users trying to decrypt and/or verify for example a public key block a more useful error. GnuPG-bug-id: 6617
2023-06-21core: Support reading the archive to decrypt/verify directly from a fileIngo Klöcker1-6/+18
* src/engine-gpg.c (add_file_name_arg_or_data): New. (gpg_decrypt): Use add_file_name_arg_or_data instead of add_data for the ciphertext. (gpg_verify): Use add_file_name_arg_or_data instead of add_data for the signature and the signed text. * tests/run-decrypt.c (show_usage): New option --direct-file-io. (main): Parse new option. If option is given, then don't open input file, create simple data object instead of data object from stream and set input file name on input data. * tests/run-verify.c (show_usage): New option --direct-file-io. (main): Parse new option. If option is given, then don't open input files, create simple data objects instead of data objects from stream and set input file names on input data objects. -- This change makes it possible to tell gpg (and gpgtar) to read the input (i.e. the signed/encrypted data or the signature or the created archive) directly from the files with given file names instead of from streams piped through GpgME's Data IO. GnuPG-bug-id: 6530
2023-06-19core: Support writing the sign/encrypt output directly to a fileIngo Klöcker1-7/+35
* src/engine-gpg.c (gpg_encrypt): Pass output file name to gpg if output has file name set. (gpg_encrypt_sign): Ditto. (gpg_sign): Ditto. * tests/run-encrypt.c (show_usage): New option --output. (main): Parse new option. Set file name on output if --output is given. Do not print output if --output is given. * tests/run-sign.c (show_usage): New option --output. (main): Parse new option. Set file name on output if --output is given. Do not print output if --output is given. -- This change makes it possible to tell gpg (and gpgtar) to write the output (i.e. the signed/encrypted data or the signature or the created archive) directly to a file with given file name instead of piping the output back to gpgme. GnuPG-bug-id: 6530
2023-06-15core: Send a input-size-hint for gpgsm.Werner Koch1-0/+52
* src/engine-gpgsm.c (send_input_size_hint): New. (gpgsm_decrypt): Send hint. (gpgsm_encrypt): Send hint. (gpgsm_sign): Send hint. (gpgsm_verify): Send hint. -- GnuPG-bug-id: 6534
2023-06-15core: Use 64 bit instead of gpgme_off_t for some internal functions.Werner Koch5-8/+10
* src/conversion.c (_gpgme_string_to_off): Return an u64 value. * src/data.c (_gpgme_data_get_size_hint): Ditto. (gpgme_data_set_flag): Use u64 for io-buffer-size due to string_to_off change. * src/data.h (struct gpgme_data): Change size_hint to u64. * src/engine-gpg.c (add_input_size_hint): Replace gpgme_off_t by u64. -- GnuPG-bug-id: 6534
2023-05-30core: For key signing and uid revoking allow an empty user id.Werner Koch1-2/+2
* src/engine-gpg.c (gpg_keysign): Required USERID to be non-empty. -- For some language bindings it is easier if the engine considers an empty user id to be equivalent to NULL.
2023-04-20core: Support the new macOS Homebrew location.Werner Koch1-1/+2
* src/posix-util.c (find_executable): Extend the path. -- GnuPG-bug-id: 6440
2023-04-17core: Avoid printf format warnings due to gpgme_ssize_t.Werner Koch1-1/+1
* src/debug.h (_trace_sysres_ssize_t): Cast arg.
2023-04-17core,w32: Fix invocation of gpgtarWerner Koch2-13/+32
* src/dirinfo.c (EXEEXT_S): New. (get_gpgconf_item): Append ".exe" to gpg-wks-client and gpgtar. * src/gpgme-w32spawn.c (mystderr): Add code to ease debugging.
2023-04-04w32: Always use UTF-8 for localized textsIngo Klöcker1-0/+3
* configure.ac: Define GPG_ERR_ENABLE_GETTEXT_MACROS. * src/version.c (do_subsystem_inits) [W32]: Switch gettext to UTF-8. -- On Windows, applications using GpgME can now rely on localized texts returned by GpgME, e.g. the texts for error codes, to be UTF-8 encoded. In particular, this saves a useless and possibly lossy conversion to native encoding and back to UTF-8. On other OSes, where we use the system provided gettext, we assume that UTF-8 is used nowadays. GnuPG-bug-id: 5960
2023-03-27core: Minor code cleanup.Werner Koch1-50/+25
* src/engine-gpg.c (build_argv): Remove superfluous tes. -- gpg_error_from_syserror is guaranteed not to return 0 even if errno is not set.
2023-03-27core: Initialize error variableIngo Klöcker1-1/+1
* src/engine-gpg.c (build_argv): Initialize err. -- Fixes-commit: fbce7deb3b68af900f692591d5d05fa5c1a83f5f
2023-03-21core,cpp: Add new key flags to gpgme_subkey_tWerner Koch2-1/+22
* src/gpgme.h.in (struct _gpgme_subkey): Add bit flags can_renc, can_timestamp, adn is_group_owned. Reduce size of _unused. * src/keylist.c (set_subkey_capability): Set them. * tests/run-keylist.c (main): Print them. * lang/cpp/src/key.h (Subkey::canRenc): New. (Subkey::canTimestamp): New. (Subkey::isGroupOwned): New. * lang/cpp/src/key.cpp: Implement new methods. (Subkey::isQualified): Print them. (std::ostream &operator<<): Print them. -- GnuPG-bug-id: 6395
2023-03-08core: Also detect legacy X.509 v0 certificates.Werner Koch1-19/+31
* src/data-identify.c (basic_detection): Loose the detection of X.509 certs.
2023-02-10core: Switch to logging via gpgrtWerner Koch2-96/+100
* src/debug.c (errfp): Remove. (debug_init): Factor some code out to ... (safe_to_use_debug_file): new. (tid_log_callback): New. (debug_init): Rewrite to make use of gpgrt logging. (_gpgme_debug): Ditto. (_gpgme_debug_end): Remove extra LF testing code. * src/dirinfo.c (get_gpgconf_item): Remove now unneeded LFs. Realign output.
2023-02-10core: Update copyright noticesWerner Koch1-1/+1
--
2023-02-10core: Allow finalization of signature verification of unencrypted dataIngo Klöcker1-3/+7
* src/decrypt-verify.c (decrypt_verify_status_handler): Call _gpgme_verify_status_handler on EOF even if _gpgme_decrypt_status_handler returned NO DATA error. * tests/gpg/t-decrypt-verify.c (normal_signed_message): New. (main): Add test with signed, but not encrypted data. -- This allows the verify status handler to finalize the verification of the last signature even if the decrypt status handler returned a NO DATA error because the input data wasn't encrypted. GnuPG-bug-id: 6368
2023-02-02core: Make usage of input size hint compatible with gpgtarIngo Klöcker1-13/+8
* src/engine-gpg.c (add_input_size_hint): Use add_gpg_arg_with_value to add the --input-size-hint option. -- GnuPG-bug-id: 6342
2023-02-02core: Allow usage of gpgtar also for new enough gpg 2.2Ingo Klöcker1-19/+23
* src/engine-gpg.c (have_usable_gpgtar): New. (start): Always pass --status-fd to the called process. (gpg_decrypt, gpg_encrypt, gpg_encrypt_sign, gpg_sign, gpg_verify): Use have_usable_gpgtar() to check for suitable gpg. -- The version check in start() is not needed because versions of gpg that are unsuitable for the usage of gpgtar are rejected already by the callers. GnuPG-bug-id: 6342
2023-02-01core,w32: More robust detection of GnuPG Desktop dir layoutWerner Koch1-20/+75
* src/w32-util.c (INST_TYPE_GPG4WIN, INST_TYPE_GPGDESK): New to replace the numeric constants. (find_version_file): New. (_gpgme_get_gpgconf_path): Guess a default for inst_type. -- GnuPG-bug-id: 6362
2023-01-31json: New operation "identify" and convenience option --identify.Werner Koch1-1/+126
* src/gpgme-json.c (data_type_to_string): New. (op_identify): New. (process_request): Add to command list. (cmd_identify): New. (main): Add option --identify. --
2023-01-30core: Use signature modes as flagsIngo Klöcker8-26/+37
* src/engine-backend.h (engine_ops.sign): Rename argument mode to flags. * src/engine-gpg.c (gpg_sign): Rename argument mode to flags. Check for invalid combination of flags. * src/engine-gpgsm.c (gpgsm_sign): Rename argument mode to flags. Check for unsupported flags. * src/engine-uiserver.c (gpgsm_sign): Rename argument mode to flags. Check for unsupported flags. * src/engine.c, src/engine.h (_gpgme_engine_op_sign): Rename argument mode to flags. * src/gpgme.h.in (GPGME_SIG_MODE_ARCHIVE): Change value to 4. (gpgme_op_sign_start, gpgme_op_sign): Rename argument mode to flags. * src/sign.c (sign_start): Rename argument mode to flags. Adjust check for invalid flags. (gpgme_op_sign_start, gpgme_op_sign): Rename argument mode to flags. -- Using the signature mode constants as flags is more natural, even if currently all flags are mutually exclusive, because archives are signed with a normal signature. GnuPG-bug-id: 6342
2023-01-26core: Update required GnuPG version for new archive featuresIngo Klöcker1-5/+5
* src/engine-gpg.c (gpg_decrypt, gpg_encrypt, gpg_encrypt_sign, gpg_sign, gpg_verify): Require gpg 2.4.1. -- To work properly the archive feature needs a fix added in GnuPG 2.4.1. GnuPG-bug-id: 6342
2023-01-25core: Support usage of gpgtar for verifying a signed archiveIngo Klöcker10-31/+107
* src/gpgme.h.in (gpgme_verify_flags_t): New enum. (GPGME_VERIFY_ARCHIVE): New const. (gpgme_op_verify_ext_start): New func. (gpgme_op_verify_ext): New func. * src/gpgme.def, src/libgpgme.vers: Add new functions. * src/verify.c (gpgme_op_verify_ext_start): New. (gpgme_op_verify_ext): New. (verify_start): Add arg FLAGS. Pass the flags to _gpgme_engine_op_verify. (gpgme_op_verify_start): Call gpgme_op_verify_ext_start with 0 for FLAGS. (gpgme_op_verify): Call gpgme_op_verify_ext with 0 for FLAGS. * src/engine.c, src/engine.h (_gpgme_engine_op_verify): Add arg FLAGS. * src/engine-backend.h (struct engine_ops): Add FLAGS to 'verify'. * src/engine-gpg.c (gpg_verify): Add arg FLAGS. Set use_gpgtar engine flag if GPGME_VERIFY_ARCHIVE flag is set. Check for new enough gpg. Use add_gpg_arg for gpg-only options without a value. Set extra options for gpgtar and pass input data to stdin when using gpgtar. * src/engine-gpgsm.c (gpgsm_verify): Add arg FLAGS. Return error if GPGME_VERIFY_ARCHIVE flag is set. * src/engine-uiserver.c (uiserver_verify): Ditto. * tests/run-verify.c (show_usage): New options --archive, --directory, and --diagnostics. (main): Parse new options. Verify and extract with gpgtar if --archive is given. Set file name of output data to value of --directory option. Print stderr of gpg/gpgtar if --diagnostics is given. -- GnuPG-bug-id: 6342
2023-01-24core: Support usage of gpgtar for decrypting an encrypted archiveIngo Klöcker2-20/+48
* src/gpgme.h.in (GPGME_DECRYPT_ARCHIVE): New decryption flag. * src/engine-gpg.c (gpg_decrypt): Set use_gpgtar engine flag if GPGME_DECRYPT_ARCHIVE flag is set. Check for new enough gpg and incompatible flags. Use add_gpg_arg_with_value for gpg-only options with a value and add_gpg_arg for gpg-only options without a value. Set extra options for gpgtar and pass input data to stdin when using gpgtar. * tests/run-decrypt.c (show_usage): New options --archive and --directory. (main): Parse new options. Decrypt with gpgtar if --archive is given. Set file name of output data to value of --directory option. -- GnuPG-bug-id: 6342
2023-01-23core: Allow setting the base directory when creating an archiveIngo Klöcker1-16/+30
* src/engine-gpg.c (gpg_encrypt, gpg_encrypt_sign, gpg_sign): Pass file name set in data with --directory option to gpgtar. * tests/run-encrypt.c (show_usage): New option --directory. (main): Parse new option. Set file name of input data to option value. * tests/run-sign.c (show_usage): New option --directory. (main): Parse new option. Set file name of input data to option value. -- GnuPG-bug-id: 6342
2023-01-19core: Support usage of gpgtar for creating an encrypted signed archiveIngo Klöcker1-15/+35
* src/engine-gpg.c (gpg_encrypt_sign): Set use_gpgtar engine flag if GPGME_ENCRYPT_ARCHIVE mode is set. Check for new enough gpg. Use add_gpg_arg_with_value for gpg-only options with a value and add_gpg_arg for gpg-only options without a value. Set extra options for gpgtar and pass input data to stdin when using gpgtar. * tests/run-encrypt.c (print_result): Rename to print_encrypt_result. Print header. (print_sign_result): New. (show_usage): New option --sign. (main): Parse new option. Sign and encrypt --sign is given. Print results of signing additionally to results of encryption. -- With this change the gpgme_op_encrypt_sign* functions get support for creating an encrypted and signed archive from files and/or directories passed as NUL-separated list in the "plain" data with gpgtar. GnuPG-bug-id: 6342
2023-01-19core: Support usage of gpgtar for creating a signed archiveIngo Klöcker3-31/+44
* src/gpgme.h.in (GPGME_SIG_MODE_ARCHIVE): New signature mode. * src/engine-gpg.c (append_args_from_sender, append_args_from_sig_notations): Use add_gpg_arg_with_value for gpg-only options with a value. (gpg_sign): Set use_gpgtar engine flag if GPGME_SIG_MODE_ARCHIVE mode is set. Check for new enough gpg. Use add_gpg_arg_with_value for gpg-only options with a value and add_gpg_arg for gpg-only options without a value. Set extra options for gpgtar and pass input data to stdin when using gpgtar. * src/sign.c (sign_start): Add GPGME_SIG_MODE_ARCHIVE as valid mode. * tests/run-sign.c (show_usage): New options --archive and --diagnostics. (main): Parse new options. Sign with gpgtar if --archive is given. Print stderr of gpg/gpgtar if --diagnostics is given. -- With this change the gpgme_op_sign* functions get support for creating a signed archive from files and/or directories passed as NUL-separated list in the "in" data with gpgtar. GnuPG-bug-id: 6342
2023-01-19core: Fix --set-filename argumentIngo Klöcker1-1/+1
* src/engine-gpg.c (gpg_encrypt): Append equal sign to argument name. -- GnuPG-bug-id: 6342
2023-01-18core: Support usage of gpgtar for encryptionIngo Klöcker4-79/+222
* src/gpgme.h.in (GPGME_ENCRYPT_ARCHIVE): New encryption flag. * src/engine-gpg.c (arg_and_data_s): New field gpg_arg. (engine_gpg): New flag use_gpgtar. (_add_arg): Add argument gpg_arg and set it. (add_arg_ext, add_arg_with_locp, add_arg, add_arg_pfx, add_arg_len): Adjust call of _add_arg. (add_arg_with_locp): Add argument front. (add_gpg_arg, add_gpg_arg_with_value): New. (gpg_new): Use add_gpg_arg_with_value for gpg-only options with a value and add_gpg_arg for gpg-only options without. (build_argv): Consider usage of gpgtar when counting arguments to pass to gpg/gpgtar. Prepend "--gpg-args" to all gpg-only arguments if gpgtar is used. (start): Set program to use. Read diagnostics output from stderr when using gpgtar. Do not pass --status-fd to gpgtar for gpg < 2.4.1. Use add_gpg_arg_with_value for --lc-ctype and --lc-messages. (gpg_encrypt): Set use_gpgtar engine flag if GPGME_ENCRYPT_ARCHIVE flag is set. Check for new enough gpg and incompatible flags. Use add_gpg_arg_with_value for gpg-only options with a value and add_gpg_arg for gpg-only options without a value. Set extra options for gpgtar and pass input data to stdin when using gpgtar. * src/engine-gpgsm.c (gpgsm_encrypt): Return error if new flag is set. * src/engine-uiserver.c (uiserver_encrypt): Ditto. * tests/run-encrypt.c (show_usage): New options --archive and --diagnostics. (main): Parse new options. Encrypt with gpgtar if --archive is given. Print stderr of gpg/gpgtar if --diagnostics is given. -- With this change the gpgme_op_encrypt* functions get support for encrypting a list of files and/or directories passed as NUL-separated list in "plain" data with gpgtar. GnuPG-bug-id: 6342
2023-01-18core: Defer adding --status-fd and --logger-fd to argument listIngo Klöcker1-41/+60
* src/engine-gpg.c (_append_to_arglist, _prepend_to_arglist): New. (_add_arg): Use _append_to_arglist and _prepend_to_arglist. (add_data_ext): New. Extends add_data. (add_data): Uses add_data_ext. (gpg_new): Do not add --status-fd and --logger-fd to argument list. (start): Prepend --logger-fd and --status-fd to the argument list. -- This change makes it possible to handle those two arguments differently if gpgtar is used instead of gpg. GnuPG-bug-id: 6342
2023-01-18core: Extend gpgme_get_dirinfo to return the gpgtar nameIngo Klöcker2-0/+20
* src/dirinfo.c (WANT_GPGTAR_NAME): New. (dirinfo): Add field gpgtar_name. (get_gpgconf_item): Build gpgtar_name on demand and return it. (_gpgme_get_default_gpgtar_name) : New. (gpgme_get_dirinfo): New value "gpgtar-name" for WHAT. * src/util.h (_gpgme_get_default_gpgtar_name): New. * tests/t-engine-info.c (main): Add gpgtar-name to the output. GnuPG-bug-id: 6342
2023-01-17core: Use "goto leave" pattern to clean up resourcesIngo Klöcker1-68/+62
* src/engine-gpg.c (build_argv): Initialize fd_data_map and argv. Goto leave on error. Free fd_data_map and argv on error. -- This will make it easier to add an additional "--with-gpg-args" option where needed. GnuPG-bug-id: 6342
2023-01-16core: Do not add obsolete --no-sk-comments to command lineIngo Klöcker1-11/+0
* src/engine-gpg.c (build_argv): Don't add "--no-sk-comments" to argv. -- This option is a no-op since 1.4.3 and 1.4.23 is the latest 1.4 release. GnuPG-bug-id: 6342
2022-11-25gpgme.m4: Fix AM_PATH_GPGME_PTHREAD.NIIBE Yutaka1-21/+24
* src/gpgme.m4 (AM_PATH_GPGME_PTHREAD): It's deprecated, since gpgme supports threads and GNU C library has integrated pthread features. -- GnuPG-bug-id: 6285 Signed-off-by: NIIBE Yutaka <[email protected]>
2022-11-15core: Allow nullptr for key on card-editIngo Klöcker1-3/+4
* src/edit.c (interact_start, edit_start): Return error if key is null on edit-key. -- In case of card-edit, key is typically null.
2022-11-15gpgme.m4: Include _AM_PATH_GPGRT_CONFIG implementation.NIIBE Yutaka1-6/+95
* src/gpgme.m4 (_AM_PATH_GPGRT_CONFIG): New. (_AM_PATH_GPGME_CONFIG): Require _AM_PATH_GPGRT_CONFIG. -- GnuPG-bug-id: 6273 Signed-off-by: NIIBE Yutaka <[email protected]>
2022-11-11core: Check for nullptrIngo Klöcker1-2/+2
* src/edit.c (interact_start, edit_start): Return error if key is null. -- This prevents a crash further down the road.
2022-11-04core: New context flag "no-auto-check-trustdb"Ingo Klöcker3-0/+29
* src/context.h (gpgme_context): Add field no_auto_check_trustdb. * src/gpgme.c (gpgme_set_ctx_flag, gpgme_get_ctx_flag): Add flag "no-auto-check-trustdb". * src/engine-gpg.c (engine_gpg): Add flags.no_auto_check_trustdb. (gpg_set_engine_flags): Set the flag. (build_argv): Pass option to gpg. * tests/run-keylist.c (show_usage, main): Add option --no-trust-check. -- This makes the --no-auto-check-trustdb option available in the GPGME API to disable the potentially expensive automatic trust database check. GnuPG-bug-id: 6261
2022-11-02build: Prefer gpgrt-config when available.NIIBE Yutaka1-2/+2
* src/gpgme.m4: Overriding the decision by --with-gpgme-prefix, use gpgrt-config gpgme when gpgrt-config is available. -- This may offer better migration. GnuPG-bug-id: 5034 Signed-off-by: NIIBE Yutaka <[email protected]>
2022-10-26core: New global flags "inst-type".Werner Koch4-4/+61
* src/gpgme.c (gpgme_set_global_flag): Add flag "inst-type". * src/w32-util.c (_gpgme_set_get_inst_type): New. (INST_TYPE_GPG4WIN_DIR): New. (INST_TYPE_GPGDESK_DIR): New. (_gpgme_get_gpgconf_path): Implement this flag. Replace fixed strings by the macros. * src/posix-util.c (_gpgme_set_get_inst_type): New dummy. -- This is intended for use by Kleopatra to reliable find the expected GnuPG installation.
2022-10-24core: Protect against a theoretical integer overflow in parsetlv.cWerner Koch1-0/+3
* src/parsetlv.c (_gpgme_parse_tlv): Detect integer overflow. -- Although there is no concrete case where we use for example (to.nhdr+ti.length), it feels safer to protect against this anyway.
2022-09-29core: Fix SIG_CREATED status parsing for 0x1F sigsWerner Koch1-0/+9
* src/sign.c (parse_sig_created): Special case the rfc4880 "1F" status. -- This has always been wrong but we can't simply force strtol to assume hex. Patch compiles but has received no specific test. For details see GnuPG-bug-id: 6223
2022-09-15Fix for modern compiler.NIIBE Yutaka1-1/+1
* src/argparse.c (show_version): It's no args. -- Signed-off-by: NIIBE Yutaka <[email protected]>