VirtualBox

Changeset 91490 in vbox


Ignore:
Timestamp:
Sep 30, 2021 8:30:25 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
147174
Message:

Main: Implement enrolling the default VBox platform key, bugref:9580

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/formats/efi-signature.h

    r90283 r91490  
    6464    { 0x77fa9abd, 0x0359, 0x4d32, { 0xbd, 0x60, 0x28, 0xf4, 0xe7, 0x8f, 0x78, 0x4b }}
    6565
     66/** VirtualBox's GUID for signatures. */
     67#define EFI_SIGNATURE_OWNER_GUID_VBOX \
     68    { 0x9400896a, 0x146c, 0x4f4c, { 0x96, 0x47, 0x2c, 0x73, 0x62, 0x0c, 0xa8, 0x94 }}
     69
    6670
    6771/**
  • trunk/src/VBox/Main/include/TrustAnchorsAndCerts.h

    r91399 r91490  
    3535extern const unsigned g_cbUefiMicrosoftProPca;
    3636
     37extern const unsigned char g_abUefiOracleDefPk[];
     38extern const unsigned g_cbUefiOracleDefPk;
     39
    3740RT_C_DECLS_END
    3841
  • trunk/src/VBox/Main/src-server/UefiVariableStoreImpl.cpp

    r91458 r91490  
    326326HRESULT UefiVariableStore::enrollOraclePlatformKey(void)
    327327{
    328     return E_NOTIMPL;
     328    /* the machine needs to be mutable */
     329    AutoMutableStateDependency adep(m->pMachine);
     330    if (FAILED(adep.rc())) return adep.rc();
     331
     332    AutoWriteLock wlock(this COMMA_LOCKVAL_SRC_POS);
     333
     334    EFI_GUID GuidGlobalVar = EFI_GLOBAL_VARIABLE_GUID;
     335
     336    /** @todo This conversion from EFI GUID -> IPRT UUID -> Com GUID is nuts... */
     337    EFI_GUID GuidOwnerVBox = EFI_SIGNATURE_OWNER_GUID_VBOX;
     338    RTUUID   UuidVBox;
     339    RTEfiGuidToUuid(&UuidVBox, &GuidOwnerVBox);
     340
     341    const com::Guid GuidVBox(UuidVBox);
     342
     343    return i_uefiVarStoreAddSignatureToDb(&GuidGlobalVar, "PK", g_abUefiOracleDefPk, g_cbUefiOracleDefPk,
     344                                          GuidVBox, SignatureType_X509);
    329345}
    330346
Note: See TracChangeset for help on using the changeset viewer.

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