<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gpgme/tests/gpg, branch ikloecker/qt6</title>
<subtitle>GnuPG Made Easy.</subtitle>
<id>http://git.bktus.com/gpgfrontend/gpgme/atom?h=ikloecker%2Fqt6</id>
<link rel='self' href='http://git.bktus.com/gpgfrontend/gpgme/atom?h=ikloecker%2Fqt6'/>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/'/>
<updated>2022-08-10T10:34:12Z</updated>
<entry>
<title>tests: Make t-edit-sign more robust.</title>
<updated>2022-08-10T10:34:12Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2022-08-10T10:32:52Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=9ee74b68e688b474881768a5ae59d857397c8fbf'/>
<id>urn:sha1:9ee74b68e688b474881768a5ae59d857397c8fbf</id>
<content type='text'>
* tests/gpg/t-edit-sign.c (interact_fnc): Provide the default answer.
--

A default answer to prompts should always be given.
</content>
</entry>
<entry>
<title>core: Detect bad passphrase error on certificate import</title>
<updated>2021-12-22T14:25:42Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2021-12-22T11:13:23Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=305d8668ca724982c50fe4e05315c48a20cc33e5'/>
<id>urn:sha1:305d8668ca724982c50fe4e05315c48a20cc33e5</id>
<content type='text'>
* src/import.c (gpgme_op_import_result): Check fpr for NULL.
(parse_error): New.
(import_status_handler): Handle error status line.

* doc/gpgme.texi (gpgme_import_status_t): Mention that fpr can be NULL.

* tests/gpg/t-import.c (check_result): Check fpr for NULL.
* tests/run-threaded.c (delete_impres): Check fpr for NULL.
--

When importing an encrypted certificate a wrong passphrase may be
entered. In this case gpgsm emits a status line with a bad passphrase
error and an "invalid object" error. To make it possible for callers
to handle a wrong passphrase error more gracefully, an import status
with bad passphrase error is added to the import result for each
status line with bad passphrase error.

GnuPG-bug-id: 5713
</content>
</entry>
<entry>
<title>core: Allow specifiying a key origin when importing keys</title>
<updated>2021-12-13T15:52:23Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2021-12-13T15:52:23Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=60880adafa93e1a1e8e9fecf03c14d56bbd55345'/>
<id>urn:sha1:60880adafa93e1a1e8e9fecf03c14d56bbd55345</id>
<content type='text'>
* src/context.h (struct gpgme_context): New field key_origin.
* src/engine-backend.h (struct engine_ops): Add arg key_origin to
field 'import'.
* src/engine-gpg.c (gpg_import): Add arg key_origin and pass option
--key-origin with argument value to gpg. Adjust all callers.
* src/engine-gpgsm.c (gpgsm_import): Add dummy arg key_origin.
* src/gpgme.c (gpgme_release): Free 'key_origin'.
(gpgme_set_ctx_flag, gpgme_get_ctx_flag): New flag "key-origin".

* tests/run-import.c (main): Add option --key-origin.
* tests/gpg/t-import.c (main): Set and verify key origin.
--

This makes the --key-origin option available in the GPGME API for
key imports.

GnuPG-bug-id: 5733
</content>
</entry>
<entry>
<title>posix: Use poll instead, when available, removing use of select.</title>
<updated>2021-11-25T02:13:17Z</updated>
<author>
<name>NIIBE Yutaka</name>
<email>gniibe@fsij.org</email>
</author>
<published>2021-11-25T02:13:17Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=8148237cb4ae20755c06a44d71761c7030973c3d'/>
<id>urn:sha1:8148237cb4ae20755c06a44d71761c7030973c3d</id>
<content type='text'>
* configure.ac (HAVE_POLL_H): Add the check.
* src/ath.c [!HAVE_POLL_H] (ath_select): Enable conditionally.
* src/posix-io.c [HAVE_POLL_H] (_gpgme_io_select_poll): Use poll.
* tests/gpg/t-cancel.c [HAVE_POLL_H] (do_select): Use poll.
* tests/gpg/t-eventloop.c [HAVE_POLL_H] (do_select): Use poll.

--

GnuPG-bug-id: 2385
Signed-off-by: NIIBE Yutaka &lt;gniibe@fsij.org&gt;
</content>
</entry>
<entry>
<title>tests: Build using GPG_ERROR_MT_LIBS for thread use.</title>
<updated>2021-11-12T01:22:21Z</updated>
<author>
<name>NIIBE Yutaka</name>
<email>gniibe@fsij.org</email>
</author>
<published>2021-11-12T01:22:21Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=1cedac2bba246ff411843aaef10ca8ea0a0756cf'/>
<id>urn:sha1:1cedac2bba246ff411843aaef10ca8ea0a0756cf</id>
<content type='text'>
* tests/gpg/Makefile.am (WITH_THREAD_CPPFLAGS): New.
(WITH_THREAD_LDADD): New.
(t_thread1_CPPFLAGS, t_thread_keylist_CPPFLAGS)
(t_thread_keylist_verify_CPPFLAGS)
(t_cancel_CPPFLAGS): Use WITH_THREAD_CPPFLAGS.
(t_thread1_LDADD, t_thread_keylist_LDADD)
(t_thread_keylist_verify_LDADD)
(t_cancel_LDADD): Use WITH_THREAD_LDADD.

