TianoCore EDK2 master
|
#include <Uefi.h>
#include <Library/BaseMemoryLib.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiLib.h>
#include <Protocol/EdkIIRedfishCredential.h>
#include <Guid/GlobalVariable.h>
#include <Guid/ImageAuthentication.h>
Go to the source code of this file.
Functions | |
EFI_STATUS EFIAPI | LibStopRedfishService (IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This, IN EDKII_REDFISH_CREDENTIAL_STOP_SERVICE_TYPE ServiceStopType) |
EFI_STATUS | GetRedfishCredential (OUT EDKII_REDFISH_AUTH_METHOD *AuthMethod, OUT CHAR8 **UserId, OUT CHAR8 **Password) |
EFI_STATUS EFIAPI | LibCredentialGetAuthInfo (IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This, OUT EDKII_REDFISH_AUTH_METHOD *AuthMethod, OUT CHAR8 **UserId, OUT CHAR8 **Password) |
VOID EFIAPI | LibCredentialExitBootServicesNotify (IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This) |
VOID EFIAPI | LibCredentialEndOfDxeNotify (IN EDKII_REDFISH_CREDENTIAL_PROTOCOL *This) |
Variables | |
BOOLEAN | mSecureBootDisabled = FALSE |
BOOLEAN | mStopRedfishService = FALSE |
EmulaotPkg RedfishPlatformCredentialLib instance
(C) Copyright 2020 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file RedfishPlatformCredentialLib.c.
EFI_STATUS GetRedfishCredential | ( | OUT EDKII_REDFISH_AUTH_METHOD * | AuthMethod, |
OUT CHAR8 ** | UserId, | ||
OUT CHAR8 ** | Password | ||
) |
Return the credential for accessing to Redfish servcice.
[out] | AuthMethod | The authentication method. |
[out] | UserId | User ID. |
[out] | Password | USer password. |
EFI_SUCCESS | Get the authentication information successfully. |
EFI_OUT_OF_RESOURCES | There are not enough memory resources. |
Definition at line 43 of file RedfishPlatformCredentialLib.c.
VOID EFIAPI LibCredentialEndOfDxeNotify | ( | IN EDKII_REDFISH_CREDENTIAL_PROTOCOL * | This | ) |
Notification of End of DXE.
[in] | This | Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL. |
Definition at line 235 of file RedfishPlatformCredentialLib.c.
VOID EFIAPI LibCredentialExitBootServicesNotify | ( | IN EDKII_REDFISH_CREDENTIAL_PROTOCOL * | This | ) |
Notification of Exit Boot Service.
[in] | This | Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL. |
Definition at line 222 of file RedfishPlatformCredentialLib.c.
EFI_STATUS EFIAPI LibCredentialGetAuthInfo | ( | IN EDKII_REDFISH_CREDENTIAL_PROTOCOL * | This, |
OUT EDKII_REDFISH_AUTH_METHOD * | AuthMethod, | ||
OUT CHAR8 ** | UserId, | ||
OUT CHAR8 ** | Password | ||
) |
Retrieve platform's Redfish authentication information.
This functions returns the Redfish authentication method together with the user Id and password.
Callers are responsible for and freeing the returned string storage.
[in] | This | Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL instance. |
[out] | AuthMethod | Type of Redfish authentication method. |
[out] | UserId | The pointer to store the returned UserId string. |
[out] | Password | The pointer to store the returned Password string. |
EFI_SUCCESS | Get the authentication information successfully. |
EFI_ACCESS_DENIED | SecureBoot is disabled after EndOfDxe. |
EFI_INVALID_PARAMETER | This or AuthMethod or UserId or Password is NULL. |
EFI_OUT_OF_RESOURCES | There are not enough memory resources. |
EFI_UNSUPPORTED | Unsupported authentication method is found. |
Definition at line 110 of file RedfishPlatformCredentialLib.c.
EFI_STATUS EFIAPI LibStopRedfishService | ( | IN EDKII_REDFISH_CREDENTIAL_PROTOCOL * | This, |
IN EDKII_REDFISH_CREDENTIAL_STOP_SERVICE_TYPE | ServiceStopType | ||
) |
Notify the Redfish service to stop provide configuration service to this platform.
This function should be called when the platfrom is about to leave the safe environment. It will notify the Redfish service provider to abort all logined session, and prohibit further login with original auth info. GetAuthInfo() will return EFI_UNSUPPORTED once this function is returned.
[in] | This | Pointer to EDKII_REDFISH_CREDENTIAL_PROTOCOL instance. |
[in] | ServiceStopType | Reason of stopping Redfish service. |
EFI_SUCCESS | Service has been stoped successfully. |
EFI_INVALID_PARAMETER | This is NULL or given the worng ServiceStopType. |
EFI_UNSUPPORTED | Not support to stop Redfish service. |
Others | Some error happened. |
Definition at line 163 of file RedfishPlatformCredentialLib.c.
BOOLEAN mSecureBootDisabled = FALSE |
Definition at line 21 of file RedfishPlatformCredentialLib.c.
BOOLEAN mStopRedfishService = FALSE |
Definition at line 22 of file RedfishPlatformCredentialLib.c.