File: MockSecurityManagementLib.h

package info (click to toggle)
edk2 2025.11-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 338,556 kB
  • sloc: ansic: 2,166,376; asm: 270,725; perl: 235,301; python: 149,839; sh: 34,744; cpp: 23,311; makefile: 3,326; pascal: 1,602; xml: 806; lisp: 35; ruby: 16; sed: 6; tcl: 4
file content (54 lines) | stat: -rw-r--r-- 1,662 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/** @file
  Google Test mocks for DevicePathLib

  Copyright (c) 2025, Yandex. All rights reserved.
  SPDX-License-Identifier: BSD-2-Clause-Patent
**/

#ifndef MOCK_SECURITY_MANAGEMENT_LIB_H_
#define MOCK_SECURITY_MANAGEMENT_LIB_H_

#include <Library/GoogleTestLib.h>
#include <Library/FunctionMockLib.h>
extern "C" {
  #include <Uefi.h>
  #include <Library/SecurityManagementLib.h>
}

struct MockSecurityManagementLib {
  MOCK_INTERFACE_DECLARATION (MockSecurityManagementLib);

  MOCK_FUNCTION_DECLARATION (
    EFI_STATUS,
    RegisterSecurityHandler,
    (IN  SECURITY_FILE_AUTHENTICATION_STATE_HANDLER  SecurityHandler,
     IN  UINT32                                      AuthenticationOperation)
    );

  MOCK_FUNCTION_DECLARATION (
    EFI_STATUS,
    ExecuteSecurityHandlers,
    (IN  UINT32                          AuthenticationStatus,
     IN  CONST EFI_DEVICE_PATH_PROTOCOL  *FilePath)
    );

  MOCK_FUNCTION_DECLARATION (
    EFI_STATUS,
    RegisterSecurity2Handler,
    (IN  SECURITY2_FILE_AUTHENTICATION_HANDLER   Security2Handler,
     IN  UINT32                                  AuthenticationOperation)
    );

  MOCK_FUNCTION_DECLARATION (
    EFI_STATUS,
    ExecuteSecurity2Handlers,
    (IN  UINT32                          AuthenticationOperation,
     IN  UINT32                          AuthenticationStatus,
     IN  CONST EFI_DEVICE_PATH_PROTOCOL  *File  OPTIONAL,
     IN  VOID                            *FileBuffer,
     IN  UINTN                           FileSize,
     IN  BOOLEAN                         BootPolicy)
    );
};

#endif // MOCK_SECURITY_MANAGEMENT_LIB_H_