summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-03-12lib/variables.c: reformat CreateTimeBasedPayload()Peter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-12Clean up efiauthenticated.h a lot.Peter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-12Make sure all of our include files have proper guards.Peter Jones
... and make them all the same formatting too. Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-12Move includes around to clean the source tree up a bit.Peter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-12Rename generate_path() because we have 2 of it.Peter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-12Fix the declaration of find_httpboot() to match its implementation.Peter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-12Add "make scan-build" target.Peter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-12Add a model file for coverity.Peter Jones
This is useful to hide some false positives from the covscan results. We never build it. Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-12Add 'make coverity' target.Peter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-12Split makefiles up a bitPeter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-12Document REQUIRE_TPMPeter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-08Fix failure to boot on systems without a TPMHans de Goede
This commit fixes 2 issues with the TPM support code: 1) Remove "REQUIRE_TPM ?=" line from the Makefile, further down the Makefile checks if REQUIRE_TPM is undefined, but the above line sets it to an empty string, which is not the same as undefined. Without this handle_image fails after the tpm_log_pe() call even if REQUIRE_TPM=1 once was not set when building the shim 2) When secure-boot is disabled then shim_verify() would exit with the status of tpm_log_pe(), which on systems with a TPM is an error. Combined with the recent change to always install the shim protocols, this causes grub to refuse to boot any kernel since the verify() call now always fails. This commit fixes this by explicitly setting status = EFI_SUCCESS when secure-boot is disabled. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2018-03-06shim: Ignore UEFI LoadOptions that are just NUL characters.Peter Jones
I don't know when or why we ever see this, but it's easy enough to avoid. Resolves github issue #95 Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-06Install shim_lock protocol even when SecureBoot is offTamas K Lengyel
Currently the shim_lock protocol is only installed when SecureBoot is enabled. However, having Verify just measure into the TPM without SecureBoot is a useful feature. Signed-off-by: Tamas K Lengyel <lengyelt@ainfosec.com>
2018-03-06Fall-back TPM2 measurement if it fails with PE_COFF_IMAGE flagTamas K Lengyel
Signed-off-by: Tamas K Lengyel <lengyelt@ainfosec.com>
2018-03-06Add REQUIRE_TPM flag to treat TPM related errors as criticalTamas K Lengyel
Currently TPM related errors are being silently discarded. Signed-off-by: Tamas K Lengyel <lengyelt@ainfosec.com>
2018-03-06Measure into the TPM even if SecureBoot is off in shim_lock verifyTamas K Lengyel
Signed-off-by: Tamas K Lengyel <lengyelt@ainfosec.com>
2018-03-06Log measurements in PCR4 for applications being verified through shim_lockTamas K Lengyel
Currently the only measurement the shim logs in the TPM is that of the EFI application it directly loads. However, there are no measurements being taken of application that are being verified through the shim_lock protocol. In this patch we extend PCR4 for any binary for which Verify is being called through the shim_lock protocol. Signed-off-by: Tamas K Lengyel <lengyelt@ainfosec.com>
2018-03-06Add -m64 compiler flag to allow cross-compiling to 64-bit version on 32-bit ↵Tamas K Lengyel
system Signed-off-by: Tamas K Lengyel <lengyelt@ainfosec.com>
2018-02-28ident: We don't actually need the hostname or kernel version, and it makes ↵Peter Jones
the builds differ. Signed-off-by: Peter Jones <pjones@redhat.com>
2018-02-28Add proxy dhcp supportcdadmin
2018-02-28Cryptlib: replace CryptPem with CryptPemNullGary Lin
We don't need the functions in CryptPem.c. Signed-off-by: Gary Lin <glin@suse.com>
2018-02-28httpboot: include console.hGary Lin
in_protocol is declared in console.h, so httpboot.c has to include the header. Signed-off-by: Gary Lin <glin@suse.com>
2018-02-28httpboot: fix the infinite loopGary Lin
We should get out of the loop once the uri node is not the last node in the device path. Signed-off-by: Gary Lin <glin@suse.com>
2018-02-28httpboot: Amend the device path matching ruleGary Lin
Originally, we check if the last 2 nodes in the device path are IPv4()/Uri() or IPv6()/Uri() to determine whether httpboot is used or not. However, since UEFI 2.7, the DNS node will be inserted between the IP node and the URI node if the server provides the DNS server address. This commit changes the matching rule to search IP node and URI node and ignore any node between those two nodes. Signed-off-by: Gary Lin <glin@suse.com>
2018-02-01Uninstall shim protocols before re-installing themMathieu Trudel-Lapierre
Make sure if we chainload things, a chainloaded bootloader will be able to use the latest systab replacements and protocols. They need to match for things to validate correctly. Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2017-12-19Bump the version to 1414Peter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2017-12-19Don't allow undefined symbols at all.Peter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2017-12-19"in_protocol" is used in more than shim.o; make it not static.Peter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2017-12-19Don't let openssl() try to call an external abort()Peter Jones
Signed-off-by: Peter Jones <pjones@redhat.com>
2017-11-07releasing package shim version 13-0ubuntu2debian/13-0ubuntu2Mathieu Trudel-Lapierre
2017-11-07Clean up old patches.Mathieu Trudel-Lapierre
2017-11-06debian/patches/abort_abort_abort.patch: signtool.exe isn't happy with some ↵Mathieu Trudel-Lapierre
of the structure of our binary, partly because abort() is thought to be an external symbol, which causes some relocalisations to appear.
2017-09-29releasing package shim version 13-0ubuntu1debian/13-0ubuntu1Mathieu Trudel-Lapierre
2017-09-29Don't need to clean after .signed files, upstream Makefile does it now.Mathieu Trudel-Lapierre
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2017-09-29Drop buildid_write_return.patch; no longer needed.Mathieu Trudel-Lapierre
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2017-09-29Don't need to set -Wno-error=unused-variable anymoreMathieu Trudel-Lapierre
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2017-09-29New upstream release: 13Mathieu Trudel-Lapierre
2017-09-29New upstream version 13upstream/13Mathieu Trudel-Lapierre
2017-09-29Updated version 13 from 'upstream/13'Mathieu Trudel-Lapierre
with Debian dir e38346a2eec5376ccf228af4ba0e2d170f07448f
2017-09-29Updated version 13~z1 from 'upstream/13_z1'Mathieu Trudel-Lapierre
with Debian dir e38346a2eec5376ccf228af4ba0e2d170f07448f
2017-09-29New upstream version 13~z1upstream/13_z1Mathieu Trudel-Lapierre
2017-09-29Bump the version to 1313Peter Jones
shim 13: - OpenSSL reverted to 1.0.2k to make the cert chaining of existing deployments stay working - Better PCR usage for TPM - TPM documentation in README.tpm - More configurable build via make variables: ENABLE_SHIM_CERT ENABLE_SHIM_HASH ENABLE_SBSIGN LIBDIR EFIDIR VENDOR_CERT_FILE VENDOR_DB_FILE - Better MoK documentation in MokVars.txt - Better debuginfo generation - Lots of minor bug fixes. Signed-off-by: Peter Jones <pjones@redhat.com>
2017-09-29buildid: Check the return values of write() callsMathieu Trudel-Lapierre
Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
2017-09-29Make shim_cert.h able to be included more safely.Peter Jones
If you build with ENABLE_SHIM_CERT=1, the include chain right now winds up meaning shim_cert is defined in a header that gets included in netboot.c as well, which never uses it: In file included from shim.h:125:0, from netboot.c:36: shim_cert.h:1:14: error: ‘shim_cert’ defined but not used [-Werror=unused-variable] static UINT8 shim_cert[] = { ^~~~~~~~~ cc1: all warnings being treated as errors So make that okay by adding __attribute__((__unused__)) to the variable decl. Signed-off-by: Peter Jones <pjones@redhat.com>
2017-09-29buildid: make 'make clean' remove it.Peter Jones
2017-09-27New upstream snapshot: 13~git1506531982.23ce039Mathieu Trudel-Lapierre
2017-09-27Updated version 13~git1506531982.23ce039 from ↵Mathieu Trudel-Lapierre
'upstream/13_git1506531982.23ce039' with Debian dir bc85d2ed9d59b8c9e8d4bf33603c75c11feec4f8
2017-09-27New upstream version 13~git1506531982.23ce039upstream/13_git1506531982.23ce039Mathieu Trudel-Lapierre
2017-09-27We don't really need libnss3-tools.Mathieu Trudel-Lapierre