]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Extend libsecureboot(old libve) to obtain trusted certificates from UEFI and implemen...
authormw <mw@FreeBSD.org>
Wed, 6 Mar 2019 06:39:42 +0000 (06:39 +0000)
committermw <mw@FreeBSD.org>
Wed, 6 Mar 2019 06:39:42 +0000 (06:39 +0000)
commit330f749452432f4e102815236f1495ee811ea529
tree08c5058c1b3a1cde3be3dd1e7d12a25058e72d5f
parent8347d20afe0a177b2b8ddadbf432a98fff1f556c
Extend libsecureboot(old libve) to obtain trusted certificates from UEFI and implement revocation

UEFI related headers were copied from edk2.

A new build option "MK_LOADER_EFI_SECUREBOOT" was added to allow
loading of trusted anchors from UEFI.

Certificate revocation support is also introduced.
The forbidden certificates are loaded from dbx variable.
Verification fails in two cases:

There is a direct match between cert in dbx and the one in the chain.
The CA used to sign the chain is found in dbx.
One can also insert a hash of TBS section of a certificate into dbx.
In this case verifications fails only if a direct match with a
certificate in chain is found.

Submitted by: Kornel Duleba <mindal@semihalf.com>
Reviewed by: sjg
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D19093
16 files changed:
lib/libsecureboot/Makefile.inc
lib/libsecureboot/Makefile.libsa.inc
lib/libsecureboot/efi/efi_init.c [new file with mode: 0644]
lib/libsecureboot/efi/efi_variables.c [new file with mode: 0644]
lib/libsecureboot/efi/include/Guid/GlobalVariable.h [new file with mode: 0644]
lib/libsecureboot/efi/include/Guid/ImageAuthentication.h [new file with mode: 0644]
lib/libsecureboot/efi/include/Protocol/Hash.h [new file with mode: 0644]
lib/libsecureboot/h/verify_file.h
lib/libsecureboot/libsecureboot-priv.h
lib/libsecureboot/local.trust.mk
lib/libsecureboot/verify_file.c
lib/libsecureboot/vets.c
share/mk/src.opts.mk
stand/efi/loader/Makefile
stand/efi/loader/main.c
tools/build/options/WITH_LOADER_EFI_SECUREBOOT [new file with mode: 0644]