aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Make it easier to maintain gpgme.h by using forward declarations.HEADmasterWerner Koch3 days1-21/+55
| | | | | | | | | * src/gpgme.h.in: Use forward declarations for the key objects. -- We may need to have one forward declaration anyway. Use them now for all objects so that the order of definitions doesn't matter and we can avoid huge diffs due to re-arranging the layout of the header.
* Rename an internal function for clarityWerner Koch5 days3-3/+3
| | | | | * src/key.c (_gpgme_key_add_sig): Rename to ... (_gpgme_key_add_uid_sig): this.
* gnupg-manage-keys: Implement a new tool.Werner Koch6 days5-1/+587
| | | | | | | * tools/gnupg-key-manage.c: new. * tools/Makefile.am: New. * configure.ac: Add Makefile. * Makefile.am (SUBDIRS): Add tools directory.
* Fix an uninitialized variable.Collin Funk via Gnupg-devel2025-07-051-1/+1
| | | | | | | | | | * src/engine-gpg.c (gpg_getdirect): Initialize ERR to zero to satisfy the loop condition. -- Fixes-commit: 0a64c7d0c6d0463cf2e06b3a01ef5be4d879bcf0 Signed-off-by: Collin Funk <[email protected]>
* Remove duplicate character passed to strchr.Collin Funk via Gnupg-devel2025-07-031-1/+1
| | | | | | * src/keylist.c (parse_sec_field15): Remove duplicate '0' character. Signed-off-by: Collin Funk <[email protected]>
* doc: Register Colin Funk as an authorWerner Koch2025-06-241-0/+3
| | | | --
* Use sysconf as a fallback mechanism in the initialization.NIIBE Yutaka2025-06-231-1/+29
| | | | | | | | | | | | * src/posix-io.c (max_fds_fallback): New. [_SC_OPEN_MAX] (_gpgme_io_subsystem_init): Set max_fds_fallback. (get_max_fds): Use max_fds_fallback. -- GnuPG-bug-id: 7694 Fixes-commit: e8e5434cc4f5cc3c322659792cc1850a5c5b26b8 Signed-off-by: NIIBE Yutaka <[email protected]>
* Fix debug output of posix-io.c.NIIBE Yutaka2025-06-231-2/+3
| | | | | | | | | * src/posix-io.c (_gpgme_io_select_poll): Emit the file descriptor information just like _gpgme_io_select_select. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* posix: Clean up get_max_fds implementation.NIIBE Yutaka2025-06-201-17/+11
| | | | | | | | | | | | | * src/posix-io.c (get_max_fds): Return type is int. Ifdef-out TRACE. Remove call to sysconf. Use long for R and POS. Use aligned buffer for struct linux_dirent64. -- GnuPG-bug-id: 7694 Signed-off-by: NIIBE Yutaka <[email protected]>
* NEWS: Mention the split of gpgmeIngo Klöcker2025-06-041-0/+3
| | | | | --
* Post release updateWerner Koch2025-06-032-2/+6
| | | | --
* Release 2.0.0gpgme-2.0.0Werner Koch2025-06-031-1/+3
|
* Update autogen.sh and libtool for gpgrt.Werner Koch2025-06-032-1177/+1581
| | | | --
* Fix an include guard.Werner Koch2025-05-241-2/+2
| | | | | | | | * src/json-common.h (GPGME_JSON_COMMON_H): Fix guard. -- Reported-by: Collin Funk <[email protected]> Fixes-commit: d7267db472a4e4f65c8139f68d9d976c64b79636
* json: Fix minor memory leak.Werner Koch2025-05-231-1/+2
| | | | | * src/json-core.c (json_core_process_request): Fix leak and worng formatting in interactive mode in case of an error.
* Refactor gpgme-json for future re-use.Werner Koch2025-05-235-3403/+3569
| | | | | | | | * src/gpgme-json.c: Factor large chunks of code out to ... * src/json-core.c: new file and ... * src/json-util.c: new file and ... * src/json-common.h: new file. * src/Makefile.am (gpgme_json_SOURCES): Add new files.
* Treat empty algorithm the same way as unset algorithmIngo Klöcker2025-05-141-2/+2
| | | | | | | * src/engine-gpg.c (gpg_add_algo_usage_expire): Add "default" as algorithm argument if algo is NULL or an empty string. --
* Add algorithm, usage and expire also if only the group flag is setIngo Klöcker2025-05-131-1/+1
| | | | | | | | | | * src/engine-gpg.c (gpg_add_algo_usage_expire): Check flags for GPGME_CREATE_GROUP flag. -- With this change a cert-only group-owned key will be created if only the group flag is set.
* Add GPGME_CREATE_GROUP flag for gpgme_op_createkey and _createsubkey.Werner Koch2025-05-125-3/+58
| | | | | | * src/gpgme.h.in (GPGME_CREATE_GROUP): New. * src/engine-gpg.c (gpg_add_algo_usage_expire): Pass to engine. * tests/run-genkey.c (parse_usage_string): Support here too.
* Change timestamp fields from signed to unsigned long.Werner Koch2025-05-053-16/+23
| | | | | | | | | | | | * src/gpgme.h.in (struct _gpgme_subkey): Chnage timestamp and expires. (struct _gpgme_key_sig): Ditto. (struct _gpgme_new_signature): Ditto. -- Note that unsigned long has always been used for gpgme_signature_t. A change to time_t would be a real ABI change and require may users of gpgme to adjust their code. The signed/unsigned change is sufficient and mostly invisible.
* Allow signing using an exactly specified subkey.Werner Koch2025-05-054-10/+44
| | | | | | | | | | | | | | | | | * src/engine-gpg.c (append_args_from_signers): Detect exactly specified keys and apped the '!' suffix. -- Due to the ABI break which removed long long deprecated functions we can also risk to introduce a slight semantic change in the way signer keys are specified. The change is that iff a subkey-fingerprint with the '!' suffix was used to lookup a signer's key we now use this specific subkey and not any key gpg considers to be a good signing subkey. Most people would have considered the old behaviour anyway as a bug because it differs from what gpg uses at the command line. GnuPG-bug-id: 3325 Suggested-by: Benjamin Kibbey
* Mark the subkey used to find a key.Werner Koch2025-05-054-2/+106
| | | | | | | | | | | | | | | | | * src/gpgme.h.in (struct _gpgme_subkey): New flag subkey_match. * src/keylist.c (spacep): New. (op_data_t): Add field requested_subkey. (release_op_data): Free it. (exact_match_pattern): New. (maybe_setup_for_requested_subkey): New. (gpgme_op_keylist_start): Call it here. (gpgme_op_keylist_ext_start): Call it for each pattern until one found. (gpgme_op_keylist_next): Set the subkey_match field. --- This is needed for GnuPG-bug-id: 3325
* New decrypt flags GPGME_DECRYPT_LISTONLY.Werner Koch2025-03-188-7/+36
| | | | | | | | | | | | | | * src/gpgme.h.in (GPGME_DECRYPT_LISTONLY): New. * src/decrypt.c (op_data_t): Add member list_only. (_gpgme_decrypt_status_handler): Do not return NO_DATA in list_only mode. (_gpgme_op_decrypt_init_result): Add arg flags and set the list_only flag. (_gpgme_decrypt_start): Pss flags to the init function. * src/decrypt-verify.c (decrypt_verify_start): Ditto. * src/engine-gpg.c (gpg_decrypt): Add --list-only if flag is set. * tests/run-decrypt.c (main): Add option --list-only.
* Add API gpgme_op_random_value.Werner Koch2025-03-147-20/+182
| | | | | | | | | | | | | | | | | | * src/genrandom.c (getrandom_size_t): New. (gpgme_op_random_value): New. * src/gpgme.def: Add new function. * src/libgpgme.vers: Ditto. * src/gpgme.h.in: Add prototype. * tests/run-genrandom.c: Add an option to use the new function. -- The implementation is not optimized but sufficient for our use case. Possible improvements for this and gpgme_op_random_bytes are a cache for random bytes in the context so that we do not need to get out to gpgme for just a few random bytes. GnuPG-bug-id: 6694
* m4: Update libassuan.m4.NIIBE Yutaka2025-03-101-2/+2
| | | | | | * m4/libassuan.m4: Update from libassuan master. Signed-off-by: NIIBE Yutaka <[email protected]>
* Add API gpgme_op_random_bytes.Werner Koch2025-02-2619-2/+411
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/genrandom.c: New. * src/Makefile.am: Add new file. * src/engine-backend.h (struct engine_ops): Add func ptr getdirect. Adjust all engine_ops. * src/engine-gpg.c (gpg_getdirect): New. (_gpgme_engine_ops_gpg): Connect new handler. * src/gpgme.h.in (gpgme_random_mode_t): New. (GPGME_RANDOM_MODE_NORMAL): New. (GPGME_RANDOM_MODE_ZBASE32): New. (gpgme_op_random_bytes): New public function * src/libgpgme.vers: Add function. * src/gpgme.def: Add function. * tests/run-genrandom.c: New. * tests/Makefile.am: Add new file. -- This is a first take on this the mode parameter allows to extend the function if ever needed. Due to the gpg calling and fd setup overhead this function is not yet very fast but its purpose is to get "approved" random bytes. We might eventually extend it to keep a small internal cache of random numbers and get for example 128 random bytes directly from gpg and deliver only the few required. GnuPG-bug-id: 6694
* Remove now unused functions.Werner Koch2025-02-214-116/+1
| | | | | | | | | | | | * src/engine.c (_gpgme_engine_op_trustlist): Remove. * src/libgpgme.vers (gpgme_op_trustlist_end) (gpgme_op_trustlist_next) (gpgme_op_trustlist_start): Remove. * src/gpgme.def: Ditto. * src/key.c (otrust_to_string) (validity_to_string) (capabilities_to_string) (get_keysig): Remove
* Update autogen.sh from gpgrtWerner Koch2025-02-211-6/+31
| | | | | | | -- This has no functional changes except for the recent beta numbering fix.
* Bump LT version to C45/A0/R0Werner Koch2025-02-211-3/+3
| | | | | | | | -- The version 2.0 is technically an API and ABI break due to the removal of long deprecated functions. Most user's won't notice this except for the changed SO number.
* Remove the long deprecated and never working trust list functions.Werner Koch2025-02-2110-449/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/trust-item.c: Remove file. * src/trustlist.c: Remove file. * src/Makefile.am (main_sources): Remove those files. * src/gpgme.h.in (GPGME_EVENT_NEXT_TRUSTITEM): Remove. (gpgme_trust_item_t, GpgmeTrustItem): Remove. (gpgme_op_trustlist_start): Remove. (gpgme_op_trustlist_next): Remove. (gpgme_op_trustlist_end): Remove. (gpgme_trust_item_ref): Remove. (gpgme_trust_item_unref, gpgme_trust_item_release): Remove. * src/gpgme.def: Remove removed functions. * src/libgpgme.vers: Ditto. -- The GPGME_ATTR_foo based functions are deprecated since 2003 and it is time to remove them now. The trustlist functions never worked: 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 in 2003. It was anyway marked as experimental. They even returned GPG_ERR_NOT_IMPLEMENTED since gpgme 1.14.0 (summer 2000) instead of failing with a incomprehensible error code. GnuPG-bug-id: 4834
* Remove long deprecated functions.Werner Koch2025-02-218-879/+18
| | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (GPGME_EXPORT_MODE_NOUID): Remove. This was a left-over from an experiment. (gpgme_attr_t,_gpgme_attr_t) Remove. Deprecated sinze 2003. (gpgme_get_sig_ulong_attr): Ditto. (gpgme_get_sig_string_attr): Ditto. (gpgme_key_get_string_attr): Ditto. (gpgme_key_get_ulong_attr): Ditto. (gpgme_key_sig_get_string_attr): Ditto. (gpgme_key_sig_get_ulong_attr): Ditto. (gpgme_trust_item_get_string_attr): Ditto. (gpgme_trust_item_get_int_attr): Ditto. * src/gpgme.def: Remove them here too. * src/libgpgme.vers: Ditto. * src/trust-item.c: Remove corresponding implementations. * src/verify.c: Ditto. * src/key.c: Ditto.
* NEWS: Fix typosIngo Klöcker2025-02-041-1/+1
| | | | | --
* Update copyright notices.Werner Koch2025-02-045-5/+8
| | | | --
* core: Fix regression for RSA in gpgme_pubkey_algo_string.Werner Koch2025-02-031-1/+1
| | | | | | | | * src/gpgme.c (gpgme_pubkey_algo_string): Consider all RSA variants. -- Fixes-commit: 62b6c1f16ae0ed7b0eb1b095ee383aa0910314bb GnuPG-bug-id: 7508
* Bump version after splitting off bindingsIngo Klöcker2025-02-032-5/+5
| | | | | --
* doc: Refer to separate repositories for C++ and Python bindingsgpgme-2-baseIngo Klöcker2025-02-031-2/+4
| | | | | | | -- GnuPG-bug-id: 7262
* python: Remove Python bindingsIngo Klöcker2025-02-03148-30281/+8
| | | | | | | | | | | | | | | | | * README: Update. * configure.ac: Remove checks, variables and file generations related to the Python bindings. Remove python from available_languages and default_languages. * lang/Makefile.am (DIST_SUBDIRS): Remove python. * lang/python: Remove. * m4/ax_pkg_swig.m4, m4/ax_python_devel.m4, m4/python.m4: Remove. -- The Python bindings have been moved to a separate Git repository: gpgmepy. GnuPG-bug-id: 7262
* cpp,qt: Remove C++ and Qt bindingsIngo Klöcker2025-02-03328-51562/+16
| | | | | | | | | | | | | | | | | * README: Update. * configure.ac: Remove checks, variables and file generations related to the C++/Qt bindings. Remove cpp and qt* from available_languages and default_languages. * lang/Makefile.am (DIST_SUBDIRS): Remove cpp and qt. * lang/cpp, lang/qt: Remove. * m4/ax_check_compile_flag.m4, m4/ax_cxx_compile_stdcxx.m4, m4/ax_gcc_func_attribute.m4, m4/pkg.m4, m4/qt5.m4, m4/qt6.m4: Remove. -- The C++ and Qt bindings have been moved to separate Git repositories: gpgmepp and gpgmeqt. GnuPG-bug-id: 7262
* build: Fix generation of ChangeLog on secondary working treesIngo Klöcker2025-01-151-1/+1
| | | | | | | | | * Makefile.am (gen-ChangeLog): Use test -e instead of test -d to check for git working trees. -- In secondary working trees (created with `git worktree add ...`) .git is a file referencing the original .git directory.
* build: Remove defining GPG_ERR_ENABLE_ERRNO_MACROS.NIIBE Yutaka2025-01-151-3/+0
| | | | | | | | | | * configure.ac (GPG_ERR_ENABLE_ERRNO_MACROS): Remove. -- It was for Windows CE. Signed-off-by: NIIBE Yutaka <[email protected]>
* tests,json: Prevent failing tests after 2027-05-15Ingo Klöcker2025-01-022-20/+20
| | | | | | | | | | | | | | | | | | | * tests/json/key-with-revokers.asc: Replace with new public key. * tests/json/t-keylist-revokers.out.json: Update to new public key. -- The old test key expired on 2027-05-15 which would break the tests after this date. Replace it with a new test key which doesn't expire. The new key was generated with gpg --faked-system-time 1715782979 \ --add-desig-revoker sensitive:A0FF4590BB6122EDEF6E3C542D727CC768697734 \ --add-desig-revoker 23FD347A419429BACCD5E72D6BC4778054ACD246 \ --quick-gen-key [email protected] default default never and exported with gpg --export --armor --export-options export-sensitive-revkeys \ [email protected] GnuPG-bug-id: 7471
* build,python: Fix uninstalling in distcheckIngo Klöcker2024-12-041-1/+1
| | | | | | | | | | | | | | * lang/python/Makefile.am (uninstall-local): Get platlib path relative to data path. -- For unknown reasons (at least on my system) Python 3.1x's sysconfig returns a platlib (== directory for site-specific, platform-specific files) starting with /usr/local although the prefix config variable is /usr. This broke uninstallation because a wrong folder was (tried to) remove. Python 2.7 and 3.9 return a platlib starting with just /usr. In order to always get the correct relative path we use the data path instead of the prefix config variable as anchor directory.
* build,python: Add Python 3.13 and remove Python 3.8Ingo Klöcker2024-12-043-4/+4
| | | | | | | * configure.ac: Look for Python 3.13. Don't look for Python 3.8 anymore. * lang/python/setup.py.in: Update Python versions in classifiers. * m4/python.m4: Add python3.13 as valid interpreter. Remove python3.8. --
* Post release updatesWerner Koch2024-12-042-1/+5
| | | | --
* Release 1.24.1gpgme-1.24.1Werner Koch2024-12-042-4/+16
| | | | | | | | | | | -- Although the GPGME_PK_KYBER is technically an API change we ignore it because this is just another enum value which does not change the ABI and no software uses it yet. Kleopatra is the first to use this and it already has a test for gpgme 1.24.1. GnuPG-bug-id: 7440
* Add a configure test for gettid.Werner Koch2024-12-042-2/+28
| | | | | | | | | | | | * configure.ac (HAVE_GETTID,HAVE_SYS_GETTID): New test. * src/debug.c: Include syscall.h if needed. (tid_log_callback) [HAVE_SYS_GETTID]: Use SYS_gettid -- Linux introduced the gettid syscall with 2.4.11 but glibc only with its version 2.30. This patch allows building on older platforms. Co-authored-by: lgh1
* cpp: Add Kyber algorithmIngo Klöcker2024-11-141-0/+1
| | | | | | | | * lang/cpp/src/key.h (enum Subkey::PubkeyAlgo): Add AlgoKyber with same value as GPGME_PK_KYBER. -- GnuPG-bug-id: 7397
* Support the Kyber algorithm in key listings.Werner Koch2024-11-144-5/+17
| | | | | | | * src/gpgme.h.in (GPGME_PK_KYBER): New. * src/conversion.c (_gpgme_map_pk_algo): Handle Kyber. * src/gpgme.c (gpgme_pubkey_algo_string): Support Kyber. (gpgme_pubkey_algo_name): Add Kyber.
* Post release updatesWerner Koch2024-11-062-1/+5
| | | | --
* Release 1.24.0gpgme-1.24.0Werner Koch2024-11-065-15/+26
|