aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release 1.19.0gpgme-1.19.0Werner Koch2023-03-172-7/+9
|
* python: Update python.m4 configure script.Ben Greiner (bnavigator)2023-03-172-91/+198
| | | | | | | | | | * configure.ac: Unset PYTHON_LIBS. Support python 3.10. * m4/python.m4: Find correct version string for python >= 3.10. -- See-also: https://dev.gnupg.org/D546 Also test for 3.11 and 3.12 (wk).
* tests: Package the ownertrust fileIngo Klöcker2023-03-171-1/+1
| | | | | | | | | tests/gpg/Makefile.am (EXTRA_DIST): Add ownertrust.txt. -- This fixes `make distcheck`. GnuPG-bug-id: 6342
* build: Update autogen.sh from libgpg-errorWerner Koch2023-03-151-23/+20
| | | | | | | -- This fixes hopefully issues with the beta numbering. Also removes the Windows-CE support
* core: Also detect legacy X.509 v0 certificates.Werner Koch2023-03-081-19/+31
| | | | | * src/data-identify.c (basic_detection): Loose the detection of X.509 certs.
* tests: Add option --binary to run-verifyWerner Koch2023-03-081-0/+8
| | | | | | | | | | * tests/run-verify.c (main): Set encoding. -- gpgsm usually used autodetection of the input format. But sometimes it is required to tell gpgsm that the input is binary encoded. In particular, this allows to strip trailing zeroes from a detached signature.
* qt: Add signals for file-based and data-based progressIngo Klöcker2023-02-149-0/+101
| | | | | | | | | | | | | | | | | | | | | * lang/qt/src/decryptverifyarchivejob.h (DecryptVerifyArchiveJob): Add signals fileProgress and dataProgress. * lang/qt/src/encryptarchivejob.h (EncryptArchiveJob): Ditto. * lang/qt/src/signarchivejob.h (SignArchiveJob): Ditto. * lang/qt/src/signencryptarchivejob.h (SignEncryptArchiveJob): Ditto. * lang/qt/src/job_p.h (emitArchiveProgressSignals): New. * lang/qt/src/qgpgmedecryptverifyarchivejob.cpp (QGpgMEDecryptVerifyArchiveJob::QGpgMEDecryptVerifyArchiveJob): Emit appropriate signal when receiving Job::rawProgress signal. * lang/qt/src/qgpgmeencryptarchivejob.cpp (QGpgMEEncryptArchiveJob::QGpgMEEncryptArchiveJob): Ditto. * lang/qt/src/qgpgmesignarchivejob.cpp (QGpgMESignArchiveJob::QGpgMESignArchiveJob): Ditto. * lang/qt/src/qgpgmesignencryptarchivejob.cpp (QGpgMESignEncryptArchiveJob::QGpgMESignEncryptArchiveJob): Ditto. -- GnuPG-bug-id: 6342
* qt: Remove commented out codeIngo Klöcker2023-02-141-12/+0
| | | | | | -- GnuPG-bug-id: 6342
* qt: Add simple and extended progress signals replacing old signalIngo Klöcker2023-02-146-18/+80
| | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/job.h (Job): Add signals jobProgress and rawProgress. Deprecate signal progress. * lang/qt/src/multideletejob.cpp (MultiDeleteJob::slotResult): Emit new progress signals. * lang/qt/src/qgpgmerefreshsmimekeysjob.cpp (QGpgMERefreshSMIMEKeysJob::slotStatus): Ditto. * lang/qt/src/threadedjobmixin.h (ThreadedJobMixin::showProgress): Use modern overload of QMetaObject::invokeMethod to forward the progress signal and add the value of what. Add forwarding of progress to the new signals. * lang/qt/tests/t-encrypt.cpp (EncryptionTest::testProgress): Test the new signals instead of the deprecated one. -- The new signal jobProgress omits the what value which is useless for most consumers. The new signal rawProgress makes all information provided by the backend available to consumers. The latter is not really meant to be used by users of gpgme. It will be used by the archive jobs to provide more user-friendly signals. GnuPG-bug-id: 6342
* core: Switch to logging via gpgrtWerner Koch2023-02-103-96/+109
| | | | | | | | | | | | * 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.
* core: Update copyright noticesWerner Koch2023-02-103-4/+4
| | | | --
* tests: Fix cleaning up at the end of the testIngo Klöcker2023-02-101-0/+2
| | | | | | | * tests/gpg/t-import.c (main): Unref key and release context. -- This fixes leaks found with -fsanitize=address.
* core: Allow finalization of signature verification of unencrypted dataIngo Klöcker2023-02-102-3/+38
| | | | | | | | | | | | | | | | * 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
* cpp: Improve debug output of some enumsIngo Klöcker2023-02-091-19/+32
| | | | | | | | | * lang/cpp/src/verificationresult.cpp (operator<<): Fix output of Signature::PKAStatus which doesn't represent flags. Print corresponding name of enum value if Signature::Summary or Notation::Flags are 0. -- GnuPG-bug-id: 6368
* tests: Stop daemons after setting up test environmentIngo Klöcker2023-02-094-0/+4
| | | | | | | | | | * lang/python/tests/Makefile.am, lang/qt/tests/Makefile.am, tests/gpg/Makefile.am, tests/json/Makefile.am (pubring-stamp): Call `gpgconf --kill all` after importing test keys. -- This ensures that no gpg-agents or other daemons are running after "make".
* tests: Extend tests with an ultimately trusted keyIngo Klöcker2023-02-087-42/+56
| | | | | | | | | | | | | | | | | | | | * tests/gpg/Makefile.am (gpg-sample.stamp, pubring-stamp): Unify usage of tabs. (pubring-stamp): Import owner trust values. * tests/gpg/ownertrust.txt: New. * tests/gpg/t-decrypt-verify.c, tests/gpg/t-verify.c: Update expected values for signature summary and validity. * tests/gpg/t-keylist-secret-sig.c, tests/gpg/t-keylist-sig.c, tests/gpg/t-keylist.c: Update expected values of owner trust and uid validity. -- This change marks the "Alpha Test" test key as ultimately trusted which makes it possible to check for correct values derived from this, i.e. key owner trust, user id validity, signature summary and signature validity. GnuPG-bug-id: 6342
* tests: Make t-edit-sign idempotentIngo Klöcker2023-02-081-3/+56
| | | | | | | | | | | | | | | * tests/gpg/t-edit-sign.c (test_key, test_key_fpr, import_key, delete_key): New. (main): Remove key_fpr. Import test key to sign. Delete test key after test. -- Using a dedicated test key for testing key signing, which is imported before the test and deleted after the test, makes sure that the keys in the test key ring don't change. This is important for stable results of the key listing tests. GnuPG-bug-id: 6342
* doc: Add new flagsIngo Klöcker2023-02-021-0/+2
| | | | | | -- GnuPG-bug-id: 6342
* qt,tests: Add test for the previous commitIngo Klöcker2023-02-022-0/+135
| | | | | | | | * lang/qt/tests/t-decryptverify.cpp: New. * lang/qt/tests/Makefile.am: Add new test. -- GnuPG-bug-id: 6342
* cpp: Return successful verification for signed but not encrypted dataIngo Klöcker2023-02-021-7/+15
| | | | | | | | | | | | | | | | | | | | * lang/cpp/src/context.cpp (Context::decrypt): Use decryptionResult(). (Context::verifyDetachedSignature, Context::verifyOpaqueSignature): Use verificationResult(). (Context::verificationResult): Ignore "no data" error for signed but not encrypted data. (Context::decryptAndVerify): Use decryptionResult() and verificationResult(). -- gpgme's decrypt operations set the error to GPG_ERR_NO_DATA if no encrypted data was found. It makes sense to use this error for the encryption result, but it doesn't make sense to use it also for the verfication result if signed data was found. This way using the combined decrypt-verify operations on data that may be encrypted and/or signed doesn't produce confusing results. GnuPG-bug-id: 6342
* qt: Add job for extracting encrypted and signed archivesIngo Klöcker2023-02-0211-1/+566
| | | | | | | | | | | | | | | | | | | * lang/qt/src/decryptverifyarchivejob.cpp, lang/qt/src/decryptverifyarchivejob.h, lang/qt/src/decryptverifyarchivejob_p.h, lang/qt/src/qgpgmedecryptverifyarchivejob.cpp, lang/qt/src/qgpgmedecryptverifyarchivejob.h: New. * lang/qt/src/protocol.h (class Protocol): Add pure virtual member function decryptVerifyArchiveJob * lang/qt/src/protocol_p.h (Protocol::decryptVerifyArchiveJob): ... and implement it. * lang/qt/src/Makefile.am: Update accordingly. * lang/qt/tests/run-decryptverifyarchivejob.cpp: New. * lang/qt/tests/Makefile.am: Add new test runner. -- GnuPG-bug-id: 6342
* core: Make usage of input size hint compatible with gpgtarIngo Klöcker2023-02-021-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
* cpp: Update decryption flagsIngo Klöcker2023-02-022-0/+2
| | | | | | | | | * lang/cpp/src/context.h (DecryptArchive): New flag. -- This flag corresponds to the GPGME_DECRYPT_ARCHIVE flag in gpgme. GnuPG-bug-id: 6342
* qt: Allow checking if the sign/encrypt archive jobs are supportedIngo Klöcker2023-02-028-0/+44
| | | | | | | | | | | | | | | | * lang/qt/src/encryptarchivejob.cpp, lang/qt/src/encryptarchivejob.h (isSupported): New. * lang/qt/src/signarchivejob.cpp, lang/qt/src/signarchivejob.h (isSupported): New. * lang/qt/src/signencryptarchivejob.cpp, lang/qt/src/signencryptarchivejob.h (isSupported): New. * lang/qt/tests/run-encryptarchivejob.cpp (main), lang/qt/tests/run-signarchivejob.cpp (main): Check if jobs are supported. -- GnuPG-bug-id: 6342
* cpp: Add const-overloads of version comparison operatorsIngo Klöcker2023-02-021-0/+70
| | | | | | | | | | * lang/cpp/src/engineinfo.h (EngineInfo::Version): Add const-overloads of all comparison operators. -- We keep the non-const overloads for binary compatibility. GnuPG-bug-id: 6342
* core: Allow usage of gpgtar also for new enough gpg 2.2Ingo Klöcker2023-02-021-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
* core,w32: More robust detection of GnuPG Desktop dir layoutWerner Koch2023-02-011-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
* qt: Fix build without installed gpgme++ headersIngo Klöcker2023-01-311-1/+1
| | | | | | | | * lang/qt/src/filelistdataprovider.cpp: Include error.h without folder prefix. -- GnuPG-bug-id: 6342
* doc: Update "since" versionIngo Klöcker2023-01-311-1/+1
| | | | --
* doc: Update NEWSIngo Klöcker2023-01-311-1/+5
| | | | | | -- GnuPG-bug-id: 6342
* qt: Remove unused and commented-out codeIngo Klöcker2023-01-314-45/+0
| | | | | | | | | | | | * lang/qt/src/qgpgmeencryptarchivejob.cpp, lang/qt/src/qgpgmeencryptarchivejob.h (QGpgMEEncryptArchiveJob): Remove member function resultHook and member mResult. * lang/qt/src/qgpgmesignarchivejob.cpp, lang/qt/src/qgpgmesignarchivejob.h (QGpgMESignArchiveJob): Remove member function resultHook and member mResult. -- GnuPG-bug-id: 6342
* cpp: Fix debug output of SignatureModeIngo Klöcker2023-01-311-1/+9
| | | | | | | | | | * lang/cpp/src/context.cpp (operator<<): Treat signature mode as combination of a 2-bit flag and a 1-bit flag. -- This fixes the output for normal signature mode. GnuPG-bug-id: 6342
* qt: Add job for creating encrypted signed archivesIngo Klöcker2023-01-319-31/+495
| | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/signencryptarchivejob.cpp, lang/qt/src/signencryptarchivejob.h, lang/qt/src/signencryptarchivejob_p.h, lang/qt/src/qgpgmesignencryptarchivejob.cpp, lang/qt/src/qgpgmesignencryptarchivejob.h: New. * lang/qt/src/protocol.h (class Protocol): Add pure virtual member function signEncryptArchiveJob * lang/qt/src/protocol_p.h (Protocol::signEncryptArchiveJob): ... and implement it. * lang/qt/src/Makefile.am: Update accordingly. * lang/qt/tests/run-encryptarchivejob.cpp (displayName): Remove. (CommandLineOptions): Initialize member armor. Add member sign. (parseCommandLine): Update application description. Add and parse option -s/--sign. (main): Use SignEncryptArchiveJob if sign option is set. -- GnuPG-bug-id: 6342
* qt,tests: Avoid leaking ContextIngo Klöcker2023-01-311-3/+5
| | | | | | | * lang/qt/tests/t-import.cpp: Wrap Context*s in unique_ptr. -- This fixes leaks found with -fsanitize=address.
* doc: Fix description of gpgme_data_identifyWerner Koch2023-01-311-1/+2
| | | | | -- GnuPG-bug-id: 5887
* json: New operation "identify" and convenience option --identify.Werner Koch2023-01-312-2/+129
| | | | | | | | | * 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. --
* Update NEWS and set version to 1.19.0Werner Koch2023-01-312-3/+5
| | | | --
* Merge branch 'ikloecker/t6342-gpgtar' into masterWerner Koch2023-01-3145-375/+2509
|\ | | | | | | | | | | | | | | -- Solved conflicts: NEWS lang/cpp/src/context.cpp lang/cpp/src/context.h
| * qt: Add job for creating signed archivesikloecker/t6342-gpgtarIngo Klöcker2023-01-3010-1/+588
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/signarchivejob.cpp, lang/qt/src/signarchivejob.h, lang/qt/src/signarchivejob_p.h, lang/qt/src/qgpgmesignarchivejob.cpp, lang/qt/src/qgpgmesignarchivejob.h: New. * lang/qt/src/protocol.h (class Protocol): Add pure virtual member function signArchiveJob * lang/qt/src/protocol_p.h (Protocol::signArchiveJob): ... and implement it. * lang/qt/src/Makefile.am: Update accordingly. * lang/qt/tests/run-signarchivejob.cpp: New. * lang/qt/tests/Makefile.am: Add new test runner. -- GnuPG-bug-id: 6342
| * cpp: Support new archive signing flagIngo Klöcker2023-01-303-15/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/cpp/src/global.h (enum SignatureMode): Add constant SignArchive. * lang/cpp/src/context.cpp (sigmode2sigmode): Rename to sigflags2sigflags (sigflags2sigflags): ... and rename argument mode to flags and treat it as flags. Adjust the callers. (operator<<): Change local CHECK macro to handle flags. Add new flag to debug stream. * lang/cpp/src/signingresult.cpp (CreatedSignature::mode): Handle new flags (even if it cannot occur currently). -- GnuPG-bug-id: 6342
| * core: Use signature modes as flagsIngo Klöcker2023-01-308-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
| * qt: Add job for creating encrypted archivesIngo Klöcker2023-01-2711-0/+634
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/encryptarchivejob.cpp, lang/qt/src/encryptarchivejob.h, lang/qt/src/encryptarchivejob_p.h, lang/qt/src/qgpgmeencryptarchivejob.cpp, lang/qt/src/qgpgmeencryptarchivejob.h: New. * lang/qt/src/protocol.h (class Protocol): Add pure virtual member function encryptArchiveJob * lang/qt/src/protocol_p.h (Protocol::encryptArchiveJob): ... and implement it. * lang/qt/src/Makefile.am: Update accordingly. * lang/qt/tests/run-encryptarchivejob.cpp: New. * lang/qt/tests/Makefile.am: Add new test runner. -- GnuPG-bug-id: 6342
| * qt: Add data provider for list of file namesIngo Klöcker2023-01-275-0/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lang/qt/src/Makefile.am: Add new files and corresponding camel-case header. * lang/qt/src/dataprovider.h: Include interface from gpgme++ when not building. * lang/qt/src/filelistdataprovider.cpp, lang/qt/src/filelistdataprovider.h: New. -- The new data provider simplifies providing a nul-separated list of UTF-8-encoded filenames, e.g. for creating signed or encrypted archives. It is a simple read-only proxy for QByteArrayDataProvider. GnuPG-bug-id: 6342
| * cpp: Support new archive encryption flagIngo Klöcker2023-01-272-1/+6
| | | | | | | | | | | | | | | | | | | | * lang/cpp/src/context.h (EncryptArchive): New flag. * lang/cpp/src/context.cpp (encryptflags2encryptflags): Convert EncryptArchive to corresponding gpgme encrypt flags. (operator<<): Add new flag to debug stream. -- GnuPG-bug-id: 6342
| * cpp: Add convenience overload to set file nameIngo Klöcker2023-01-273-0/+7
| | | | | | | | | | | | | | | | * lang/cpp/src/data.h, lang/cpp/src/data.cpp (setFileName): Add overload. -- GnuPG-bug-id: 6342
| * doc: Fix syntax errorsIngo Klöcker2023-01-271-4/+4
| | | | | | | | | | | | -- GnuPG-bug-id: 6342
| * core: Update required GnuPG version for new archive featuresIngo Klöcker2023-01-262-9/+12
| | | | | | | | | | | | | | | | | | | | | | * 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
| * doc: Update NEWS and API documentationIngo Klöcker2023-01-252-8/+66
| | | | | | | | | | | | -- GnuPG-bug-id: 6342
| * core: Support usage of gpgtar for verifying a signed archiveIngo Klöcker2023-01-2511-33/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * core: Support usage of gpgtar for decrypting an encrypted archiveIngo Klöcker2023-01-245-22/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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