--

For library dependency at runtime, it's not 100% right to use
GPG_ERROR_MT_LIBS here, because those test programs don't use
libgpg-error directly at runtime.  But, it's OK, because these are
test programs, which don't need specifying minimum library dependency.

It would be too much for configure of gpgme, to check how threaded
application should be built, just for these test programs.

Co-authored-by: Ben Kibbey &lt;bjk@luxsci.net&gt;
Signed-off-by: NIIBE Yutaka &lt;gniibe@fsij.org&gt;
</content>
</entry>
<entry>
<title>build: Fix make distcheck problem.</title>
<updated>2021-08-27T12:13:36Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2021-08-27T12:13:18Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=aaf448b1e81e7421e539ac2deb9dc9d3d1459016'/>
<id>urn:sha1:aaf448b1e81e7421e539ac2deb9dc9d3d1459016</id>
<content type='text'>
* tests/start-stop-agent: Use -f with rm.  Also use cat instead of cp.
--

Also shorted some lines.
</content>
</entry>
<entry>
<title>Add missing files for distribution</title>
<updated>2021-08-27T10:58:27Z</updated>
<author>
<name>Andre Heinecke</name>
<email>aheinecke@gnupg.org</email>
</author>
<published>2021-08-27T10:58:27Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=bc774104bbf461805f875c2bfd2d02aa6dd0945d'/>
<id>urn:sha1:bc774104bbf461805f875c2bfd2d02aa6dd0945d</id>
<content type='text'>
* lang/qt/src/Makefile.am (private_qgpgme_headers): Add job_p.h
* tests/gpg/Makefile.am (EXTRA_DIST): Add gpg.conf.in
</content>
</entry>
<entry>
<title>core: Ensure gpg.conf for tests is recreated if necessary</title>
<updated>2021-07-08T10:18:45Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2021-07-08T10:18:45Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=a5662a801fc11a533fb3b1a69a17e119064972a3'/>
<id>urn:sha1:a5662a801fc11a533fb3b1a69a17e119064972a3</id>
<content type='text'>
* tests/gpg/gpg.conf.in: New.
* tests/gpg/Makefile.am (gpg.conf): Copy gpg.conf.in instead of using
echo to fill gpg.conf.
--

This change ensures that gpg.conf is updated whenever new options are
added for some tests.
</content>
</entry>
<entry>
<title>core: Fix use-after-free issue in test</title>
<updated>2021-06-26T16:03:37Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2021-06-26T16:02:47Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=81a33ea5e1b86d586b956e893a5b25c4cd41c969'/>
<id>urn:sha1:81a33ea5e1b86d586b956e893a5b25c4cd41c969</id>
<content type='text'>
* tests/gpg/t-edit-sign.c (sign_key, verify_key_signature): New.
(main): Factored out signing and verifying the result.
--

Factoring the two steps of the test into different functions fixes the
use-after-free issue that was caused by accidentaly using a variable
of the first step in the second step.

GnuPG-bug-id: 5509
</content>
</entry>
<entry>
<title>core: Allow specifying an expiration date for key signatures</title>
<updated>2021-06-22T14:35:03Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2021-06-22T14:23:26Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=34d9defc42bacfaf2bb1ce70b2c3f0fdf0a106c3'/>
<id>urn:sha1:34d9defc42bacfaf2bb1ce70b2c3f0fdf0a106c3</id>
<content type='text'>
* src/context.h (struct gpgme_context): Add 'cert_expire'.
* src/engine-gpg.c (append_args_from_cert_expire): New.
(gpg_edit): Set option according to the new flag.
* src/gpgme.c (gpgme_release): Free 'cert_expire'.
(gpgme_set_ctx_flag, gpgme_get_ctx_flag): Add "cert-expire".

* tests/gpg/Makefile.am (c_tests): Add new test.
(gpg.conf): Write "allow-weak-key-signatures" to gpg.conf.
* tests/gpg/t-edit-sign.c: New.
--

The new context flag "cert-expire" allows setting the expiration date
for key signatures created with gpgme_op_interact.

GnuPG-bug-id: 5336, 5505
</content>
</entry>
</feed>
