aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release 1.23.1gpgme-1.23.1Werner Koch2023-10-271-1/+7
| | | | | | | | -- This is minor fix to the spawn helper. No change to the library code. GnuPG-bug-id: 6774
* Change gpgme-w32-spawn to unicodeAndre Heinecke2023-10-252-42/+50
| | | | | | | | | | | | | | | | | | | | | * src/Makefile.am (gpgme_w32spawn_CFLAGS): Add -municode. * src/gpgme-w32-spawn.c (build_commandline, my_spawn) (translate_handles): Convert to wchar_t API. (main): Use wmain instead. -- Some time ago we introduced an inconsistency that w32-util called gpgme-w32-spawn through CreateProcessW but since gpgme-w32-spawn internally worked with 8 bit the chars were mangled and the arguments not passed correctly through the CreateProcessA of the child process. Since the GnuPG processes use GetCommandLineW this is the proper way to pass on Unicode command line arguments. Please note that we did not pass UTF-8 before this patch but rather some broken native encoding where Windows replaces unicode characters with question marks etc. GnuPG-Bug-Id: T6728
* Post release updatesWerner Koch2023-10-252-1/+5
| | | | --
* Release 1.23.0gpgme-1.23.0Werner Koch2023-10-253-10/+18
|
* qt: Handle cancel in changeexpiryjobAndre Heinecke2023-10-181-1/+1
| | | | | | | | | * lang/qt/src/qgpgmechangeexpiryjob.cpp (change_expiry): Return cancel error. -- The classical "cancel is not an error" problem. GnuPG-Bug-Id: T6754
* qt,doc: Fix typos in source code commentsIngo Klöcker2023-10-133-19/+19
| | | | | | | | -- Anonymous contribution Signed-off-by: Ingo Klöcker <[email protected]>
* python,doc: Fix typos in documentation and source code commentsIngo Klöcker2023-10-134-6/+6
| | | | | | | | -- Anonymous contribution Signed-off-by: Ingo Klöcker <[email protected]>
* cpp,doc: Fix typos in API documentation and source code commentsIngo Klöcker2023-10-132-2/+2
| | | | | | | | -- Anonymous contribution Signed-off-by: Ingo Klöcker <[email protected]>
* doc: Fix typos in documentation and source code commentsIngo Klöcker2023-10-1312-20/+20
| | | | | | | | -- Anonymous contribution Signed-off-by: Ingo Klöcker <[email protected]>
* python,examples: Add missing word "License"Marius P2023-10-1335-35/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/python/examples/howto/add-userid.py, lang/python/examples/howto/clear-sign-file.py, lang/python/examples/howto/create-key.py, lang/python/examples/howto/decrypt-file.py, lang/python/examples/howto/detach-sign-file.py, lang/python/examples/howto/encrypt-file.py, lang/python/examples/howto/encrypt-sign-file.py, lang/python/examples/howto/encrypt-to-group-gullible.py, lang/python/examples/howto/encrypt-to-group-trustno1.py, lang/python/examples/howto/encrypt-to-group.py, lang/python/examples/howto/export-key.py, lang/python/examples/howto/export-minimised-key.py, lang/python/examples/howto/export-secret-key.py, lang/python/examples/howto/export-secret-keys.py, lang/python/examples/howto/groups.py, lang/python/examples/howto/import-key.py, lang/python/examples/howto/import-keybasekey.py, lang/python/examples/howto/import-keys-hkp.py, lang/python/examples/howto/import-keys.py, lang/python/examples/howto/import-mailvelope-keys.py, lang/python/examples/howto/keycount.py, lang/python/examples/howto/local-sign-group.py, lang/python/examples/howto/mutt-groups.py, lang/python/examples/howto/pmkey-import-alt.py, lang/python/examples/howto/pmkey-import-hkp-alt.py, lang/python/examples/howto/pmkey-import-hkp.py, lang/python/examples/howto/pmkey-import.py, lang/python/examples/howto/revoke-userid.py, lang/python/examples/howto/send-key-to-keyserver.py, lang/python/examples/howto/sign-file.py, lang/python/examples/howto/sign-key.py, lang/python/examples/howto/symcrypt-file.py, lang/python/examples/howto/temp-homedir-config.py, lang/python/examples/howto/verify-signatures.py, lang/python/examples/howto/verify-signed-file.py: Add "License" after "Lesser General Public" -- Anonymous contribution Signed-off-by: Ingo Klöcker <[email protected]>
* cpp: Support new key capability flagsIngo Klöcker2023-10-053-0/+41
| | | | | | | | * lang/cpp/src/key.cpp, lang/cpp/src/key.h (class Key): New methods hasCertify, hasSign, hasEncrypt, hasAuthenticate. -- GnuPG-bug-id: 6748
* doc: Fix typoIngo Klöcker2023-10-051-2/+2
| | | | --
* core: Add key capability flags has_encrypt etc.Werner Koch2023-10-055-11/+79
| | | | | | | | | | * src/gpgme.h.in (struct _gpgme_key): Add flags has_encrypt, has_certify, has_sign, and has_authenticate. * src/keylist.c (finish_key): Set these flags. * tests/run-keylist.c (main): Print them. -- GnuPG-bug-id: 6748
* core: Check STATUS_FAILURE in export operations.Werner Koch2023-10-051-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.
* gpgme-tool: Support use of Windows HANDLE for INPUT/OUTPUT/MESSAGE.NIIBE Yutaka2023-09-291-1/+13
| | | | | | | | | | * src/gpgme-tool.c [HAVE_W32_SYSTEM] (server_data_obj): Implement for Windows HANDLE. -- GnuPG-bug-id: 6634 Signed-off-by: NIIBE Yutaka <[email protected]>
* qt: Use UTF-8 for file names on WindowsIngo Klöcker2023-09-224-0/+28
| | | | | | | | | | | | | | | | | | | | * lang/qt/src/qgpgmedecryptverifyarchivejob.cpp (decrypt_verify_from_file_name): On Windows, convert Unicode file name to UTF-8. * lang/qt/src/qgpgmeencryptarchivejob.cpp (encrypt, encrypt_to_filename): On Windows, convert Unicode file name from/to UTF-8. * lang/qt/src/qgpgmesignarchivejob.cpp (sign, sign_to_filename): Ditto. * lang/qt/src/qgpgmesignencryptarchivejob.cpp (sign_encrypt, sign_encrypt_to_filename): Ditto. -- On Windows, GnuPG expects file names to be UTF-8-encoded. This fixes encrypting and decrypting folders with umlauts in the folder name and in the file name of the archive. Encrypting and decrypting folders with kanji still fails. GnuPG-bug-id: 6728
* build,qt: Autodetect whether Qt was built with -mno-direct-extern-accessIngo Klöcker2023-09-211-3/+18
| | | | | | | | | | | | * m4/qt6.m4: Check the build configuration of Qt 6 for no_direct_extern_access. -- If building with -mno-direct-extern-access has been neither enabled nor disabled explicitly, then check whether Qt 6 was built with this flag. The check is skipped, if we build for Windows. GnuPG-bug-id: 6696
* build,qt: Optionally build Qt 6 bindings with -mno-direct-extern-accessIngo Klöcker2023-09-213-0/+78
| | | | | | | | | | | | | | | | | * configure.ac: Check if C++ compiler supports -mno-direct-extern-access. Add option to enable building with -mno-direct-extern-access. * m4/ax_check_compile_flag.m4: New. * m4/qt6.m4: Add -mno-direct-extern-access to GPGME_QT6_CFLAGS if supported and requested. -- This adds the possibility to build the Qt 6 bindings with the -mno-direct-extern-access flag. This is required if Qt 6 was built with this flag. This is a workaround for the lack of Qt 6's pkgconfig files providing this flag if needed. GnuPG-bug-id: 6696
* build,qt: Drop broken check for -fPICIngo Klöcker2023-09-211-21/+1
| | | | | | | | | | | * m4/qt6.m4: Remove attempt to build a Qt program with -fPIC. -- libtool already takes care of adding -fPIC. Moreover, building without -fPIC succeeded even if Qt was built with -fPIC, i.e. the check didn't work as intended. GnuPG-bug-id: 6696
* tests: Re-add --with-secret optionIngo Klöcker2023-09-041-2/+2
| | | | | | | | | | * tests/run-keylist.c (main): Handle option --with-secret again. -- Re-add handling of --with-secret option that was accidentally removed with the previous commit. GnuPG-bug-id: 6705
* New mode to list a v5 fingerprint for v4 packets.Werner Koch2023-09-047-4/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* build: Change the default for --with-libtool-modification.NIIBE Yutaka2023-09-011-2/+2
| | | | | | | | | * configure.ac (--with-libtool-modification): default=never. -- GnuPG-bug-id: 6619 Signed-off-by: NIIBE Yutaka <[email protected]>
* Support GPGME_ENCRYPT_ALWAYS_TRUST also for S/MIME.Werner Koch2023-08-315-5/+29
| | | | | | | | | | | | | * 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
* qt: Allow specifying user IDs to use when refreshing keys via WKDIngo Klöcker2023-08-235-27/+88
| | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/wkdrefreshjob.h, lang/qt/src/wkdrefreshjob.cpp (WKDRefreshJob::start): New overload. * lang/qt/src/wkdrefreshjob_p.h (WKDRefreshJobPrivate): Add field m_userIds. * lang/qt/src/qgpgmewkdrefreshjob.cpp (toEmailAddresses): New. (locate_external_keys): Change return type and arguments. (refresh_keys): Remove. (QGpgMEWKDRefreshJobPrivate::startIt): Get emails from keys or user IDs. Remove duplicates. Call locate_external_keys instead of refresh_keys. * lang/qt/tests/run-wkdrefreshjob.cpp (CommandLineOptions, parseCommandLine): New. (main): Support new option --all-userids. -- The new start() overload allows to specify the user IDs to use for the WKD lookup explicitly. This allows updating user IDs via WKD which were originally not retrieved via WKD. GnuPG-bug-id: 6672
* qt,tests: Fix build in source directory, part 2Christian Hesse2023-08-221-2/+2
| | | | | | | | | | | | | | * lang/qt/tests/Makefile.am (AM_CPPFLAGS): Include Qt binding sources before C++ binding sources and C sources. -- This fixes the problem that the debug.h in the C sources was found before the one in the Qt bindings. Commit d23528cadf4284f508bc4ba05e1b5c14b46bd354 fixed it for Qt5, we need Qt6 as well. GnuPG-bug-id: 6673
* build: Suggest out-of-source buildIngo Klöcker2023-08-211-1/+1
| | | | | | | | | | | * autogen.rc (final_info): Suggest to run configure from a build subdirectory. -- We recommend out-of-source builds. The suggestion what to do next shown by autogen.sh should reflect this. GnuPG-bug-id: 6673
* qt,tests: Fix build in source directoryIngo Klöcker2023-08-211-2/+2
| | | | | | | | | | | * lang/qt/tests/Makefile.am (AM_CPPFLAGS): Include Qt binding sources before C++ binding sources and C sources. -- This fixes the problem that the debug.h in the C sources was found before the one in the Qt bindings. GnuPG-bug-id: 6673
* qt: Add job for refreshing OpenPGP keys via WKDIngo Klöcker2023-08-2111-3/+545
| | | | | | | | | | | | | | | | | | | | | * lang/qt/src/wkdrefreshjob.cpp, lang/qt/src/wkdrefreshjob.h, lang/qt/src/wkdrefreshjob_p.h, lang/qt/src/qgpgmewkdrefreshjob.cpp, lang/qt/src/qgpgmewkdrefreshjob.h: New. * lang/qt/src/protocol.h (class Protocol): Add pure virtual member function wkdRefreshJob * lang/qt/src/protocol_p.h (Protocol::wkdRefreshJob): ... and implement it. * lang/qt/src/Makefile.am: Update accordingly. * lang/qt/tests/run-wkdrefreshjob.cpp: New. * lang/qt/tests/Makefile.am: Add new test runner. -- This job allows updating keys via WKD. Only user IDs that were originally retrieved via WKD (i.e. which have origin WKD) are considered. GnuPG-bug-id: 6672
* doc: Fix interface changesIngo Klöcker2023-08-211-1/+1
| | | | | | | -- toLogString is in the QGpgME namespace (as everything else in the qt bindings).
* Post release updatesWerner Koch2023-08-212-1/+5
| | | | --
* Release 1.22.0gpgme-1.22.0Werner Koch2023-08-212-9/+40
|
* build: New configure option --with-libtool-modification.NIIBE Yutaka2023-08-174-13/+107
| | | | | | | | | | | | | * Makefile.am (EXTRA_DIST): Add build-aux/libtool-patch.sed. * build-aux/libtool-patch.sed: New. * configure.ac (--with-libtool-modification): New. * build-aux/ltmain.sh: Revert our own local modification. -- Fixes-commit: e622e36f1f32641c66b28a0de95c75ae35f6ca05 GnuPG-bug-id: 6619 Signed-off-by: NIIBE Yutaka <[email protected]>
* qt: Clean up after failure or cancel of sign/encrypt archive operationIngo Klöcker2023-08-165-5/+87
| | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/qgpgmeencryptarchivejob.cpp (encrypt): Remove output file if operation was canceled or failed. * lang/qt/src/qgpgmesignarchivejob.cpp (sign): Ditto. * lang/qt/src/qgpgmesignencryptarchivejob.cpp (sign_encrypt): Ditto. * lang/qt/tests/run-encryptarchivejob.cpp (CommandLineOptions): Add field cancelTimeout. (parseCommandLine): Add option --cancel-after. Parse option value. (main): Check for invalid cancel timeout. Start timer for canceling the job. * lang/qt/tests/run-signarchivejob.cpp (CommandLineOptions): Add field cancelTimeout. (parseCommandLine): Add option --cancel-after. Parse option value. (main): Check for invalid cancel timeout. Start timer for canceling the job. -- This change ensures that the output file is removed if the creation of a signed or encrypted archive was canceled or failed. The new option of the test runners enables testing the cancelation of the jobs. GnuPG-bug-id: 6584
* qt: Make toLogString helper publicIngo Klöcker2023-08-153-13/+18
| | | | | | | | | | | | * lang/qt/src/util.h: Move toLogString ... * lang/qt/src/debug.h: ... here. * lang/qt/tests/run-importjob.cpp (main): Use toLogString. -- This allows using the helper in dependent projects without duplicating it everywhere. GnuPG-bug-id: 6584
* cpp: Remove unused includeIngo Klöcker2023-08-156-8/+0
| | | | --
* tests: Support offline mode in run-importIngo Klöcker2023-08-141-0/+9
| | | | | | | | | | * tests/run-import.c (show_usage): New option --offline. (main): Parse new option. Set offline mode accordingly. -- This allows testing gpgme_op_import with (and without) offline mode. GnuPG-bug-id: 6648
* core: Use offline mode for all operations of gpgsm engineIngo Klöcker2023-08-147-49/+36
| | | | | | | | | | | | | | | | | | | | * 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
* core: Store engine's version string in gpgsm engineIngo Klöcker2023-08-141-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
* cpp: Expose gpgme_decrypt_result_t.is_mime through cpp APICarl Schwan2023-08-042-0/+6
| | | | | | | | | | | | * lang/cpp/src/descriptionresult.cpp (DescriptionResult::isMime): New. * lang/cpp/src/descriptionresult.h: Update accordingly. -- This exposes the is_mime metadata from a decryption result to users of the C++ library. GnuPG-bug-id: 6199 Signed-off-by: Carl Schwan <[email protected]>
* qt: Add setInputEncoding to QGpgMe::EncryptJobCarl Schwan2023-08-034-4/+26
| | | | | | | | | | | | | | | | * lang/qt/src/encryptjob.cpp, lang/qt/src/encryptjob.h, lang/qt/src/encryptjob_p.h: Add inputEncoding/setInputEncoding to EncryptJob * lang/qt/src/qgpgmeencryptjob.cpp: Use newly added inputEncoding to set encoding hint of the encrypted content -- This allows applications like KMail to set the input encoding of the encrypted content, which simplify and improve the performance of identifying the content type then decrypting it. GnuPG-bug-id: 6616 Signed-off-by: Carl Schwan <[email protected]>
* core: Prevent wrong plaintext when verifying clearsigned signatureIngo Klöcker2023-07-283-3/+99
| | | | | | | | | | | | | | | | | | * 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
* core: Return bad data error instead of general error on unexpected dataIngo Klöcker2023-07-281-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
* build: Update libassuan.m4 for libassuan version 3 in future.NIIBE Yutaka2023-07-281-1/+4
| | | | | | | | | | * m4/libassuan.m4: Update from libassuan master. -- New libassuan 3 has backward compatible API. Signed-off-by: NIIBE Yutaka <[email protected]>
* qt: Ensure that we check the correct pathsIngo Klöcker2023-07-082-2/+10
| | | | | | | | | | | * lang/qt/src/QGpgmeConfig-w32.cmake.in.in, lang/qt/src/QGpgmeQt6Config-w32.cmake.in.in: Get paths to check from the target properties. -- This avoids the error present in an older version where the files to check used the correct path, but a wrong path of the DLL was set in the target properties.
* qt: Fix DLL version in cmake config filesIngo Klöcker2023-07-082-4/+4
| | | | | | | | | * lang/qt/src/QGpgmeConfig-w32.cmake.in.in, lang/qt/src/QGpgmeQt6Config-w32.cmake.in.in: Fix name and path of DLL. -- Co-authored-by: Biswapriyo Nath <[email protected]> Signed-off-by: Ingo Klöcker <[email protected]>
* qt: Fix check for required filesIngo Klöcker2023-07-081-2/+2
| | | | | | | | * lang/qt/src/QGpgmeConfig-w32.cmake.in.in: Fix typos in variable names. -- Because of those typos the loop over the files to check was an empty loops and therefore the wrong name of the DLL was never noticed.
* Post release updatesWerner Koch2023-07-072-1/+5
| | | | --
* Release 1.21.0gpgme-1.21.0Werner Koch2023-07-072-13/+24
|
* build: Add BUILT_SOURCE for better dependency.NIIBE Yutaka2023-06-231-0/+2
| | | | | | | | | * Makefile.am (BUILT_SOURCE): Add conf/config.h. -- GnuPG-bug-id: 6547 Signed-off-by: NIIBE Yutaka <[email protected]>
* qt: Support reading signed/encrypted archives directly from a fileIngo Klöcker2023-06-216-38/+76
| | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/decryptverifyarchivejob.cpp, lang/qt/src/decryptverifyarchivejob.h (DecryptVerifyArchiveJob): Add member functions setInputFile, inputFile. * lang/qt/src/decryptverifyarchivejob_p.h (DecryptVerifyArchiveJobPrivate): Add member m_inputFilePath. * lang/qt/src/qgpgmedecryptverifyarchivejob.cpp (decrypt_verify): Move creation of indata to decrypt_verify_from_io_device. (decrypt_verify_from_io_device, decrypt_verify_from_file_name): New. (QGpgMEDecryptVerifyArchiveJob::start): Use decrypt_verify_from_io_device instead of decrypt_verify. (QGpgMEDecryptVerifyArchiveJobPrivate::startIt): Start the job with the values from member variables. * lang/qt/tests/run-decryptverifyarchivejob.cpp (createInput): Remove. (main): Remove creation of input. Make the job read the archive directly from the given archive name. -- This makes it possible to tell gpgtar to read the signed/encrypted archive directly from a specified file bypassing GpgME's Data IO. GnuPG-bug-id: 6530