aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* cpp: Add information about revocation keys to Keyikloecker/t7118-revkeysIngo Klöcker2024-05-215-1/+170
| | | | | | | | | | | | | | | | | | * lang/cpp/src/gpgmefw.h (gpgme_revocation_key_t): New forward declaration. * lang/cpp/src/key.cpp, lang/cpp/src/key.h (class Key): New methods revocationKey, numRevocationKeys, revocationKeys. (class RevocationKey): New. (swap): New overload for RevocationKey. (operator<<): New overload for RevocationKey. * lang/cpp/src/key.cpp (operator<<): Add information about revocation keys to the output stream for Key. * lang/cpp/tests/run-keylist.cpp (main): Don't output Key if nextKey failed, e.g. at the end of the key listing. -- GnuPG-bug-id: 7118
* json: Add information about revocation keys to key list resultIngo Klöcker2024-05-216-1/+155
| | | | | | | | | | | | | | * src/gpgme-json.c (revocation_key_to_json): New. (key_to_json): Add list of revocation keys. * tests/json/Makefile.am (pubring-stamp): Import new pub key. * tests/json/key-with-revokers.asc: New. * tests/json/t-json.c (tests): Add "t-keylist-revokers". * tests/json/t-keylist-revokers.in.json, tests/json/t-keylist-revokers.in.json: New. -- GnuPG-bug-id: 7118
* core: Add information about revocation keys to keysIngo Klöcker2024-05-217-1/+151
| | | | | | | | | | | | | | | * src/gpgme.h.in (struct _gpgme_revocation_key, gpgme_revocation_key_t): New. (struct _gpgme_key): Add fields 'revkeys', '_last_revkey'. * src/key.c (_gpgme_key_add_rev_key): New. (gpgme_key_unref): Free revkeys. * src/keylist.c (keylist_colon_handler): Parse rvk lines. * src/ops.h (_gpgme_key_add_rev_key): New. * tests/run-keylist.c (main): Print revocation key info. -- GnuPG-bug-id: 7118
* tests: Fix segv in t-json.cWerner Koch2024-05-211-1/+1
| | | | | * tests/json/t-json.c (test_contains): Avoid calling recusivly with no child.
* tests: Avoid some compiler warnings.Werner Koch2024-05-212-3/+25
| | | | | | | | | | | * tests/gpg/t-support.h (fail_with_syserr): New. (check_data): Use it to avoid compiler warnings. * tests/run-support.h (fail_with_syserr): New. -- I don't think that there is a way to tell gcc that gpgme_err_code_from_errno will never return 0. Thus we better use a different macro.
* qt: Avoid bogus stringop-overread warningIngo Klöcker2024-05-211-2/+1
| | | | | | | | | * lang/qt/src/threadedjobmixin.cpp (_detail::audit_log_as_html): Use QByteArray overload of QString::fromUtf8. -- There's no need to make the code more complicated than necessary. Unless we want to provoke weird compiler warnings. :-)
* qt: Fix warning about missing returnIngo Klöcker2024-05-211-1/+2
| | | | | | | | | * lang/qt/src/qgpgmeexportjob.cpp (ExportJob::exec): Return a value and remove unused argument names. -- ExportJob::exec is never executed because its virtual overload is always used. Therefore it doesn't matter what value we return.
* core: speedup gpgme_get_keyWerner Koch2024-05-213-4/+11
| | | | | | | * src/engine.c (_gpgme_set_engine_info): Change engine_get_version. -- GnuPG-bug-id: 6369
* m4: Update libassuan.m4 from master.NIIBE Yutaka2024-05-171-2/+89
| | | | | | | | * m4/libassuan.m4: Update. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* Require at least libgpg-error 1.47Ingo Klöcker2024-05-161-1/+1
| | | | | | | | | | * configure.ac (NEED_GPG_ERROR_VERSION): Require 1.47. -- Libgpg-error 1.47 has been released more than 1 year ago and we use a new error code defined in this version. GnuPG-bug-id: 6971
* gpgme.m4: Set $host correctly always.NIIBE Yutaka2024-05-161-2/+3
| | | | | | | | | | * src/gpgme.m4 (AM_PATH_GPGME): Add AC_CANONICAL_HOST. -- GnuPG-bug-id: 7114 Reported-by: Andreas Metzler Signed-off-by: NIIBE Yutaka <[email protected]>
* tests: Fix test after changed behavior of gpgme_op_verifyIngo Klöcker2024-05-151-6/+7
| | | | | | | | | | | * tests/gpg/t-verify.c (main): Change assertion of test. -- The change introduced with 1dc44b7c makes gpg abort the verification of a clear-signed message if it encounters garbage following the signed data. We have to adapt the test to this change. GnuPG-bug-id: 6907
* doc: Update use of Autoconf with PKG_CHECK_MODULES.NIIBE Yutaka2024-05-141-4/+10
| | | | | | -- Signed-off-by: NIIBE Yutaka <[email protected]>
* gpgme.m4: Update _AM_PATH_GPGRT_CONFIG macro from gpg-error.m4.NIIBE Yutaka2024-05-141-7/+5
| | | | | | | | * src/gpgme.m4 (_AM_PATH_GPGRT_CONFIG): Update. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* cpp: Handle smart card op failure status messagesIngo Klöcker2024-04-051-0/+36
| | | | | | | | | | | | | | | * lang/cpp/src/editinteractor.cpp (parse_sc_op_failure): New. (CallbackHelper::edit_interactor_callback_impl): Parse failure code on GPGME_STATUS_SC_OP_FAILURE status. (sc_op_failure_to_error): New. -- This converts a SC_OP_FAILURE status message logged by gpg to a corresponding error. Unfortunately, GPG_ERR_BAD_PIN and GPG_ERR_BAD_RESET_CODE are mapped to the same SC_OP_FAILURE code, so that we had to choose one. GnuPG-bug-id: 6971
* Qt: Fix windows build of new jobsAndre Heinecke2024-03-136-7/+7
| | | | | -- See git log for changes.
* core: Check STATUS_FAILURE in import operations.Ingo Klöcker2024-03-111-0/+14
| | | | | | | | * src/import.c (op_data_t): Add failure_code. (_gpgme_import_status_handler): Set it. Return it on EOF. -- GnuPG-bug-id: 7036
* qt: Add function for synchronously executing ExportJobTobias Fella2024-01-223-0/+21
| | | | | | | | | | * lang/qt/src/exportjob: Add exec function. * lang/qt/src/qgpgmeexportjob.cpp: Implement exec function. * lang/qt/src/qgpgmeexportjob.h: Override exec function. -- GnuPG-Bug-Id: 6893
* qt: Remove superfluous virtual overrides and member variablesIngo Klöcker2024-01-1929-145/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/qgpgmeaddexistingsubkeyjob.cpp (QGpgMEAddExistingSubkeyJob::exec): Remove call of resultHook. * lang/qt/src/qgpgmedecryptjob.cpp (QGpgMEDecryptJob::exec): Remove call of resultHook. (QGpgMEDecryptJob::resultHook): Remove. * lang/qt/src/qgpgmedecryptjob.h (QGpgMEDecryptJob): Remove resultHook override. Remove member mResult. * lang/qt/src/qgpgmedecryptverifyjob.cpp (QGpgMEDecryptVerifyJob::exec): Remove call of resultHook. (QGpgMEDecryptVerifyJob::resultHook): Remove. * lang/qt/src/qgpgmedecryptverifyjob.h (QGpgMEDecryptVerifyJob): Remove resultHook override. Remove member mResult. * lang/qt/src/qgpgmeencryptjob.cpp (QGpgMEEncryptJob::exec): Remove call of resultHook. (QGpgMEEncryptJob::resultHook): Remove. * lang/qt/src/qgpgmeencryptjob.h (QGpgMEEncryptJob): Remove resultHook override. Remove member mResult. * lang/qt/src/qgpgmegpgcardjob.cpp (QGpgMEGpgCardJob::exec): Remove call of resultHook. * lang/qt/src/qgpgmeimportfromkeyserverjob.cpp (QGpgMEImportFromKeyserverJob::exec): Remove call of resultHook. (QGpgMEImportFromKeyserverJob::resultHook): Remove. * lang/qt/src/qgpgmeimportfromkeyserverjob.h (QGpgMEImportFromKeyserverJob): Remove resultHook override. Remove member mResult. * lang/qt/src/qgpgmeimportjob.cpp (QGpgMEImportJob::exec): Remove call of resultHook. (QGpgMEImportJob::resultHook): Remove. * lang/qt/src/qgpgmeimportjob.h (QGpgMEImportJob): Remove resultHook override. Remove member mResult. * lang/qt/src/qgpgmekeyformailboxjob.cpp (QGpgMEKeyForMailboxJob::exec): Remove call of resultHook. * lang/qt/src/qgpgmekeylistjob.cpp (QGpgMEKeyListJob::QGpgMEKeyListJob): Remove initialization of mResult. (QGpgMEKeyListJob::resultHook): Do not set (removed) mResult. * lang/qt/src/qgpgmekeylistjob.h (QGpgMEKeyListJob): Remove member mResult. * lang/qt/src/qgpgmelistallkeysjob.cpp (QGpgMEListAllKeysJob::QGpgMEListAllKeysJob): Remove initialization of mResult. (QGpgMEListAllKeysJob::exec): Remove call of resultHook. (QGpgMEListAllKeysJob::resultHook): Remove. * lang/qt/src/qgpgmelistallkeysjob.h (QGpgMEListAllKeysJob): Remove resultHook override. Remove member mResult. * lang/qt/src/qgpgmereceivekeysjob.cpp (QGpgMEReceiveKeysJob::exec): Remove call of resultHook. (QGpgMEReceiveKeysJob::resultHook): Remove. * lang/qt/src/qgpgmereceivekeysjob.h (QGpgMEReceiveKeysJob): Remove resultHook override. Remove member mResult. * lang/qt/src/qgpgmerevokekeyjob.cpp (QGpgMERevokeKeyJob::exec): Remove call of resultHook. * lang/qt/src/qgpgmesignencryptjob.cpp (QGpgMESignEncryptJob::exec): Remove call of resultHook. (QGpgMESignEncryptJob::resultHook): Remove. * lang/qt/src/qgpgmesignencryptjob.h (QGpgMESignEncryptJob): Remove resultHook override. Remove member mResult. * lang/qt/src/qgpgmesignjob.cpp (QGpgMESignJob::exec): Remove call of resultHook. (QGpgMESignJob::resultHook): Remove. * lang/qt/src/qgpgmesignjob.h (QGpgMESignJob): Remove resultHook override. Remove member mResult. * lang/qt/src/qgpgmeverifydetachedjob.cpp (QGpgMEVerifyDetachedJob::exec): Remove call of resultHook. (QGpgMEVerifyDetachedJob::resultHook): Remove. * lang/qt/src/qgpgmeverifydetachedjob.h (QGpgMEVerifyDetachedJob): Remove resultHook override. Remove member mResult. * lang/qt/src/qgpgmeverifyopaquejob.cpp (QGpgMEVerifyOpaqueJob::exec): Remove call of resultHook. (QGpgMEVerifyOpaqueJob::resultHook): Remove. * lang/qt/src/qgpgmeverifyopaquejob.h (QGpgMEVerifyOpaqueJob): Remove resultHook override. Remove member mResult. * lang/qt/src/qgpgmewkdlookupjob.cpp (QGpgMEWKDLookupJob::exec): Remove call of resultHook. -- All overrides of resultHook (except for the one of QGpgMEKeyListJob) are superfluous. All the resultHook overrides do is store the result in a member variable which is then returned in exec() (which just before returning calls resultHook). The member variable the result is stored in is only ever used by exec(). So exec() can simply return the result directly. Some Job subclasses call resultHook without overriding it. That's equally useless because the default implementation of resultHook is empty. The only resultHook override that does anything useful is the one of QGpgMEKeyListJob.
* qt: Remove left-over mentions of showErrorDialogIngo Klöcker2024-01-195-32/+1
| | | | | | | | | | | | | * lang/qt/src/qgpgmedecryptjob.cpp, lang/qt/src/qgpgmeimportfromkeyserverjob.cpp, lang/qt/src/qgpgmeimportjob.cpp: Remove obsolete comment. * lang/qt/src/qgpgmekeylistjob.cpp, lang/qt/src/qgpgmelistallkeysjob.cpp: Remove long obsolete, #if 0'ed out definitions of showErrorDialog. -- Informing the users about errors is the responsibility of the users of the QGpgME Job API since a long time.
* build: Re-add still needed custom changes to Python autoconf macroIngo Klöcker2024-01-161-2/+5
| | | | | | | | * m4/ax_python_devel.m4: Do not emit 'HAVE_PYTHON'. -- This reapplies the changes made with 5189c08 that are still needed for detecting multiple Python versions.
* build: Update Python autoconf macroIngo Klöcker2024-01-162-122/+264
| | | | | | | | | | * configure.ac: Call AX_PYTHON_DEVEL with new "optional" argument. * m4/ax_python_devel.m4: Replace with current version from the autoconf archive. -- The new "optional" argument allows us to leave out one of our custom changes.
* doc: Add a deprecated warning to gpgme_op_delete.Werner Koch2024-01-151-3/+6
|
* doc: Fix minor typo.Werner Koch2024-01-151-1/+1
| | | | | | -- Reported-by: Ming Kuang
* cpp,tests: Launch dirmngr with gpg-confIngo Klöcker2024-01-091-8/+11
| | | | | | | | | | | | | * lang/cpp/tests/run-wkdlookup.cpp (main): Replace backslashes with forward slashes in homedir returned by GpgME::dirInfo. Use "gpgconf --launch dirmngr" to start dirmngr. -- With this change the same code as by QGpgMEWKDLookupJob is again used to launch dirmngr. It also fixes the bad example of starting dirmngr without the help of gpgconf. GnuPG-bug-id: 6833
* qt: Pass home directory with forward slashes when launching dirmngrIngo Klöcker2024-01-091-2/+4
| | | | | | | | | | | | | * lang/qt/src/qgpgmewkdlookupjob.cpp (startDirmngr): Replace backslashes with forward slashes in homedir returned by GpgME::dirInfo. -- This works around a bug which causes backslashes to be escaped (doubled) twice on Windows, once by gpgme_op_spawn and once by the spawn helper gpgme-w32spawn. The next versions of GnuPG 2.2 and 2.4 also have a workaround for this. GnuPG-bug-id: 6833
* qt: Fix validity for (sub)keys generated using QGpgMEQuickJobTobias Fella2024-01-081-2/+4
| | | | | | | | | | | * lang/qt/src/qgpgmequickjob.cpp: Fix expiration calculation -- The job calculates the validity as the seconds since epoch, while GPG expects the seconds since the current time. This leads to the validity being significantly longer than expected. GnuPG-Bug-Id: 6889
* doc: Update NEWSIngo Klöcker2024-01-051-2/+48
| | | | | | -- GnuPG-bug-id: 6550
* qt: Support verification of detached signatures directly from filesIngo Klöcker2024-01-058-10/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am: Add new files. * lang/qt/src/job.cpp (VerifyDetachedJob): Move definition of constructor and destructor and inclusion of the moc file to the corresponding .cpp file. * lang/qt/src/verifydetachedjob.cpp: New. * lang/qt/src/verifydetachedjob.h (VerifyDetachedJob): Add member functions setSignatureFile, signatureFile, setSignedFile, signedFile. * lang/qt/src/verifydetachedjob_p.h: New. * lang/qt/src/qgpgmeverifydetachedjob.cpp (class QGpgMEVerifyDetachedJobPrivate): New. (QGpgMEVerifyDetachedJob::QGpgMEVerifyDetachedJob): Instantiate private job class. (verify_from_filename): New. * lang/qt/tests/Makefile.am: Add new test program. * lang/qt/tests/run-verifydetachedjob.cpp: New. -- This makes it possible to tell gpg to read the input directly from the specified files bypassing GpgME's Data IO when verifying a detached signature. GnuPG-bug-id: 6550
* core: Tell gpg that we want to verify signed dataIngo Klöcker2023-12-221-0/+2
| | | | | | | | | | | | * src/engine-gpg.c (gpg_verify): Add "--verify" to command line. -- Since GnuPG 2.1.16 --verify writes the signed data to the file specified by --output. Explicitly telling gpg that we want to verify signed data frees gpg from guessing what we want and avoids the corresponding warning "no command supplied. Trying to guess what you mean ..." GnuPG-bug-id: 6907
* qt,doc: Document that Job::startIt() doesn't self-destruct Job on errorIngo Klöcker2023-12-221-1/+4
| | | | | -- GnuPG-bug-id: 6550
* qt: Support verification of opaque signed data directly to/from filesIngo Klöcker2023-12-228-10/+399
| | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am: Add new files. * lang/qt/src/job.cpp (VerifyOpaqueJob): Move definition of constructor and destructor and inclusion of the moc file to the corresponding .cpp file. * lang/qt/src/verifyopaquejob.cpp: New. * lang/qt/src/verifyopaquejob.h (VerifyOpaqueJob): Add member functions setInputFile, inputFile, setOutputFile, outputFile. * lang/qt/src/verifyopaquejob_p.h: New. * lang/qt/src/qgpgmeverifyopaquejob.cpp (class QGpgMEVerifyOpaqueJobPrivate): New. (QGpgMEVerifyOpaqueJob::QGpgMEVerifyOpaqueJob): Instantiate private job class. (verify_from_filename): New. * lang/qt/tests/Makefile.am: Add new test program. * lang/qt/tests/run-verifyopaquejob.cpp: New. -- This makes it possible to tell gpg to read the input and write the output directly to a specified file bypassing GpgME's Data IO when verifying an opaque signed (or clear signed) file. GnuPG-bug-id: 6550
* qt: Support decryption (with verification) directly to/from filesIngo Klöcker2023-12-228-10/+405
| | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am: Add new files. * lang/qt/src/job.cpp (DecryptVerifyJob): Move definition of constructor and destructor and inclusion of the moc file to the corresponding .cpp file. * lang/qt/src/decryptverifyjob.cpp: New. * lang/qt/src/decryptverifyjob.h (DecryptVerifyJob): Add member functions setInputFile, inputFile, setOutputFile, outputFile. * lang/qt/src/decryptverifyjob_p.h: New. * lang/qt/src/qgpgmedecryptverifyjob.cpp (class QGpgMEDecryptVerifyJobPrivate): New. (QGpgMEDecryptVerifyJob::QGpgMEDecryptVerifyJob): Instantiate private job class. (decrypt_verify_from_filename): New. * lang/qt/tests/Makefile.am: Add new test program. * lang/qt/tests/run-decryptverifyjob.cpp: New. -- This makes it possible to tell gpg to read the input and write the output directly to a specified file bypassing GpgME's Data IO when decrypting (and verifying) a file. GnuPG-bug-id: 6550
* qt: Support writing/reading signed/encrypted files directly to/from fileIngo Klöcker2023-12-2117-38/+1058
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am: Add new files. * lang/qt/src/job.cpp (EncryptJob, SignJob, SignEncryptJob): Move definition of constructor and destructor and inclusion of the moc file to the corresponding .cpp files. * lang/qt/src/encryptjob.cpp (EncryptJob): Define constructor. Define destructor as default. Include moc file. * lang/qt/src/encryptjob.cpp, lang/qt/src/encryptjob.h (EncryptJob): Add member functions setRecipients, recipients, setInputFile, inputFile, setOutputFile, outputFile, setEncryptionFlags, encryptionFlags. * lang/qt/src/encryptjob_p.h (EncryptJobPrivate): Add members m_recipients, m_inputFilePath, m_outputFilePath, m_encryptionFlags. * lang/qt/src/qgpgmeencryptjob.cpp (encrypt_to_filename): New. (QGpgMEEncryptJobPrivate::startIt): Start the job with the values from the member variables. * lang/qt/src/qgpgmesignencryptjob.cpp (sign_encrypt_to_filename): New. (QGpgMESignEncryptJobPrivate::startIt): Start the job with the values from the member variables. * lang/qt/src/qgpgmesignjob.cpp (class QGpgMESignJobPrivate): New. (QGpgMESignJob::QGpgMESignJob): Instantiate private job class. (sign_to_filename): New. * lang/qt/src/signencryptjob.cpp (SignEncryptJob): Define constructor. Define destructor as default. Include moc file. * lang/qt/src/signencryptjob.cpp, lang/qt/src/signencryptjob.h (SignEncryptJob): Add member functions setSigners, signers, setRecipients, recipients, setInputFile, inputFile, setOutputFile, outputFile, setEncryptionFlags, encryptionFlags. * lang/qt/src/signencryptjob_p.h (SignEncryptJobPrivate): Add members m_signers, m_recipients, m_inputFilePath, m_outputFilePath, m_encryptionFlags. * lang/qt/src/signjob.cpp: New. * lang/qt/src/signjob.h (SignJob): Add member functions setSigners, signers, setInputFile, inputFile, setOutputFile, outputFile, setSigningFlags, signingFlags. * lang/qt/src/signjob_p.h: New. * lang/qt/tests/Makefile.am: Add new test programs. * lang/qt/tests/run-encryptjob.cpp: New. * lang/qt/tests/run-signjob.cpp: New. -- This makes it possible to tell gpg to read the input and write the output directly to a specified file bypassing GpgME's Data IO when signing and/or encrypting a file. GnuPG-bug-id: 6550
* qt: Remove dead codeIngo Klöcker2023-12-213-30/+0
| | | | | | | | | * lang/qt/src/qgpgmeencryptjob.cpp, lang/qt/src/qgpgmesignencryptjob.cpp, lang/qt/src/qgpgmesignjob.cpp: Remove long commented out showErrorDialog member function definitions. -- Displaying error messages is delegated to the job users since ages.
* cpp: Support new flags for direct signing/encryption of filesIngo Klöcker2023-12-194-1/+12
| | | | | | | | | | | | | | | * lang/cpp/src/context.h (enum EncryptionFlags): Add constant EncryptFile. * lang/cpp/src/global.h (enum SignatureMode): Add constant SignFile. * lang/cpp/src/context.cpp (sigflags2sigflags): Handle new flag SignFile. (encryptflags2encryptflags): Handle new flag EncryptFile. (operator<<): Add new flags to the corresponding debug streams. * lang/cpp/src/signingresult.cpp (CreatedSignature::mode): Handle new flag SignFile (even if it cannot occur). -- GnuPG-bug-id: 6550
* core: Support writing the decrypt/verify output directly to a fileikloecker/t6550Ingo Klöcker2023-12-195-13/+79
| | | | | | | | | | | | | | | | | | | * src/engine-gpg.c (gpg_decrypt): Pass output file name to gpg if output has file name set. (gpg_verify): Ditto. * tests/run-decrypt.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-verify.c (show_usage): New option --output. (main): Parse new option. Set file name on output if --output is given. -- This change makes it possible to tell gpg to write the output (i.e. the decrypted/verified data) directly to a file with given file name instead of piping the output back to gpgme. GnuPG-bug-id: 6550
* core: Support direct signing of file with gpgIngo Klöcker2023-12-198-23/+82
| | | | | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (GPGME_SIG_MODE_FILE): New signature mode flag. * src/engine-gpg.c (gpg_sign): Separate signature mode from additional flags. Check for incompatible flags. Explicitly set output to stdout if no output file is used. Pass filename instead of fd to gpg when new flag is set. * src/engine-gpgsm.c (gpgsm_sign): Return error if new flag is set. * src/engine-uiserver.c (uiserver_sign): Ditto. * src/sign.c (sign_start): Consider new flag on check for invalid flags. * tests/run-sign.c (show_usage): New options --detach and --direct-file-io. (main): Parse new options. Create a detached signature if --detach is given. Make gpg read the input file itself if --direct-file-io is given. -- With this change the gpgme_op_sign* functions gain the possibility to make gpg read the data to sign directly from a file instead of from an input FD to which it is written by gpgme. GnuPG-bug-id: 6550
* core: Support direct encryption of file with gpgIngo Klöcker2023-12-197-8/+73
| | | | | | | | | | | | | | | | | | | | | * src/gpgme.h.in (GPGME_ENCRYPT_FILE): New encryption flag. * src/engine-gpg.c (gpg_encrypt, gpg_encrypt_sign): Check for incompatible flags. Pass filename instead of fd to gpg when new flag is set. * 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 option --direct-file-io. (main): Parse new option. Make gpg read the input file itself if the option is given. -- With this change the gpgme_op_encrypt* and gpgme_op_encrypt_sign* functions gain the possibility to make gpg read the data to (sign and) encrypt directly from a file instead of from an input FD to which it is written by gpgme. GnuPG-bug-id: 6550
* doc: Fix documentation for creating encrypted/signed archiveIngo Klöcker2023-12-141-8/+8
| | | | | | | -- The previous paragraph already explains where/how the result is stored. In particular, it's not always "returned in the data object ...".
* qt: Replace Q_FOREACH with range-forIngo Klöcker2023-12-138-36/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/qgpgmekeyformailboxjob.cpp (do_work): Replace Q_FOREACH with range-for. * lang/qt/src/qgpgmekeylistjob.cpp (QGpgMEKeyListJob::resultHook): Ditto. * lang/qt/src/threadedjobmixin.cpp (_detail::audit_log_as_html): Ditto. * lang/qt/tests/t-keylist.cpp (KeyListTest::testPubkeyAlgoAsString): Ditto. * lang/qt/tests/t-keylocate.cpp (KeyLocateTest::testDaneKeyLocate, KeyLocateTest::testKeyLocateSingle): Ditto. * lang/qt/src/qgpgmesignencryptjob.cpp (sign_encrypt): Replace Q_FOREACH with range-for. Add braces around single statement blocks. * lang/qt/src/qgpgmesignjob.cpp (sign): Ditto. * lang/qt/src/qgpgmenewcryptoconfig.cpp (QGpgMENewCryptoConfig::reloadConfiguration, QGpgMENewCryptoConfig::sync, QGpgMENewCryptoConfigComponent::setComponent, QGpgMENewCryptoConfigEntry::urlValueList, QGpgMENewCryptoConfigEntry::setURLValueList): Replace Q_FOREACH with range-for. Fix indentation. Add braces around single statement blocks. -- Where necessary the iterated object is wrapped with qAsConst to avoid deep copies of the iterated object.
* qt: Replace Q_NULLPTR with nullptrIngo Klöcker2023-12-134-5/+5
| | | | | | | * lang/qt/src/defaultkeygenerationjob.h, lang/qt/src/qgpgmebackend.h, lang/qt/src/quickjob.h, lang/qt/src/threadedjobmixin.h: Replace all occurrences of Q_NULLPTR with nullptr. --
* core: percent decode filenameAndre Heinecke2023-11-291-3/+6
| | | | | | | | | | | | | | | * src/op-support.c (_gpgme_parse_plaintext): Decode filename as percent string. -- From gnupg/doc/DETAILS: If a filename is available it gets printed as the third argument, percent-escaped as usual. so we can use the usual percent decode function here. GnuPG-Bug-Id: T6852
* Post release updatesWerner Koch2023-11-282-1/+5
| | | | --
* Release 1.23.2gpgme-1.23.2Werner Koch2023-11-282-6/+18
|
* qt: Start dirmngr with gpgconf to avoid multiple instancesIngo Klöcker2023-11-231-7/+7
| | | | | | | | | | | * lang/qt/src/qgpgmewkdlookupjob.cpp (startDirmngr): Use "gpgconf --launch dirmngr" to start dirmngr. -- Using gpgconf to start dirmngr prevents multiple instances to be started by the concurrently running keyserver lookup and WKD lookup. GnuPG-bug-id: 6833
* qt: On Windows, use UTF-8 when logging the error textIngo Klöcker2023-11-151-1/+7
| | | | | | | | * lang/qt/src/debug.cpp (operator<<): On Windows, interpret the error text as UTF-8 instead of local 8-bit encoding. -- GnuPG-bug-id: 5960
* qt: Remove left-over partial files more persistentlyIngo Klöcker2023-11-155-14/+164
| | | | | | | | | | | | | | | * lang/qt/src/Makefile.am: Add new files. * lang/qt/src/cleaner.cpp, lang/qt/src/cleaner.h: New. * lang/qt/src/util.cpp (PartialFileGuard::~PartialFileGuard): Call Cleaner::removeFile instead of removeFile. * lang/qt/src/util.cpp, lang/qt/src/util.h (removeFile): Remove. -- If the initial attempt to remove the file fails then a Cleaner is created that tries to remove the file at regular intervals (10 s) and on destruction (which happens on application shutdown). GnuPG-bug-id: 6584
* doc: Fix for e.g. and i.e.NIIBE Yutaka2023-11-151-17/+17
| | | | | | -- Signed-off-by: NIIBE Yutaka <[email protected]>
* core: Preserve more specific existing failure codeIngo Klöcker2023-11-1412-12/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | * src/decrypt.c (_gpgme_decrypt_status_handler): Ignore received failure code if we already have a specific failure code. * src/encrypt.c (_gpgme_encrypt_status_handler): Ditto. * src/export.c (export_status_handler): Ditto. * src/genkey.c (genkey_status_handler): Ditto. * src/keylist.c (keylist_status_handler): Ditto. * src/keysign.c (keysign_status_handler): Ditto. * src/passwd.c (passwd_status_handler): Ditto. * src/revsig.c (revsig_status_handler): Ditto. * src/setexpire.c (setexpire_status_handler): Ditto. * src/sign.c (_gpgme_sign_status_handler): Ditto. * src/tofupolicy.c (tofu_policy_status_handler): Ditto. * src/verify.c (_gpgme_verify_status_handler): Ditto. -- Usually, a process emits at most one failure code. But some operations like the creation of an encrypted archive involve multiple chained processes, so that multiple failure codes can be received. We want to keep the first specific failure code we received. Further failure codes are only parsed if we received just an unspecific "general error" so far. GnuPG-bug-id: 6575