VirtualBox

Ignore:
Timestamp:
Mar 14, 2023 2:40:37 PM (21 months ago)
Author:
vboxsync
Message:

Main/UefiVariableStore: Add API to add signatures to the MOK list (Machine Owner Key) in order to deploy signatures for the guest additions, bugref:10287

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/UefiVariableStoreImpl.cpp

    r98262 r98964  
    556556
    557557
     558HRESULT UefiVariableStore::addSignatureToMok(const std::vector<BYTE> &aData, const com::Guid &aOwnerUuid, SignatureType_T enmSignatureType)
     559{
     560    /* the machine needs to be mutable */
     561    AutoMutableStateDependency adep(m->pMachine);
     562    if (FAILED(adep.hrc())) return adep.hrc();
     563
     564    HRESULT hrc = i_retainUefiVariableStore(false /*fReadonly*/);
     565    if (FAILED(hrc)) return hrc;
     566
     567    AutoWriteLock wlock(this COMMA_LOCKVAL_SRC_POS);
     568
     569    EFI_GUID GuidMokList = EFI_IMAGE_MOK_DATABASE_GUID;
     570    hrc = i_uefiVarStoreAddSignatureToDbVec(&GuidMokList, "MokList", aData, aOwnerUuid, enmSignatureType);
     571
     572    i_releaseUefiVariableStore();
     573    return hrc;
     574}
     575
     576
     577
     578
    558579/**
    559580 * Sets the given attributes for the given EFI variable store variable.
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