[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#946686: apt should accept ASCII-armored OpenPGP certificates for signed-by: entries, even if the file name has a .gpg suffix



On Fri, Dec 13, 2019 at 01:42:48PM -0500, Daniel Kahn Gillmor wrote:
> If apt fails in this way, it might be nice to just peek at the first
> handful of bytes of /srv/foo.gpg to see whether it begins with:

Something like that needs to be implemented in shell, specifically in
is_supported_keyring in cmdline/apt-key.in – which incidently does a bit
of peeking already for gpg files to detect binary keyring formats, so
what could be done is removing the gpg/asc filename detection here and
just handle all files the same (+ detecting asc properly here).
See also dearmor_keyring and dearmor_filename which deal with massaging
files enough to make them usable for further processing by apt-key and
do asc detection for things like import via stdin.
It might make sense to use the same code for all these cases.


The usual caveat applies: What is working in a new enough apt version has
a strange error case in all older ones, which is especially sad for
simple data packages like keyring packages admins and users alike
relatively reasonably assume to be able to backport into oblivion.

Personally I don't see much problem in naming a file correctly given
that it isn't a very common or much repeated task and the extension is
only a very tiny part of it all, but oh well.


Best regards

David Kalnischkies

Attachment: signature.asc
Description: PGP signature


Reply to: