Commit Graph

21 Commits

Author SHA1 Message Date
Mario Limonciello
51308e648a Adjust all licensing to LGPL 2.1+ (Closes: #526) 2018-05-29 09:03:13 +01:00
Richard Hughes
7ef96b8a4e trivial: Fix up a few NULL/FALSE mismatches 2017-08-23 18:28:24 +01:00
Richard Hughes
14047d7d24 trivial: Split up the keyring setup and public key adding 2017-08-18 11:10:03 +01:00
Richard Hughes
f69a4810fa Return the authority and timestamp as part of the signing validation
This means we return an error when encountering a rollback attack. This can
currently be performed by providing the old metadata and old signature when
calling into UpdateMetadata.
2017-08-17 16:15:47 +01:00
Richard Hughes
7403dc505f Optionally use GnuTLS to verify PKCS7 certificates
We can use this as an alternative for GPG. No PKCS7 certificates are currently
installed by fwupd and it's expected that the LVFS will still only provide GPG
detached signatures.

If an OEM distributor wants to sign firmware with a PKCS7 and the corresponding
certificate is provided then the firmware will be marked as valid.

Only firmware shipping with a .p7b file will use the PKCS7 functionality,
similarly remote metadata validation will default to GPG unless Keyring=pkcs7
is specified in the config file.
2017-08-14 09:42:48 +01:00
Richard Hughes
33a518a615 Add another compile warning and fix up any build failures 2016-07-27 16:57:36 +01:00
Richard Hughes
ce38d94d5e trivial: Get rid of useless internal-only gtk-doc markup 2016-06-29 11:25:25 +01:00
Richard Hughes
4eb527f873 Use a private gnupg key store
Although it's convenient that you can just log in as root and add another
trusted key, it makes the selinux developers unhappy. Use a private keystore
in /var/lib/fwupd/gnupg to avoid the possibility of a somehow hacked fwupd
being able to export the root gpg secrets if any happened to exist.

If you've trusted keys other than the LVFS for metadata or firmware you'll need
to re-import them into this new location.

See b7f12bd377

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1303531
2016-06-28 09:18:45 +01:00
Mario Limonciello
bfedfea62e Remove non-interactive pinentry setting from fu-keyring
691e02d652 [fu_keyring_setup] added a signing
server and configured to not have interactive pin entry
[gpgme_set_pinentry_mode]

This signing server was reverted in 5c35abb1a5
but the non-interactive pin entry setting for gpgme remained.

This functionality was only added in gnupg 2.1. If not running on gnupg 2.1
gpgme will give silent errors when importing keys.  The silent errors were
fixed in 0.7.0 in c5e8921dfd.  Unfortunately
that makes an implicit dependency on gnupg 2.1 to use fwupd.

This commit will allow older gnupg versions (< 2.1) to continue to work without
negative implications for fwupd.
2016-04-05 08:53:01 -05:00
Richard Hughes
77df553db7 trivial: Be more explicit about testing for import success 2016-03-31 09:08:28 +01:00
Richard Hughes
fe490ebb80 Use g_auto() in FuKeyring
This simplifies function cleanup.
2016-03-31 09:00:16 +01:00
Mario Limonciello
c5e8921dfd Test that GPG key import actually was successful (or didn't change a key already in the keyring) 2016-03-30 23:59:48 -05:00
Richard Hughes
e4141f4f23 trivial: Print the fingerprint of the sig used for verification 2016-03-29 11:26:51 +01:00
Richard Hughes
5d14deff4a Support cabinet archives files with more than one firmware
This allows a vendor to upload a single file that targets different versions of
the same hardware. If this feature is used, the metainfo.xml files *must* have
something like <checksum target="content" filename="firmware2.rom"/> inside the
latest <release> tag.
2015-10-07 17:45:11 +01:00
Richard Hughes
46832432ea Raise the dep on GLib to support and use g_autoptr() 2015-09-11 13:43:15 +01:00
Richard Hughes
441785d215 trivial: Fix up some harmless lint, no code changes 2015-07-28 14:56:19 +01:00
Richard Hughes
04ee5856d0 Sign the test binary with the correct key
Use the LVFS key rather than my own GPG key, and load that in the self tests.

Fixes https://github.com/hughsie/fwupd/issues/14
2015-07-28 09:47:03 +01:00
Richard Hughes
691e02d652 Add a simple signing server that operates on .cab files 2015-07-20 15:31:10 +01:00
Richard Hughes
eec19e760d Add the ability to create detached signatures 2015-07-20 15:30:48 +01:00
Richard Hughes
ae0efdc5a7 Provide a way for clients to add new firmware metadata to the system cache
This is only possible if the metadata has been signed by a key that we trust.
2015-06-25 09:59:53 +01:00
Richard Hughes
36a889034c Add helper code to validate public key signatures
We'll use this in the future for checking device firmware.
2015-04-14 13:53:19 +01:00