]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r344840: Extend libsecureboot(old libve) to obtain trusted certificates from...
authorMarcin Wojtas <mw@FreeBSD.org>
Fri, 26 Apr 2019 00:48:52 +0000 (00:48 +0000)
committerMarcin Wojtas <mw@FreeBSD.org>
Fri, 26 Apr 2019 00:48:52 +0000 (00:48 +0000)
commit63fd89c7cdb04dada3f82eb75201782b8712c8b6
tree8b53b13f1b0ae9cf4b0b30bc9648de0858076d2c
parent60386cceffc1eccc28b9eb7a2949aef0f580bb96
MFC r344840: 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>
Obtained from: Semihalf
Sponsored by: Stormshield
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]