* 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
* tests/json/t-decrypt-verify.out.json: Remove check with key of
04071FB807287134.
--
GnuPG 2.3 changes how public key decryption works; It collects list of
PUBKEY_ENC packets and then processes an ENCRYPTED* packet. At the
stage of processing an ENCRYPTED* packet, it checks if private keys
can decrypt any of PUBKEY_ENC packets. It does not necessarily
examine all of PUBKEY_ENC packets. Only when it finds a PUBKEY_ENC
packet cannot be decrypted, it reports STATUS_NO_SECKEY with keyid of
that packet.
GnuPG 2.2 or older tries PUBKEY_ENC packets in order, and the first
successful PUBKEY_ENC packet is used. Rest of PUBKEY_ENC packets are
not examined, but STATUS_NO_SECKEY with keyid is reported even when
there is a valid private key.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
* src/engine-gpg.c (build_argv): Properly check for all
arguments and allocate memory for them.
--
This fixes a potential buffer overflow which could be created
by using unusual and partially contradictory options.
Like offline and auto-key-locate together while
using ignore-mdc-error.
As the list of arguments should not be user controlled the
impact of this is very low.
To ensure that this does not happen in the future an
assert is also added with this patch.
* lang/python/doc/Makefile.am (EXTRA_DIST): Remove files not
distributed like files under meta.
* Add rules to generate .rst and .texi files.
* lang/python/doc/rst: Remove .rst files to be generated.
* lang/python/doc/texinfo: Remove .texi files to be generated.
GnuPG-bug-id: 4275
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
--
* Connection.js: In some cases, the browser disconnect does not
happen inmediately (e.g. wrong extension for the app). I added a
delay of 25 ms to see if the connection was closed by the browser.
Also, I tried to make the checkConnection more readable.
--
* Connection.js
- Add some meaningful nativeMessaging feedback for failing
communication due to misconfiguration or other browser-originated
fails
- add an "isDisconnected" property
- "isNativeHostUnknown" tries to match browser's feedback string if
the browser does not find gpgme-json
* init.js
- initialization will now reject with a more meaningful error if the
configuration is not set up or other browser-based errors
(chrome.runtime.lastError) are present. This should speed up
the normal initialization (not having to waiting for a timeout
any more in case of improper setup)
* errors.js
- CONN_NATIVEMESSAGE: New error that passes the browser's
nativeMessaging error
- CONN_NO_CONFIG: native messaging error indicating that the
nativeMessaging host was not set up properly
* unittests.js:
- added the "isDisconnected" property to the startup tests
- added tests for proper behavior of connection checks
* lang/python/tests/Makefile.am (gpg.conf): Set a default key.
--
It seems we need to set a default key because at least t-sign.py does
not specify the key to use and we do not want to rely on the order of
keys in the keyring.
Also
Fixes-commit: f3ca2c9ce9
gpg 2.0 is end-of-life and we don't need these extra options anymore.
In fact they for the use of some gpg version and don't use the version
gpgconf knows about. This also aligns the python tests to what we use
for the C test suite.
Signed-off-by: Werner Koch <wk@gnupg.org>
* src/debug.c (_gpgme_debug_buffer): Switch between two output
formats.
--
The new format is much more practical than the bunch of hex digits
followed by just 16 ascii chars. To get the old behaviour use a debug
level of 10.
Signed-off-by: Werner Koch <wk@gnupg.org>
* tests/run-threaded.c (random_data_close): Correct FD test.
--
An invalid DS is -1 and not 0; this fix is for correctness and does
not chnage anything in the real world.
Signed-off-by: Werner Koch <wk@gnupg.org>
* src/posix-io.c (_gpgme_is_fd_valid): New out-commented function.
--
This code is sometimes useful to track down invalid file descriptors.
We keep it commented in the code.
Signed-off-by: Werner Koch <wk@gnupg.org>
* src/wait.c (_gpgme_run_io_cb): Fix return code.
--
The function needs to return an gpg_error_t and not ERRNO.
Signed-off-by: Werner Koch <wk@gnupg.org>
* tests/run-threaded.c (main): Handle allow-del.
(allow-del): New. Variable to allow deletion of keys.
(import): Delete key after import if allow-del is set.
(delete_impres): Delete keys from an import result.
(delete_fpr): Delete a key by fingerprint.
--
This is intended to test write access and locking of the
keyring by repeatedly importing and deleting pubkeys.
It is an option because it might cause keyring corruption
etc. so it should be explicitly enabled.
* src/debug.c (_gpgme_debug): Take better care of NULL userinfo.
(_gpgme_debug_end): Rework.
(_trace_sysres): Print ERRNO and not the supplied RES.
--
The TRACE_SYSRES patch fixes
Regression-due-to: 7a1e7006d0
Signed-off-by: Werner Koch <wk@gnupg.org>
* src/debug.c (_gpgme_debug): Add arg LINE. Chnage all callers.
(_gpgme_debug_begin): Remove.
* src/debug.h (TRACE_SEQ): Use the LINE arg of _gpgme_debug.
--
This includes chnages to always print fds in decimal as weel as
tweaking the TARCE_SEQ function to make use of the new machinery.
The standard 'tag' can now always be NULL and no tag information will
be printed.
Signed-off-by: Werner Koch <wk@gnupg.org>
* src/debug.c (debug_lock): Remove. Also remove all users.
(_gpgme_debug): Use gpgrt_bsprintf to prepare the output and finally
print using standard fprintf. Reformat to prefix to be narrower.
--
Note that the locks are now implicitly done using the systems stdio.
The threadid is now printed with 4 digits in hex and thus without the
angle brackets and the 0x. However it is still a hex number even if it
may look like an octal number. The hex letters are uppercase to make
searching in locks easier iff the threadid happens to have a letter in
it.
Signed-off-by: Werner Koch <wk@gnupg.org>
* src/cJSON.c: Include stdint.h.
(parse_number): Avoid overflob in SUBSCALE and cap integer values.
--
GnuPG-bug-id: 4330
Signed-off-by: Werner Koch <wk@gnupg.org>
* src/engine-gpg.c (append_args_from_recipients_string): Detect bad
options.
* src/engine-gpgsm.c (set_recipients_from_string): Implement option
parsing.
--
The only option we actually implement is "--" but the code layout is
now very simlar to engine-gpg and can easily be extended if ever
needed.
Signed-off-by: Werner Koch <wk@gnupg.org>
* src/engine-gpgsm.c (gpgsm_encrypt): Fix argument check.
--
It is pretty obvious thar the string based new encrypt function has
never been tested for S/MIME. The fix was easy. A followup patch
will extend it to allow for keywords in the future.
GnuPG-bug-id: 4556
Fixes-commit: a1f76b3b54
Signed-off-by: Werner Koch <wk@gnupg.org>
* configure.ac: Configure new Makefiles.
* lang/python/Makefile.am: Remove dirs from extra dist and use
subdirs.
* lang/python/examples/Makefile.am, lang/python/src/Makefile.am,
lang/python/doc/Makefile.am: New. Files that list EXTRA_DIST files.
--
This is similar to what lang/js does by explicitly listing the
files. This ensures that we have clean distribution tarballs
without accidentall additions that just lay in the directory.
GnuPG-Bug-Id: T4481