TianoCore EDK2 master
|
#include <Uefi.h>
#include <IndustryStandard/Ipmi.h>
#include <IndustryStandard/RedfishHostInterfaceIpmi.h>
#include <Protocol/EdkIIRedfishCredential.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/IpmiLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/RedfishCredentialLib.h>
#include <Library/UefiLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
Go to the source code of this file.
Data Structures | |
struct | BOOTSTRAP_CREDENTIALS_VARIABLE |
Macros | |
#define | CREDENTIAL_VARIABLE_NAME L"Partstooblaitnederc" |
Functions | |
EFI_STATUS | GetBootstrapAccountCredentials (IN BOOLEAN DisableBootstrapControl, IN OUT CHAR8 *BootstrapUsername, OPTIONAL IN UINTN BootstrapUsernameSize, IN OUT CHAR8 *BootstrapPassword, OPTIONAL IN UINTN BootstrapPasswordSize) |
EFI_STATUS | SetBootstrapAccountCredentialsToVariable (IN CHAR8 *BootstrapUsername, OPTIONAL IN CHAR8 *BootstrapPassword, OPTIONAL IN BOOLEAN DeleteVariable) |
Header file for RedfishPlatformCredentialIpmiLib.
Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file RedfishPlatformCredentialIpmiLib.h.
#define CREDENTIAL_VARIABLE_NAME L"Partstooblaitnederc" |
Definition at line 28 of file RedfishPlatformCredentialIpmiLib.h.
EFI_STATUS GetBootstrapAccountCredentials | ( | IN BOOLEAN | DisableBootstrapControl, |
IN OUT CHAR8 * | BootstrapUsername, | ||
OPTIONAL IN UINTN | BootstrapUsernameSize, | ||
IN OUT CHAR8 * | BootstrapPassword, | ||
OPTIONAL IN UINTN | BootstrapPasswordSize | ||
) |
Function to retrieve temporary user credentials for the UEFI redfish client. This function can also disable bootstrap credential service in BMC.
[in] | DisableBootstrapControl | TRUE - Tell the BMC to disable the bootstrap credential service to ensure no one else gains credentials FALSE Allow the bootstrap credential service to continue |
[in,out] | BootstrapUsername | A pointer to a Ascii encoded string for the credential username When DisableBootstrapControl is TRUE, this pointer can be NULL |
[in] | BootstrapUsernameSize | The size of BootstrapUsername including NULL terminator in bytes. Per specification, the size is USERNAME_MAX_SIZE. |
[in,out] | BootstrapPassword | A pointer to a Ascii encoded string for the credential password When DisableBootstrapControl is TRUE, this pointer can be NULL |
[in] | BootstrapPasswordSize | The size of BootstrapPassword including NULL terminator in bytes. Per specification, the size is PASSWORD_MAX_SIZE. |
EFI_SUCCESS | Credentials were successfully fetched and returned. When DisableBootstrapControl is set to TRUE, the bootstrap credential service is disabled successfully. |
EFI_INVALID_PARAMETER | BootstrapUsername or BootstrapPassword is NULL when DisableBootstrapControl is set to FALSE. BootstrapUsernameSize or BootstrapPasswordSize is incorrect when DisableBootstrapControl is set to FALSE. |
EFI_DEVICE_ERROR | An IPMI failure occurred |
Definition at line 132 of file RedfishPlatformCredentialIpmiLib.c.
EFI_STATUS SetBootstrapAccountCredentialsToVariable | ( | IN CHAR8 * | BootstrapUsername, |
OPTIONAL IN CHAR8 * | BootstrapPassword, | ||
OPTIONAL IN BOOLEAN | DeleteVariable | ||
) |
Function to save temporary user credentials into boot time variable. When DeleteVariable is True, this function delete boot time variable.
[in] | BootstrapUsername | A pointer to a Ascii encoded string for the credential username. |
[in] | BootstrapPassword | A pointer to a Ascii encoded string for the credential password. |
[in] | DeleteVariable | True to remove boot time variable. False otherwise. |
EFI_SUCCESS | Credentials were successfully saved. |
EFI_INVALID_PARAMETER | BootstrapUsername or BootstrapPassword is NULL |
Others | Error occurs |
Definition at line 305 of file RedfishPlatformCredentialIpmiLib.c.