<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gpgme/src/key.c, branch gpgme-1.24.3</title>
<subtitle>GnuPG Made Easy.</subtitle>
<id>http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-1.24.3</id>
<link rel='self' href='http://git.bktus.com/gpgfrontend/gpgme/atom?h=gpgme-1.24.3'/>
<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: Add information about revocation keys to keys</title>
<updated>2024-05-21T14:38:59Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2024-05-15T08:31:46Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=adadfac997a812699049cd9a5f484cbcabff5bfd'/>
<id>urn:sha1:adadfac997a812699049cd9a5f484cbcabff5bfd</id>
<content type='text'>
* src/gpgme.h.in (struct _gpgme_revocation_key,
gpgme_revocation_key_t): New.
(struct _gpgme_key): Add fields 'revkeys', '_last_revkey'.
* src/key.c (_gpgme_key_add_rev_key): New.
(gpgme_key_unref): Free revkeys.
* src/keylist.c (keylist_colon_handler): Parse rvk lines.
* src/ops.h (_gpgme_key_add_rev_key): New.

* tests/run-keylist.c (main): Print revocation key info.
--

GnuPG-bug-id: 7118
</content>
</entry>
<entry>
<title>New mode to list a v5 fingerprint for v4 packets.</title>
<updated>2023-09-04T15:03:52Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2023-09-04T15:03:01Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=e36b2d1bce4bb6281e18f53d06d7831e6d6f5a09'/>
<id>urn:sha1:e36b2d1bce4bb6281e18f53d06d7831e6d6f5a09</id>
<content type='text'>
* src/gpgme.h.in (GPGME_KEYLIST_MODE_WITH_V5FPR): New.
(struct _gpgme_subkey): Add field v5fpr.
* src/engine-gpg.c (gpg_keylist_build_options): Pass new option to
gpg.
* src/key.c (gpgme_key_unref): Free new field.
* src/keylist.c (op_data_t): Parse and add "fp2" line.

* tests/run-keylist.c (show_usage): Add option --v5fpr.

* src/keylist.c (op_data_t): Add field failure_code.
(keylist_status_handler): Handle special value.
(gpgme_op_keylist_end): Return an error if a FAILURE line has been
seen.
--

Note that the failure code part has been added to better diagnose
problems if a wrong gpg version is used.  If verything works right we
should not get this because we check that the gnupg version sis either
&gt;= 2.4.4 or less than 2.3 and &gt;= 2.2.42.

Note further that the v5fpr field may also be used to get the SHA-256
fingerprint of X.509 certificates (even without passing the new mode
flag).

GnuPG-bug-id: 6705
</content>
</entry>
<entry>
<title>core: Extend gpgme_key_sig_t with trust signature members.</title>
<updated>2021-05-05T17:23:48Z</updated>
<author>
<name>Ingo Klöcker</name>
<email>dev@ingo-kloecker.de</email>
</author>
<published>2021-05-04T16:35:29Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=276187f6b62a73e92b1c20f589510f80ab9e88d2'/>
<id>urn:sha1:276187f6b62a73e92b1c20f589510f80ab9e88d2</id>
<content type='text'>
* src/gpgme.h.in (struct _gpgme_key_sig): Add fields 'trust_depth',
'trust_value', and 'trust_scope'.
* src/key.c (gpgme_key_unref): Free trust_scope.
* src/keylist.c (keylist_colon_handler): Set the fields.
* tests/run-keylist.c (main): Print the fields.
--

The trust signature values are part of gpg's output since the year 2003.
This now adds support to gpgme.

GnuPG-bug-id: 5245, 5419
</content>
</entry>
<entry>
<title>core: Extend gpgme_user_id_t with uidhash member.</title>
<updated>2019-12-13T14:11:00Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2019-12-13T14:10:51Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=5eeae535ee0df981d8ae8b758b5bb0d190c7fd89'/>
<id>urn:sha1:5eeae535ee0df981d8ae8b758b5bb0d190c7fd89</id>
<content type='text'>
* 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 &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>Add SPDX identifiers to most source files</title>
<updated>2018-11-16T12:27:33Z</updated>
<author>
<name>Werner Koch</name>
<email>wk@gnupg.org</email>
</author>
<published>2018-11-16T12:27:33Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=8d91c0f4cdcc26679067ae681ae12600fb450200'/>
<id>urn:sha1:8d91c0f4cdcc26679067ae681ae12600fb450200</id>
<content type='text'>
--

Signed-off-by: Werner Koch &lt;wk@gnupg.org&gt;
</content>
</entry>
<entry>
<title>Fix a couple of bugs pointed out by clang compiler warnings.</title>
<updated>2017-08-23T13:38:11Z</updated>
<author>
<name>Marcus Brinkmann</name>
<email>marcus.brinkmann@ruhr-uni-bochum.de</email>
</author>
<published>2017-08-23T13:38:11Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=bfb3a01a0c55aa327dcab061fa808672362cb09d'/>
<id>urn:sha1:bfb3a01a0c55aa327dcab061fa808672362cb09d</id>
<content type='text'>
* src/engine-gpgconf.c (gpgconf_config_dir_cb): Fix cast.
* src/key.c (_gpgme_key_add_sig): Fix pointer reference.

Signed-off-by: Marcus Brinkmann &lt;mb@g10code.com&gt;
</content>
</entry>
<entry>
<title>core: Cleanup gpgme_key_unref frees</title>
<updated>2017-02-01T17:06:54Z</updated>
<author>
<name>Andre Heinecke</name>
<email>aheinecke@intevation.de</email>
</author>
<published>2017-02-01T17:06:54Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=8ede86795a1d419c01b4910ec2fd1fb18b629452'/>
<id>urn:sha1:8ede86795a1d419c01b4910ec2fd1fb18b629452</id>
<content type='text'>
* src/key.c (gpgme_key_unref): Nowadays we assume free(NULL) is ok.
</content>
</entry>
<entry>
<title>core: Fix leakage of address for mail only uids</title>
<updated>2017-02-01T17:06:22Z</updated>
<author>
<name>Andre Heinecke</name>
<email>aheinecke@intevation.de</email>
</author>
<published>2017-02-01T17:03:35Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=b5075030bec9b21bf4e515bc1686df3fa43eced2'/>
<id>urn:sha1:b5075030bec9b21bf4e515bc1686df3fa43eced2</id>
<content type='text'>
* src/key.c (gpgme_key_unref): Always free address if set.
(_gpgme_key_append_name): Remove memory optimization for address.

--
The check if address is not allocated would now be more complicated
then just comparing it to email because email is set to address
also when an email was not parsed from the user id.
</content>
</entry>
<entry>
<title>core: Improve mailbox only uid handling</title>
<updated>2017-02-01T15:17:07Z</updated>
<author>
<name>Andre Heinecke</name>
<email>aheinecke@intevation.de</email>
</author>
<published>2017-02-01T15:16:22Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/gpgme/commit/?id=a28d31fdb623f2ee30e8094d09f1a0d1ae446a9b'/>
<id>urn:sha1:a28d31fdb623f2ee30e8094d09f1a0d1ae446a9b</id>
<content type='text'>
* src/key.c (_gpgme_key_append_name): Set email and remove name
for uid only keys.

--
If we have a name and no email but the name can be parsed as
an address we now treat the address as email and remove the name.

This fixes downstream users that rely on email to show email
addresses and don't expilicity handle this case.

E.g. A userid foo@example.com was:
uid-&gt;name = "foo@example.com"
uid-&gt;email = ""
uid-&gt;address = "foo@example.com"

It is now:
uid-&gt;name = ""
uid-&gt;email = "foo@example.com"
uid-&gt;address = "foo@example.com"
</content>
</entry>
</feed>
