mirror of
https://github.com/pbatard/rufus.git
synced 2026-07-09 06:55:39 +00:00
* With Microsoft having finally relinquished the terms of use of DBX binaries (where their previous legalese pretty much made it illegal for anyone who wasn't an OS manufacturer to download DBX for use in applications) we can now formally embed, as well as download the DBXs when they are updated. * This is accomplished by querying the https://github.com/microsoft/secureboot_objects GitHub repo (which is now the official repository for the UEFI Forum's revocation files) through api.github.com and checking the timestamps of the last commit on the relevant files. If a more recent DBX is found than the one embedded (or a previously downloaded one), Rufus will now prompt the user to download it, as part of its regular update check (if enabled). * Note that, since there have been no official revocations for them yet, IA64, RISCV64 and LoongArch64 are currently placeholders. * Also note that we currently don't use this mechanism for Microsoft's SVN revocations, as we already have a more efficient check for it through SBAT. * Also fix the handling of the RISCV64 MD5Sum UEFI bootloader, whose offset was incorrect.
70 lines
1.8 KiB
C
70 lines
1.8 KiB
C
/*
|
|
* Rufus: The Reliable USB Formatting Utility
|
|
* UEFI constants and structs
|
|
* Copyright © 2025 Pete Batard <pete@akeo.ie>
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#include <basetsd.h>
|
|
#include <guiddef.h>
|
|
|
|
#pragma pack(1)
|
|
|
|
typedef struct {
|
|
UINT16 Year;
|
|
UINT8 Month;
|
|
UINT8 Day;
|
|
UINT8 Hour;
|
|
UINT8 Minute;
|
|
UINT8 Second;
|
|
UINT8 Pad1;
|
|
UINT32 Nanosecond;
|
|
INT16 TimeZone;
|
|
UINT8 Daylight;
|
|
UINT8 Pad2;
|
|
} EFI_TIME;
|
|
|
|
typedef struct _WIN_CERTIFICATE {
|
|
UINT32 dwLength;
|
|
UINT16 wRevision;
|
|
UINT16 wCertificateType;
|
|
} WIN_CERTIFICATE;
|
|
|
|
typedef struct _WIN_CERTIFICATE_UEFI_GUID {
|
|
WIN_CERTIFICATE Hdr;
|
|
GUID CertType;
|
|
UINT8 CertData[1];
|
|
} WIN_CERTIFICATE_UEFI_GUID;
|
|
|
|
typedef struct {
|
|
EFI_TIME TimeStamp;
|
|
WIN_CERTIFICATE_UEFI_GUID AuthInfo;
|
|
} EFI_VARIABLE_AUTHENTICATION_2;
|
|
|
|
typedef struct {
|
|
GUID SignatureOwner;
|
|
UINT8 SignatureData[1];
|
|
} EFI_SIGNATURE_DATA;
|
|
|
|
typedef struct {
|
|
GUID SignatureType;
|
|
UINT32 SignatureListSize;
|
|
UINT32 SignatureHeaderSize;
|
|
UINT32 SignatureSize;
|
|
} EFI_SIGNATURE_LIST;
|
|
|
|
#pragma pack()
|
|
|
|
const GUID EFI_CERT_SHA256_GUID = { 0xc1c41626, 0x504c, 0x4092, { 0xac, 0xa9, 0x41, 0xf9, 0x36, 0x93, 0x43, 0x28 } };
|