* doc/gpgme.texi (gpgme_verify_result_t): Explain
GPGME_STATUS_NO_ERROR more clearly.
--
This might help to avoid misunderstandings how the
status can be interpreted and explains why a verify
of unsigned PGP Data returns no error.
As a reaction to CVE-2020-10759 discovered by Justin Steven.
* src/verify.c (parse_trust): Fix detection of "chain" keyword.
--
Fixes-commit: da6f3dc0c5
from 2007 shortly after introducing this. I doubt that this info has
ever been used (it is for qualified signatures, which are only
supported using the legacy German RegTP rules for them which were soon
overturned by the commercial CAs).
Signed-off-by: Werner Koch <wk@gnupg.org>
* src/Makefile.am (gpgme_w32_extra_libs): New.
(libgpgme_la_LIBADD, libgpgme_glib_la_LIBADD): Use it.
--
Since w32-io.c directly uses functions from ws2_32 it should
not rely on libgpg-error to pull in this dependency.
* doc/gpgme.texi: Fixes version number from 1.8.0 to
1.9.0 for GPGME_CREATE_NOEXPIRE.
GnuPG-Bug-Id: T4922
Signed-off-by: dupgit <olivier.delhomme@free.fr>
* src/engine-gpg.c (gpg_keylist_build_options): Send --with-keygrip
if --with-secret is used.
--
Since GnuPG 2.2.19 the keygrip was not anymore send if only
--with-secret was used in a public key listing. Given that
--with-secret requires computation of the keygrip anyway, there is no
point in not requesting the keyrip in this case.
GnuPG-bug-id: 4820
* tests/json/t-keylist-secret.out.json: Do not check for keygrip
of bravo key.
--
Since GnuPG 2.2.19 the keygrip is not emitted for public keys
in a keylisting --with-secret.
As the GPGME test suite should pass with several versions
the json test cannot test this as the suite does not allow
version checks for different output.
What the intended behavior is might still be up for discussion,
always adding --with-keygip is not a good solution because
it slows down keylistings for large keyrings.
GnuPG-Bug-Id: T4820
* src/Makefile.am (gpgme_tool_LDADD): Add @GPG_ERROR_LIBS@.
--
Since gpgme-tool uses gpg_strerror, it should be linked
to -lgpg-error.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* lang/qt/src/*: Change logging category to macro to QGPGME_LOG.
--
The old logging category macro had a typo and this way we
are more consistent with other logging rules. For example
you could write gpg.* in the logging conf.
* lang/qt/src/Makefile.am: Add new files.
* lang/qt/src/job.cpp (GpgCardJob): Add impl stuff.
* lang/qt/src/protocol.h (gpgCardJob): Get one.
* lang/qt/src/qgpgmebackend.cpp,
lang/qt/src/qgpgmebackend.h: Add helpers to get the job.
* lang/qt/src/qgpgmegpgcardjob.cpp,
lang/qt/src/gpgcardjob.h,
lang/qt/src/qgpgmegpgcardjob.h: New.
--
This is annoyingly complex to add a simple new job.
In the future we should implement something like this
without the threadedjobmixin stuff. But the idea was
to follow the usual job pattern.
GnuPG-Bug-Id: T4794
* tests/json/t-keylist-secret.out.json
--
Since at least 2.2.19 GnuPG no longer emits secret = true
for keys where it does not have a secret. To avoid
failures with older versions we remove the check altogether.
GnuPG-Bug-Id: T4820
* m4/python.m4: Scan for python 3.8 as well.
--
It's not clear to me why python3.8 should be commented out of the
python path search. This change simplifies and normalizes the search
for modern versions of python 3.
Signed-Off-By: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* src/posix-util.c (find_executable): New.
(walk_path_str): Factored out from walk_path.
(walk_path): Replaced by find_executable.
(_gpgme_get_gpg_path, _gpgme_get_gpgconf_path): Use find_executable.
--
This should help to locate GnuPG on MacOS systems where
it is not part of the PATH environment variable and
should reduce the need to have fixed path known
at GPGME compile time.
mailvelope/issue699
* lang/cpp/src/gpgsignkeyeditinteractor.cpp (action):
Use uidhash instead of number.
(GpgSignKeyEditInteractor::setKey): New.
* lang/cpp/src/gpgsignkeyeditinteractor.h: Update accordingly.
* lang/cpp/src/key.h, lang/cpp/src/key.cpp: Wrap uidhash.
* lang/qt/src/qgpgmesignkeyjob.cpp: Set the key.
--
Using the uidhash avoids problems when the user ids
on --edit-key are different ones then the uids
captured by gpgme when listing keys. Or if
they are in a different order. This can happen
with cached keys or keys with user attributes.
* src/gpgme.h.in (struct _gpgme_user_id): Add field 'uidhash'.
* src/key.c (gpgme_key_unref): Free it.
* src/keylist.c (keylist_colon_handler): Set it.
* tests/run-keylist.c (main): Print it.
--
The uidhash value is part of gpg's output since the year 2005. This
now adds support to gpgme. The application for uidhash is to select
a user id in an edit interactor: Instead of giving the number of the
user id, the uidhash value can be be used to avoid tracking the user
id numbers.
Signed-off-by: Werner Koch <wk@gnupg.org>
* src/engine-gpg.c (gpg_decrypt): only send --no-keyring when we are
not verifying.
--
Without this change, the signature verification would fail. This
problem was introduced in bded8ebc59 in
an attempt to avoid an error when *not* verifying. Clearly more test
suite coverage is needed to avoid introducing this sort of problem in
the future.
GnuPG-bug-id: 3464
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
* doc/Makefile.am: Remove uiserver.texi
* doc/gpgme.texi: Remove UI-Server mentions.
* doc/uiserver.texi: Removed.
--
This prepares the removal of UI Server from implementing
applications like Kleopatra.
The only user of the UI Server is GpgEX and even that
does not need it at all and is better served with process
calls.
GnuPG-Bug-Id: T4030
* lang/qt/tests/t-remarks.cpp (initTestCase): Supply
allow-weak-key-signatures flag for GnuPG 2.3, which
normally rejects use of SHA1 digest.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* lang/qt/tests/t-encrypt.cpp (decryptSupported): Moved to
t-support as loopbackSupported.
* lang/qt/tests/t-remarks.cpp: Check for loopbackSupported.
* lang/qt/tests/t-support.cpp, lang/qt/tests/t-support.h
(loopbackSupported): New.
--
This ensures that the tests do not fail with GnuPG 2.0.x
* lang/qt/test/t-remarks.cpp (testRemarkReplaceSingleUIDExportable):
Use QVERIFY instead of assert.
--
An assert causes the temp directory not to be cleaned up. I
use this to analyze test failures.
If you want to see the tests home directory after a failure you
can just change a failing verify to an assert.
* lang/cpp/src/key.cpp, lang/cpp/src/key.h (UserID::remarks): New.
* NEWS: Mention this.
--
This can be useful if we want to show remarks made by others, too.
For:
GnuPG-Bug-Id: T4734
* lang/qt/tests/t-various.cpp (testRemarks): Move out.
* lang/qt/tests/t-remarks.cpp: New.
* lang/qt/tests/Makefile.am: Update accordingly.
--
While t-various is nice to add a quick test for more
extensive stuff it is better to move it in its own test.
This also tests with a key that has only a single uid.
* lang/cpp/src/key.cpp (UserID::remark): Use C-API.
--
The other parts of that function already use the C API
so we can also avoid function calls for the keyListMode.
* lang/cpp/src/gpgsignkeyeditinteractor.cpp: Add another
state DUPE_OK2 to allow gpg looping over all uids.
--
When duplicated signatures should be added to multiple
user ids GnuPG will ask for each uid so we have to
add a transition for that.
GnuPG-Bug-Id: T4734
* lang/cpp/src/editinteractor.cpp (EditInteractor::Private::Private):
Read "GPGMEPP_INTERACTOR_DEBUG" env var.
(EditInteractor::Private::~Private): Close debug file.
--
While it was possible for the application to control the
debug through setDebugChannel it is often times helpful
to just debug without changing the application using
GPGME
* src/keylist.c (keylist_colon_handler): Do not clear
out the tmp_uid when a subpacket line is encountered.
--
When the uid is cleared no more signatures following
the subpacket are parsed, so we now no longer clear
it when a subpacket is encountered.
* lang/qt/src/qgpgmesignkeyjob.cpp: Handle remarks and
dupeOK.
* lang/qt/src/signkeyjob.h (SignKeyJob::setDupeOk),
(SignKeyJob::setRemark): New.
--
This API makes it easy for Kleopatra to add remarks for:
GnuPG-Bug-Id: T4734
* lang/cpp/src/gpgsignkeyeditinteractor.cpp
(GpgSignKeyEditInteractor::setDupeOk): New.
(makeTable): Add new tansitions.
(SignKeyState): Add DUPE_OK Status.
(GpgSignKeyEditInteractor::action): Handle DUPE_OK.
(GpgSignKeyEditInteractor::Private::Private): Carry flag.
--
When extended-edit is enabled this can be used to answer
the "dupe_ok" query from the edit-key with yes.
This is for:
GnuPG-Bug-Id: T4734
* lang/cpp/src/key.h, lang/cpp/src/key.cpp (UserID::remark): New.
--
A remark made by one key on another is a signature notation on
a user id certification signature with the name "rem@gnupg.org".
This helps with:
GnuPG-Bug-Id: T4734
* src/context.h (gpgme_context): Add new flag for extended-edit.
* src/engine-gpg.c (append_args_from_sig_notations): Add flags to
control the kind of notations.
(gpg_edit): Respect extended-edit and notations.
(gpg_encrypt_sign, gpg_sign): Update call to
append_args_from_sig_notations.
* src/gpgme.c (gpgme_set_ctx_flag, gpgme_get_ctx_flag): Support
extended-edit.
* NEWS, doc/gpgme.texi: Mention extended-edit.
--
This provides a way to get the extended key-edit interface without
breaking bad state machines that rely on the current command flow.
A use case for this is to enable multiple local signatures, which
can be used together with annotations for:
GnuPG-Bug-Id: T4734