In the soon-to-be-released fwupd 1.2.6 there’s a new feature that I wanted to talk about here, if nothing else to be the documentation when people find these files and wonder what they are. The fwupd daemon now creates a PKCS-7 client self-signed certificate at startup (if GnuTLS is enabled and new enough) – which creates the root-readable /var/lib/fwupd/pki/secret.key
and world-readable /var/lib/fwupd/pki/client.pem
files.
These certificates are used to sign text data sent to a remote server. At the moment, this is only useful for vendors who also have accounts on the LVFS, so that when someone in their QA team tests the firmware update on real hardware, they can upload the firmware report with the extra --sign
argument to sign the JSON blob with the certificate. This allows the LVFS to be sure the report upload comes from the vendor themselves, and will in future allow the trusted so-called attestation DeviceChecksums
a.k.a. the PCR0
to be set automatically from this report. Of course, the LVFS user needs to upload the certificate to the LVFS to make this work, although I’ve written this functionality and am just waiting for someone to review it.
It’ll take some time for the new fwupd to get included in all the major distributions, but when practical I’ll add instructions for companies using the LVFS to use this feature. I’m hoping that by making it easier to securely set the PCR0
more devices will have the attestation metadata needed to verify if the machine is indeed running the correct firmware and secure.
Of course, fwupd doesn’t care if the certificate is self-signed or is issued from a corporate certificate signing request. The files in /var/lib/fwupd/pki/
can be set to whatever policy is in place. We can also use this self-signed certificate for any future agent check-in which we might need for the enterprise use cases. It allows us send data from the client to a remote server and prove who the client is. Comments welcome.
Would it be possible to support PKCS#11 for smart card signing as well?
Smart cards tend to be used for the most secure things, of which firmware upload is certainly one. :)
Thanks!
We kinda standardized on pkcs-7 for firmware.
Okay, a colleague forced me to re-read your comment… I’m getting my PKCS 12 and PKCS 11 specs confused, apologies. So trying again: Yes, I guess so, GnuTLS can integrate with PKCS#11, although nobody has tried it.