diff options
author | Laszlo Ersek <lersek@redhat.com> | 2019-04-25 23:15:14 +0200 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2019-04-30 14:26:46 +0200 |
commit | be9470b3c91fc50436c15a76c85cdde940355b9f (patch) | |
tree | 4c8870ebcffb66a6f88797793256498137542cbd /BaseTools/Source/Python/Common/VariableAttributes.py | |
parent | 392404167fb1c4cc537b37079505dd9192968367 (diff) | |
download | edk2-be9470b3c91fc50436c15a76c85cdde940355b9f.tar.gz edk2-be9470b3c91fc50436c15a76c85cdde940355b9f.tar.bz2 edk2-be9470b3c91fc50436c15a76c85cdde940355b9f.zip |
OvmfPkg/EnrollDefaultKeys: enroll PK/KEK1 from the Type 11 SMBIOS table
Disconnect the certificate that is enrolled as both Platform Key and first
Key Exchange Key from Red Hat: expect the hypervisor to specify it, as
part of SMBIOS.
Example usage with QEMU:
* Generate self-signed X509 certificate:
openssl req \
-x509 \
-newkey rsa:2048 \
-outform PEM \
-keyout PkKek1.private.key \
-out PkKek1.pem
(where "PEM" simply means "DER + base64 + header + footer").
* Strip the header, footer, and newline characters; prepend the
application prefix:
sed \
-e 's/^-----BEGIN CERTIFICATE-----$/4e32566d-8e9e-4f52-81d3-5bb9715f9727:/' \
-e '/^-----END CERTIFICATE-----$/d' \
PkKek1.pem \
| tr -d '\n' \
> PkKek1.oemstr
* Pass the certificate to EnrollDefaultKeys with the following QEMU
option:
-smbios type=11,value="$(< PkKek1.oemstr)"
(Note: for the above option to work correctly, a QEMU version is needed
that includes commit 950c4e6c94b1 ("opts: don't silently truncate long
option values", 2018-05-09). The first upstream release with that commit
was v3.0.0.
Once <https://bugs.launchpad.net/qemu/+bug/1826200> is fixed, QEMU will
learn to read the file directly; passing the blob on the command will be
necessary no more.)
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Julien Grall <julien.grall@arm.com>
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1747
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Gary Lin <glin@suse.com>
Diffstat (limited to 'BaseTools/Source/Python/Common/VariableAttributes.py')
0 files changed, 0 insertions, 0 deletions