VirtualBox

Changeset 91491 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 30, 2021 8:33:40 AM (3 years ago)
Author:
vboxsync
Message:

FE/VBoxManage: Add sub-command to enroll the default VBox platform key for secure boot, bugref:9580

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyNvram.cpp

    r91457 r91491  
    164164
    165165/**
     166 * Handles the 'modifynvram myvm enrollorclpk' sub-command.
     167 * @returns Exit code.
     168 * @param   a               The handler argument package.
     169 * @param   nvram           Reference to the NVRAM store interface.
     170 */
     171static RTEXITCODE handleModifyNvramEnrollOraclePlatformKey(HandlerArg *a, ComPtr<INvramStore> &nvramStore)
     172{
     173    RT_NOREF(a);
     174
     175    ComPtr<IUefiVariableStore> uefiVarStore;
     176    CHECK_ERROR2I_RET(nvramStore, COMGETTER(UefiVariableStore)(uefiVarStore.asOutParam()), RTEXITCODE_FAILURE);
     177
     178    CHECK_ERROR2I_RET(uefiVarStore, EnrollOraclePlatformKey(), RTEXITCODE_FAILURE);
     179    return RTEXITCODE_SUCCESS;
     180}
     181
     182
     183/**
    166184 * Handles the 'modifynvram myvm listvars' sub-command.
    167185 * @returns Exit code.
     
    302320    else if (!strcmp(a->argv[1], "enrollpk"))
    303321        rc = handleModifyNvramEnrollPlatformKey(a, nvramStore) == RTEXITCODE_SUCCESS ? S_OK : E_FAIL;
     322    else if (!strcmp(a->argv[1], "enrollorclpk"))
     323        rc = handleModifyNvramEnrollOraclePlatformKey(a, nvramStore) == RTEXITCODE_SUCCESS ? S_OK : E_FAIL;
    304324    else if (!strcmp(a->argv[1], "listvars"))
    305325        rc = handleModifyNvramListUefiVars(a, nvramStore) == RTEXITCODE_SUCCESS ? S_OK : E_FAIL;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette