mirror of
				https://git.proxmox.com/git/efi-boot-shim
				synced 2025-11-04 14:59:04 +00:00 
			
		
		
		
	Right now the CA is checking if shim builds expose a particular version of the shim protocol. To do this, they're looking for SHIM_LOCK_GUID's value in the resulting binary. Currently, with SHIM_LOCK_GUID as a macro that gets assigned to local variables, that means they have to compensate for mov instructions mixed in with the actual value. This is completely absurd, so promote it to a first-class object with a symbol to make it both easy to find and continuous. Signed-off-by: Peter Jones <pjones@redhat.com>
		
			
				
	
	
		
			37 lines
		
	
	
		
			589 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			589 B
		
	
	
	
		
			C
		
	
	
	
	
	
#include "PeImage.h"
 | 
						|
 | 
						|
extern EFI_GUID SHIM_LOCK_GUID;
 | 
						|
 | 
						|
INTERFACE_DECL(_SHIM_LOCK);
 | 
						|
 | 
						|
typedef
 | 
						|
EFI_STATUS
 | 
						|
(*EFI_SHIM_LOCK_VERIFY) (
 | 
						|
	IN VOID *buffer,
 | 
						|
	IN UINT32 size
 | 
						|
	);
 | 
						|
 | 
						|
typedef
 | 
						|
EFI_STATUS
 | 
						|
(*EFI_SHIM_LOCK_HASH) (
 | 
						|
	IN char *data,
 | 
						|
	IN int datasize,
 | 
						|
	PE_COFF_LOADER_IMAGE_CONTEXT *context,
 | 
						|
	UINT8 *sha256hash,
 | 
						|
	UINT8 *sha1hash
 | 
						|
	);
 | 
						|
 | 
						|
typedef
 | 
						|
EFI_STATUS
 | 
						|
(*EFI_SHIM_LOCK_CONTEXT) (
 | 
						|
	IN VOID *data,
 | 
						|
	IN unsigned int datasize,
 | 
						|
	PE_COFF_LOADER_IMAGE_CONTEXT *context
 | 
						|
	);
 | 
						|
 | 
						|
typedef struct _SHIM_LOCK {
 | 
						|
	EFI_SHIM_LOCK_VERIFY Verify;
 | 
						|
	EFI_SHIM_LOCK_HASH Hash;
 | 
						|
	EFI_SHIM_LOCK_CONTEXT Context;
 | 
						|
} SHIM_LOCK;
 |