Bug 257783 - pgpkeys: Unbreak PGP keyring
Summary: pgpkeys: Unbreak PGP keyring
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Books & Articles (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Danilo G. Baio
URL: https://docs.freebsd.org/pgpkeys/pgpk...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-12 09:05 UTC by Markus Stoff
Modified: 2021-08-14 15:58 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Stoff 2021-08-12 09:05:18 UTC
$ gpg --allow-non-selfsigned-uid --no-default-keyring --keyring /tmp/tmp.s7YEIIZX --import /tmp/tmp.oVtOGme1
  ...
  gpg: invalid armor header: mQINBF+5ojQBEADSqQjD4h1lOwAGgmz4dK0Zf4JkoJCpQ7jw2B5jigNySdKf1rQN\n                                                                 
  gpg: CRC error; DDCBB0 - 42D3D7                                                                                                                               
  gpg: [don't know]: invalid packet (ctb=48)                                                                                                                     
  gpg: read_block: read error: invalid packet                                                                                                                   
  gpg: import from `/tmp/tmp.oVtOGme1' failed: invalid keyring                                                                                                   
  gpg: Total number processed: 263                                                                                                                               
  gpg:               imported: 263  (RSA: 166)                                                                                                                   
  gpg: no ultimately trusted keys found

 The problem is a missing empty line before mQINBF+5ojQBEADSqQjD4h1lOwAGgmz4dK0Zf4JkoJCpQ7jw2B5jigNySdKf1rQN (currently at line 49955).

Please fix this asap, we are relying on that file for automated release ISO signature validation.
Comment 1 Li-Wen Hsu freebsd_committer freebsd_triage 2021-08-12 09:34:07 UTC
Which gpg version are you using? I'm testing it with 2.3.1 and I can import this file file. And this is what `gpg --no-version --armor --export` outputs.
Comment 2 Markus Stoff 2021-08-12 09:43:59 UTC
(In reply to Li-Wen Hsu from comment #1)

I'm using gnupg1-1.4.23_2.
Comment 3 Markus Stoff 2021-08-12 10:00:06 UTC
gnupg1 is correct in throwing an error. There must be a blank line before the ASCII-Armored data:

https://datatracker.ietf.org/doc/html/rfc4880#section-6.2

   Concatenating the following data creates ASCII Armor:

     - An Armor Header Line, appropriate for the type of data

     - Armor Headers

==>  - A blank (zero-length, or containing only whitespace) line

     - The ASCII-Armored data

     - An Armor Checksum

     - The Armor Tail, which depends on the Armor Header Line
Comment 4 commit-hook freebsd_committer freebsd_triage 2021-08-14 15:55:50 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/doc/commit/?id=08abb348951bdb2c35170b75e078c14a36cc0e82

commit 08abb348951bdb2c35170b75e078c14a36cc0e82
Author:     Danilo G. Baio <dbaio@FreeBSD.org>
AuthorDate: 2021-08-14 15:10:34 +0000
Commit:     Danilo G. Baio <dbaio@FreeBSD.org>
CommitDate: 2021-08-14 15:52:11 +0000

    pgpkeys: Unbreak PGP keyring

    gpg: invalid armor header:
    mQINBF+5ojQBEADSqQjD4h1lOwAGgmz4dK0Zf4JkoJCpQ7jw2B5jigNySdKf1rQN\n
       ^^  Using GnuPG 1

    A blank line before the key body is needed.

    PR:             257830 [1]
    PR:             257783 [2]
    Reported by:    Dave Evans <dave.evans55@googlemail.com> [1]
    Reported by:    Markus Stoff <markus@stoffdv.at> [2]

 documentation/static/pgpkeys/joerg.key | 1 +
 1 file changed, 1 insertion(+)
Comment 5 Danilo G. Baio freebsd_committer freebsd_triage 2021-08-14 15:58:17 UTC
Committed, thanks!