Changeset 98964 in vbox
- Timestamp:
- Mar 14, 2023 2:40:37 PM (21 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/formats/efi-signature.h
r98103 r98964 53 53 #define EFI_IMAGE_SECURITY_DATABASE_GUID \ 54 54 { 0xd719b2cb, 0x3d3a, 0x4596, { 0xa3, 0xbc, 0xda, 0xd0, 0x0e, 0x67, 0x65, 0x6f }} 55 /** The GUID used for setting and retrieving the MOK (Machine Owner Key) from the variable store. */ 56 #define EFI_IMAGE_MOK_DATABASE_GUID \ 57 { 0x605dab50, 0xe046, 0x4300, { 0xab, 0xb6, 0x3d, 0xd8, 0x10, 0xdd, 0x8b, 0x23 }} 55 58 56 59 -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r98793 r98964 6307 6307 uuid="d134c6b6-4479-430d-bb73-68a452ba3e67" 6308 6308 wsmap="managed" 6309 reservedMethods=" 10" reservedAttributes="5"6309 reservedMethods="9" reservedAttributes="5" 6310 6310 > 6311 6311 <desc> … … 6451 6451 in the signature databases. 6452 6452 </desc> 6453 </method> 6454 6455 <method name="addSignatureToMok"> 6456 <desc> 6457 Convenience method to add a new entry to the MOK (Machine Owner Key) signature database. 6458 </desc> 6459 <param name="signature" type="octet" safearray="yes" dir="in"> 6460 <desc>The signature to add.</desc> 6461 </param> 6462 <param name="owner" type="uuid" mod="string" dir="in"> 6463 <desc>UUID of the signature owner.</desc> 6464 </param> 6465 <param name="signatureType" type="SignatureType" dir="in"> 6466 <desc>Type of the signature.</desc> 6467 </param> 6453 6468 </method> 6454 6469 -
trunk/src/VBox/Main/include/UefiVariableStoreImpl.h
r98103 r98964 76 76 HRESULT addSignatureToDbx(const std::vector<BYTE> &aData, const com::Guid &aOwnerUuid, SignatureType_T enmSignatureType); 77 77 HRESULT enrollDefaultMsSignatures(void); 78 HRESULT addSignatureToMok(const std::vector<BYTE> &aData, const com::Guid &aOwnerUuid, SignatureType_T enmSignatureType); 78 79 79 80 int i_uefiVarStoreSetVarAttr(const char *pszVar, uint32_t fAttr); -
trunk/src/VBox/Main/src-server/UefiVariableStoreImpl.cpp
r98262 r98964 556 556 557 557 558 HRESULT 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 558 579 /** 559 580 * Sets the given attributes for the given EFI variable store variable.
Note:
See TracChangeset
for help on using the changeset viewer.