aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* core: Check STATUS_FAILURE in export operations.wk-masterWerner Koch2023-09-201-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.
* 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
* core: Support reading the archive to decrypt/verify directly from a fileIngo Klöcker2023-06-215-33/+111
| | | | | | | | | | | | | | | | | | | | | | | | | * 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
* qt: Support writing signed/encrypted archives directly to a fileIngo Klöcker2023-06-1915-94/+535
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/encryptarchivejob.cpp, lang/qt/src/encryptarchivejob.h (EncryptArchiveJob): Add member functions setRecipients, recipients, setInputPaths, inputPaths, setOutputFile, outputFile, setEncryptionFlags, encryptionFlags. * lang/qt/src/encryptarchivejob_p.h (EncryptArchiveJobPrivate): Add members m_recipients, m_inputPaths, m_outputFilePath, m_encryptionFlags. * lang/qt/src/qgpgmeencryptarchivejob.cpp (encrypt): Move creation of outdata to encrypt_to_io_device. (encrypt_to_io_device, encrypt_to_filename): New. (QGpgMEEncryptArchiveJob::start): Use encrypt_to_io_device instead of encrypt. (QGpgMEEncryptArchiveJobPrivate::startIt): Start the job with the values from member variables. * lang/qt/src/qgpgmesignarchivejob.cpp (sign): Move creation of outdata to sign_to_io_device. (sign_to_io_device, sign_to_filename): New. (QGpgMESignArchiveJob::start): Use sign_to_io_device instead of sign. (QGpgMESignArchiveJobPrivate::startIt): Start the job with the values from member variables. * lang/qt/src/qgpgmesignencryptarchivejob.cpp (sign_encrypt): Move creation of outdata to sign_encrypt_to_io_device. (sign_encrypt_to_io_device, sign_encrypt_to_filename): New. (QGpgMESignEncryptArchiveJob::start): Use sign_encrypt_to_io_device instead of sign_encrypt. (QGpgMESignEncryptArchiveJobPrivate::startIt): Start the job with the values from member variables. * lang/qt/src/signarchivejob.cpp, lang/qt/src/signarchivejob.h (SignArchiveJob): Add member functions setSigner, signers, setInputPaths, inputPaths, setOutputFile, outputFile. * lang/qt/src/signarchivejob_p.h (SignArchiveJobPrivate): Add members m_signers, m_inputPaths, m_outputFilePath. * lang/qt/src/signencryptarchivejob.cpp, lang/qt/src/signencryptarchivejob.h (SignEncryptArchiveJob): Add member functions setSigner, signers, setRecipients, recipients, setInputPaths, inputPaths, setOutputFile, outputFile, setEncryptionFlags, encryptionFlags. * lang/qt/src/signencryptarchivejob_p.h (SignEncryptArchiveJobPrivate): Add members m_signers, m_recipients, m_inputPaths, m_outputFilePath, m_encryptionFlags. * lang/qt/tests/run-encryptarchivejob.cpp (createOutput): Remove. (checkOutputFilePath): New. (main): Create file output writing to stdout if no archive name (or "-") is given. Exit if file with given archive name already exists. Make the jobs write the created archive directly to the given archive name. * lang/qt/tests/run-signarchivejob.cpp (createOutput): Remove. (checkOutputFilePath): New. (main): Create file output writing to stdout if no archive name (or "-") is given. Exit if file with given archive name already exists. Make the jobs write the created archive directly to the given archive name. -- This makes it possible to tell gpgtar to write the created archive directly to a specified file bypassing GpgME's Data IO. GnuPG-bug-id: 6530
* core: Support writing the sign/encrypt output directly to a fileIngo Klöcker2023-06-194-21/+89
| | | | | | | | | | | | | | | | | | | | | | * 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
* qt: Add a generic hook to start a jobIngo Klöcker2023-06-1913-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/job.cpp, lang/qt/src/job.h (Job::startIt): New method. * lang/qt/src/job_p.h (JobPrivate::startIt): New pure virtual method. * lang/qt/src/qgpgmechangeexpiryjob.cpp (QGpgMEChangeExpiryJobPrivate::startIt): New. * lang/qt/src/qgpgmedecryptverifyarchivejob.cpp (QGpgMEDecryptVerifyArchiveJobPrivate::startIt): New. * lang/qt/src/qgpgmeencryptarchivejob.cpp (QGpgMEEncryptArchiveJobPrivate::startIt): New. * lang/qt/src/qgpgmeencryptjob.cpp (QGpgMEEncryptJobPrivate::startIt): New. * lang/qt/src/qgpgmeimportjob.cpp (QGpgMEImportJobPrivate::startIt): New. * lang/qt/src/qgpgmelistallkeysjob.cpp (QGpgMEListAllKeysJobPrivate::startIt): New. * lang/qt/src/qgpgmesignarchivejob.cpp (QGpgMESignArchiveJobPrivate::startIt): New. * lang/qt/src/qgpgmesignencryptarchivejob.cpp (QGpgMESignEncryptArchiveJobPrivate::startIt): New. * lang/qt/src/qgpgmesignencryptjob.cpp (QGpgMESignEncryptJobPrivate::startIt): New. -- startIt() starts a job if the necessary values have been set before. This makes it possible to extend jobs with additional ways to start them without having to worry about overloading existing virtual start() methods. This will be used first for the different archive jobs. GnuPG-bug-id: 6530
* qt: Make the run methods of ThreadedJobMixin publicIngo Klöcker2023-06-191-0/+3
| | | | | | | | | | * lang/qt/src/threadedjobmixin.h (ThreadedJobMixin::run): Make all overloads public. -- This allows calling the run() functions from the JobPrivate subclasses. GnuPG-bug-id: 6530
* qt: Rename JobPrivate::start to JobPrivate::startNowIngo Klöcker2023-06-1911-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/job_p.h (JobPrivate::start): Rename to startNow. * lang/qt/src/job.cpp (Job::startNow): Adapt function call. * lang/qt/src/qgpgmechangeexpiryjob.cpp (QGpgMEChangeExpiryJobPrivate::start): Rename to startNow. * lang/qt/src/qgpgmedecryptverifyarchivejob.cpp (QGpgMEDecryptVerifyArchiveJobPrivate::start): Rename to startNow. * lang/qt/src/qgpgmeencryptarchivejob.cpp (QGpgMEEncryptArchiveJobPrivate::start): Rename to startNow. * lang/qt/src/qgpgmeencryptjob.cpp (QGpgMEEncryptJobPrivate::start): Rename to startNow. * lang/qt/src/qgpgmeimportjob.cpp (QGpgMEImportJobPrivate::start): Rename to startNow. * lang/qt/src/qgpgmelistallkeysjob.cpp (QGpgMEListAllKeysJobPrivate::start): Rename to startNow. * lang/qt/src/qgpgmesignarchivejob.cpp (QGpgMESignArchiveJobPrivate::start): Rename to startNow. * lang/qt/src/qgpgmesignencryptarchivejob.cpp (QGpgMESignEncryptArchiveJobPrivate::start): Rename to startNow. * lang/qt/src/qgpgmesignencryptjob.cpp (QGpgMESignEncryptJobPrivate::start): Rename to startNow. -- Using the same name for the public and the private method avoids confusion. GnuPG-bug-id: 6530
* qt: Return const pointer to JobPrivate class for const pointer to JobIngo Klöcker2023-06-192-3/+16
| | | | | | | | | | | | | * lang/qt/src/job.cpp, lang/qt/src/job_p.h (getJobPrivate): Replace with two overloads for non-const pointer and const pointer to Job. * lang/qt/src/job_p.h (jobPrivate): Replace with two template functions for non-const pointer and const pointer to Job. -- This helps avoid changing values stored in the JobPrivate class in const functions (e.g. getters) of Job classes. GnuPG-bug-id: 6530
* qt, cpp: Support larger size-hint on 32 bit buildsAndre Heinecke2023-06-1611-4/+43
| | | | | | | | | | | | | | | | | | | | * NEWS: Mention this. * lang/cpp/src/data.h, lang/cpp/src/data.cpp (Data::setSizeHint): New. * lang/qt/src/qgpgmedecryptjob.cpp, lang/qt/src/qgpgmedecryptverifyarchivejob.cpp, lang/qt/src/qgpgmedecryptverifyjob.cpp, lang/qt/src/qgpgmeencryptjob.cpp, lang/qt/src/qgpgmesignencryptjob.cpp, lang/qt/src/qgpgmesignjob.cpp, lang/qt/src/qgpgmeverifydetachedjob.cpp, lang/qt/src/qgpgmeverifyopaquejob.cpp: Set size for input IODevice. -- This fixes the case where the old detection of the size of QIOdevice using seek would overflow and instead explicitly uses QIODevice::size to check for the size and pass it through as an uint64. GnuPG-Bug-Id: T6534
* cpp: Expose gpgme_data_set_flag through cpp APIAndre Heinecke2023-06-163-0/+11
| | | | | | | | | | | * lang/cpp/src/data.cpp (Data::setFlag): New. * lang/cpp/src/data.h: Update accordingly. * NEWS: Mention this. -- This exposes the generic flag mechanism for data to users of the C++ library. It is similar to Context::setFlag but has no getter.
* core: Send a input-size-hint for gpgsm.Werner Koch2023-06-151-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
* tests: Add option --cancel to run-encrypt.Werner Koch2023-06-151-3/+29
| | | | | | | | | | | * tests/run-encrypt.c (cancel_after_progress): New. (progress_cb): Take care of it. (main): Add option --cancel. -- This tool may now be used to test gpgme_cancel_async. Releated to GnuPG-bug-id: 6534
* core: Use 64 bit instead of gpgme_off_t for some internal functions.Werner Koch2023-06-155-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
* Fix definition of GPG_ERR_ENABLE_GETTEXT_MACROSAndre Heinecke2023-06-131-1/+1
| | | | | | | * configure.ac: Add missing value. -- Otherwise it would not be included in config.h
* doc,cpp: Treat GPG_ERR_FULLY_CANCELED as canceledIngo Klöcker2023-06-013-1/+9
| | | | | | | | | | | | | | * doc/gpgme.texi (GPG_ERR_FULLY_CANCELED): New. * lang/cpp/src/context.cpp (Error::isCanceled): Also return true for GPG_ERR_FULLY_CANCELED. -- For internal purposes, GnuPG sometimes uses the error code GPG_ERR_FULLY_CANCELED instead of GPG_ERR_CANCELED. From a user perspective both values mean the same thing and should therefore be treated identically. GnuPG-bug-id: 6510
* cpp,python: Respect --disable-gpg-test for testsBiswapriyo Nath2023-05-302-2/+14
| | | | | | | | | | | lang/cpp/Makefile.am (SUBDIRS): Depend tests in RUN_GPG_TESTS. lang/python/Makefile.am (SUBDIRS): Ditto. -- This is similar to the core and qt switch to disable the tests. Signed-off-by: Biswapriyo Nath <[email protected]> ChangeLog entries added by wk.
* core: For key signing and uid revoking allow an empty user id.Werner Koch2023-05-301-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.
* python: Fix wrong use of write.Werner Koch2023-05-232-10/+5
| | | | | | | | | | | | | * lang/python/helpers.c (pyPassphraseCb): Use gpgme_io_writen. (_gpg_interact_cb): Ditto. * lang/python/helpers.h (write) [W32]: Remove bad write macro. -- GnuPG-bug-id: T6501 Using write(2) without checking for EINTR is a not a good idea. Futher gpgme_io_writen is the correct way to send data from a callback. This also fixed the wrong use of a simple macro for Windows.
* build: Sync to libtool from libgpg-error for 64-bit Windows.NIIBE Yutaka2023-05-161-0/+13
| | | | | | | | | * build-aux/ltmain.hs: Update from libgpg-error. -- GnuPG-bug-id: 6484 Signed-off-by: NIIBE Yutaka <[email protected]>