Bug 93656 - OpenPGP armored public key *.key is identified as Apple Keynote
Summary: OpenPGP armored public key *.key is identified as Apple Keynote
Status: NEW
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Shared Mime Info group
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-10 17:15 UTC by intrigeri
Modified: 2018-05-09 09:43 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
suggested patch (4.64 KB, patch)
2018-04-01 02:58 UTC, Dwayne Litzenberger
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description intrigeri 2016-01-10 17:15:37 UTC
Presumably since https://bugs.freedesktop.org/show_bug.cgi?id=71827 was resolved in 1.3, any OpenPGP armored public key (e.g. exported with "gpg --armor --export $KEY_ID" is recognized as application/x-iwork-keynote-sffkey.

The ideal behavior IMO would be that the "BEGIN PGP PUBLIC KEY BLOCK" magic has precedence over the .key file extension.
Comment 1 Dwayne Litzenberger 2018-04-01 02:58:39 UTC
Created attachment 138470 [details] [review]
suggested patch

Feel free to modify and apply as needed; I'm probably not going to follow up beyond this.

(In case you have trouble applying the full patch; note that tests/test-garbage.key is just a file populated with junk from /dev/urandom)
Comment 2 Dwayne Litzenberger 2018-04-01 02:59:35 UTC
(I'm not a maintainer of shared-mime-info.)
Comment 3 intrigeri 2018-05-07 12:14:00 UTC
Thanks Dwayne for proposing a patch! What's the next step here? Would it help if I tested whether Dwayne's patch fixes the problem I've reported?
Comment 4 Bastien Nocera 2018-05-09 09:43:55 UTC
Comment on attachment 138470 [details] [review]
suggested patch

Review of attachment 138470 [details] [review]:
-----------------------------------------------------------------

::: tests/list
@@ +643,4 @@
>  test-public-key.asc application/pgp-keys xoo
>  test-secret-key.skr application/pgp-keys ooo
>  test-secret-key.asc application/pgp-keys xoo
> +# files named *.key shouldn't be detected as Apple Keynote

They should, you set up the glob to that effect. Maybe the comment doesn't match what you want here.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.