Page MenuHome GnuPG

gpg-wks-client excludes uid with URL in comment
Closed, ResolvedPublic

Description

When generating WKD entries using gpg-wks-client --install-key, any uid with a URL in the comment results in a key file without the uid.

For example, given the following key with two uids:

pub   rsa3072 2022-06-21 [SC] [expires: 2022-06-22]
      7E1D0490C2604F4E162C47B63072E16A50CD434E
uid           [ultimate] Jane Doe (https://www.example.org/~jane.doe) <noreply@example.org>
uid           [ultimate] Jane Doe <jane.doe@example.org>
sub   rsa3072 2022-06-21 [E] [expires: 2022-06-22]

By following these instructions (retrieved 20 June 2022), WKD files can be created:

root@9ae492ba558c:/# gpg --list-options show-only-fpr-mbox -k "@example.org" | /usr/lib/gnupg/gpg-wks-client -v --install-key
gpg-wks-client: gpg: Total number processed: 1
gpg-wks-client: using key with user id 'Jane Doe (https\x3a//www.example.org/~jane.doe) <noreply@example.org>'
gpg-wks-client: gpg: Total number processed: 1
gpg-wks-client: directory 'openpgpkey/example.org' created
gpg-wks-client: directory 'openpgpkey/example.org/hu' created
gpg-wks-client: policy file 'openpgpkey/example.org/policy' created
gpg-wks-client: key 7E1D0490C2604F4E162C47B63072E16A50CD434E published for 'noreply@example.org'
gpg-wks-client: gpg: Total number processed: 1
gpg-wks-client: using key with user id 'Jane Doe <jane.doe@example.org>'
gpg-wks-client: gpg: Total number processed: 1
gpg-wks-client: key 7E1D0490C2604F4E162C47B63072E16A50CD434E published for 'jane.doe@example.org'

This creates two key files, however only the key without a URL in the comment field includes the uid:

root@9ae492ba558c:/# gpg openpgpkey/example.org/hu/nwnwrk3rczw4ou5x56ibcrdatrgf1xag 
gpg: WARNING: no command supplied.  Trying to guess what you mean ...
pub   rsa3072 2022-06-21 [SCEA]
      7E1D0490C2604F4E162C47B63072E16A50CD434E
sub   rsa3072 2022-06-21 [E] [expires: 2022-06-22]
root@9ae492ba558c:/# gpg openpgpkey/example.org/hu/q7dko9gdx91rjc54abuokxwu7bh9t67a 
gpg: WARNING: no command supplied.  Trying to guess what you mean ...
pub   rsa3072 2022-06-21 [SC] [expires: 2022-06-22]
      7E1D0490C2604F4E162C47B63072E16A50CD434E
uid           Jane Doe <jane.doe@example.org>
sub   rsa3072 2022-06-21 [E] [expires: 2022-06-22]

System and software information:

root@9ae492ba558c:/# uname -a
Linux 9ae492ba558c 5.10.104-linuxkit #1 SMP Thu Mar 17 17:08:06 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
root@9ae492ba558c:/# /usr/lib/gnupg/gpg-wks-client --version
gpg-wks-client (GnuPG) 2.2.27
Copyright (C) 2021 Free Software Foundation, Inc.
License GNU LGPL-2.1-or-later <https://gnu.org/licenses/>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
root@9ae492ba558c:/# gpg --version
gpg (GnuPG) 2.2.27
libgcrypt 1.9.4
Copyright (C) 2021 Free Software Foundation, Inc.
License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: /root/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
        CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2

Details

Version
2.2.27

Event Timeline

This problem does not seem to exist in GnuPG 2.3.6.

werner claimed this task.
werner added a subscriber: werner.

Probably fixed meanwhile in 2.2.
Please re-open if experience this problem also with a decent gnupg 2.2 versions.