<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gpgme/tests/gpg, branch gpgme-2.0.0</title>
<subtitle>GnuPG Made Easy.</subtitle>
<id>http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-2.0.0</id>
<link rel='self' href='http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-2.0.0'/>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/'/>
<updated>2024-09-04T12:31:12Z</updated>
<entry>
<title>core: Treat email-only user IDs with upper case letters as email address</title>
<updated>2024-09-04T12:31:12Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2024-09-04T12:31:12Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=2264b64b85e6d522fdc5e06d5260f5b7b5414417'/>
<id>urn:sha1:2264b64b85e6d522fdc5e06d5260f5b7b5414417</id>
<content type='text'>
* src/key.c (_gpgme_key_append_name): Support email-only user IDs with
upper case letters.

* tests/gpg/t-keylist.c (struct key_info_s): Add algo, length, sec_algo,
sec_length.
(keys): Add expected algo and length for primary and secondary subkeys.
(main): Factor out code for checking a key and the code for the keylist
test. Call the factored out test function and a new test function.
(check_key, test_keylist, key_with_email_only_user_id,
key_info_email_only_user_id,
test_email_only_user_id_with_upper_case_letters): New.
--

Email-only user IDs with upper case letters are now also parsed as a
user ID with empty name and the complete user ID as email.

GnuPG-bug-id: 7280
</content>
</entry>
<entry>
<title>core: New function gpgme_op_setownertrust</title>
<updated>2024-08-06T10:43:28Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2024-08-05T15:14:01Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=d804a7a4bc871f38f6cdc2cd63af3ef004580437'/>
<id>urn:sha1:d804a7a4bc871f38f6cdc2cd63af3ef004580437</id>
<content type='text'>
* src/Makefile.am (main_sources): Add new file.
* src/context.h (ctx_op_data_id_t): Add OPDATA_SETOWNERTRUST.
* src/engine.c, src/engine.h (_gpgme_engine_op_setownertrust): New.
* src/engine-backend.h (engine_ops): Add 'setownertrust' and adjust all
engine initializers.
* src/engine-gpg.c (gpg_setownertrust): New.
(_gpgme_engine_ops_gpg): Set setownertrust to gpg_setownertrust.
* src/gpgme.h.in (gpgme_op_setownertrust_start, gpgme_op_setownertrust):
New.
* src/gpgme.def, src/libgpgme.vers: Add new functions.
* src/setownertrust.c: New.

* doc/gpgme.texi: Document new functions.

* tests/Makefile.am (noinst_PROGRAMS): Add new test program.
* tests/run-setownertrust.c: New.

* tests/gpg/Makefile.am (c_tests): Add new file. (LDADD): Add
@GPG_ERROR_LIBS@.
* tests/gpg/t-setownertrust.c: New.
* tests/gpg/t-support.h (have_gpg_version): New.

--

This extends GPGME to support the --quick-set-ownertrust command added
by GnuPG 2.4.6. This allows changing the owner trust of keys and
enabling/disabling keys without using the editinteractor interface.

GnuPG-bug-id: 7239
</content>
</entry>
<entry>
<title>tests: Avoid some compiler warnings.</title>
<updated>2024-05-21T11:45:02Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2024-05-21T11:45:02Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=55a1ae4163ecc97601c8d3d216452b65eec405af'/>
<id>urn:sha1:55a1ae4163ecc97601c8d3d216452b65eec405af</id>
<content type='text'>
* 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.
</content>
</entry>
<entry>
<title>tests: Fix test after changed behavior of gpgme_op_verify</title>
<updated>2024-05-15T09:53:06Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2024-05-15T09:53:06Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=a73a41109fff3b6d3f81fa29d353419ae45f6dda'/>
<id>urn:sha1:a73a41109fff3b6d3f81fa29d353419ae45f6dda</id>
<content type='text'>
* 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
</content>
</entry>
<entry>
<title>core: Prevent wrong plaintext when verifying clearsigned signature</title>
<updated>2023-07-28T14:15:12Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2023-07-28T14:15:12Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=a9b28c79e92f6194ea52c7d33213f2a0dc9bd013'/>
<id>urn:sha1:a9b28c79e92f6194ea52c7d33213f2a0dc9bd013</id>
<content type='text'>
* src/engine-gpg.c (gpg_verify): Use a separate pipe instead of stdout
for reading the plaintext.

* tests/gpg/t-support.h (PGM): Define if undefined.
(print_data): Undefine BUF_SIZE.
(check_data): New.
* tests/gpg/t-verify.c (clearsigned_plus_key_block): New.
(main): Add test.
--

Reading the plaintext from stdout is a bad idea because gpg can also
print other stuff on stdout, e.g. the keys contained in a public key
block. This is fixed by reading the plaintext via a special pipe.

GnuPG-bug-id: 6622
</content>
</entry>
<entry>
<title>tests: Package the ownertrust file</title>
<updated>2023-03-17T08:20:08Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2023-03-17T08:06:23Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=e50724e1bbe55678dfcd2a1ea75157f6514fc58a'/>
<id>urn:sha1:e50724e1bbe55678dfcd2a1ea75157f6514fc58a</id>
<content type='text'>
tests/gpg/Makefile.am (EXTRA_DIST): Add ownertrust.txt.
--

This fixes `make distcheck`.

GnuPG-bug-id: 6342
</content>
</entry>
<entry>
<title>tests: Fix cleaning up at the end of the test</title>
<updated>2023-02-10T09:00:56Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2023-02-10T09:00:56Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=21283dfd1be1e56bc174cf5f12461888af7ab8b5'/>
<id>urn:sha1:21283dfd1be1e56bc174cf5f12461888af7ab8b5</id>
<content type='text'>
* tests/gpg/t-import.c (main): Unref key and release context.
--

This fixes leaks found with -fsanitize=address.
</content>
</entry>
<entry>
<title>core: Allow finalization of signature verification of unencrypted data</title>
<updated>2023-02-10T08:54:03Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2023-02-08T13:44:38Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=41dc3bd22a3e0001abec8f2bea79b40ee5ad00be'/>
<id>urn:sha1:41dc3bd22a3e0001abec8f2bea79b40ee5ad00be</id>
<content type='text'>
* 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
</content>
</entry>
<entry>
<title>tests: Stop daemons after setting up test environment</title>
<updated>2023-02-09T08:33:07Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2023-02-08T13:59:28Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=7098c14b231113055535abb14b4cde0c845f8728'/>
<id>urn:sha1:7098c14b231113055535abb14b4cde0c845f8728</id>
<content type='text'>
* 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".
</content>
</entry>
<entry>
<title>tests: Extend tests with an ultimately trusted key</title>
<updated>2023-02-08T12:46:17Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2023-02-08T12:46:17Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=fcefc78f749a8f39cc587636647b24f8fa48efad'/>
<id>urn:sha1:fcefc78f749a8f39cc587636647b24f8fa48efad</id>
<content type='text'>
* 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
</content>
</entry>
</feed>
