]> git.proxmox.com Git - mirror_edk2.git/blob - SecurityPkg/Library/SecureBootVariableLib/UnitTest/MockPlatformPKProtectionLib.c
SecurityPkg: SecureBootVariableLib: Added unit tests
[mirror_edk2.git] / SecurityPkg / Library / SecureBootVariableLib / UnitTest / MockPlatformPKProtectionLib.c
1 /** @file
2 Provides a mocked interface for configuring PK related variable protection.
3
4 Copyright (c) Microsoft Corporation.
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6 **/
7 #include <stdio.h>
8 #include <string.h>
9 #include <stdarg.h>
10 #include <stddef.h>
11 #include <setjmp.h>
12 #include <cmocka.h>
13
14 #include <Uefi.h>
15
16 /**
17 Disable any applicable protection against variable 'PK'. The implementation
18 of this interface is platform specific, depending on the protection techniques
19 used per platform.
20
21 Note: It is the platform's responsibility to conduct cautious operation after
22 disabling this protection.
23
24 @retval EFI_SUCCESS State has been successfully updated.
25 @retval Others Error returned from implementation specific
26 underying APIs.
27
28 **/
29 EFI_STATUS
30 EFIAPI
31 DisablePKProtection (
32 VOID
33 )
34 {
35 return (EFI_STATUS)mock ();
36 }