Changeset 84031 in vbox for trunk/src/VBox/Main
- Timestamp:
- Apr 28, 2020 9:55:27 AM (5 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/idl/VirtualBox.xidl
r83973 r84031 3510 3510 addresses, if the import options are used to keep them.</desc> 3511 3511 </const> 3512 3513 3512 </enum> 3514 3513 … … 3634 3633 uuid="86a98347-7619-41aa-aece-b21ac5c1a7e6" 3635 3634 wsmap="managed" 3636 reservedMethods=" 7" reservedAttributes="8"3635 reservedMethods="6" reservedAttributes="8" 3637 3636 > 3638 3637 <desc> … … 3781 3780 </desc> 3782 3781 </attribute> 3782 3783 <method name="getManifest"> 3784 <desc> 3785 Return manifest represented in the OVF and type of digest used there. 3786 </desc> 3787 <param name="manifest" type="wstring" dir="out"> 3788 <desc> 3789 The manifest represented in the OVF. Empty if not exist. 3790 This is available after calling <link to="#read"/>. 3791 </desc> 3792 </param> 3793 <param name="manifestName" type="wstring" dir="out"> 3794 <desc> 3795 The manifest file name. Empty if not exist. 3796 </desc> 3797 </param> 3798 3799 </method> 3783 3800 3784 3801 <method name="read"> -
trunk/src/VBox/Main/include/ApplianceImpl.h
r82968 r84031 93 93 HRESULT getVirtualSystemDescriptions(std::vector<ComPtr<IVirtualSystemDescription> > &aVirtualSystemDescriptions); 94 94 HRESULT getMachines(std::vector<com::Utf8Str> &aMachines); 95 96 HRESULT getManifest(com::Utf8Str &aManifest, com::Utf8Str &aManifestName); 95 97 96 98 // wrapped IAppliance methods -
trunk/src/VBox/Main/include/ApplianceImplPrivate.h
r82968 r84031 133 133 cbSignedDigest = 0; 134 134 } 135 135 136 if (fSignerCertLoaded) 136 137 { … … 148 149 ptrCertificateInfo.setNull(); 149 150 strCertError.setNull(); 151 strManifest.setNull(); 152 strManifestName.setNull(); 150 153 } 151 154 … … 161 164 /** @name Write data 162 165 * @{ */ 163 bool fManifest; 166 bool fManifest; // Create a manifest file on export 164 167 /** @} */ 165 168 … … 176 179 /** Memorized copy of the manifest file for signature checking purposes. */ 177 180 RTVFSFILE hMemFileTheirManifest; 181 /** The string contains manifest data. */ 182 Utf8Str strManifest; 183 /** The string contains manifest file name after reading appliance. */ 184 Utf8Str strManifestName; 178 185 179 186 /** The signer certificate from the signature file (.cert). -
trunk/src/VBox/Main/src-server/ApplianceImpl.cpp
r82968 r84031 505 505 * Public method implementation. 506 506 */ 507 HRESULT Appliance::getManifest(com::Utf8Str &aManifest, com::Utf8Str &aManifestName) 508 { 509 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 510 511 aManifest = m->strManifest; 512 aManifestName = m->strManifestName; 513 return S_OK; 514 } 515 516 /** 517 * Public method implementation. 518 */ 507 519 HRESULT Appliance::getDisks(std::vector<com::Utf8Str> &aDisks) 508 520 { -
trunk/src/VBox/Main/src-server/ApplianceImplImport.cpp
r82968 r84031 2569 2569 LogFlowFunc(("%s[%s]\n", pTask->locInfo.strPath.c_str(), pszSubFileNm)); 2570 2570 2571 /* Remember the manifet file name */ 2572 m->strManifestName.assign(pszSubFileNm); 2573 2571 2574 /* 2572 2575 * Copy the manifest into a memory backed file so we can later do signature … … 2578 2581 return setErrorVrc(vrc, tr("Error reading the manifest file '%s' for '%s' (%Rrc)"), 2579 2582 pszSubFileNm, pTask->locInfo.strPath.c_str(), vrc); 2583 2584 /* 2585 * Store the manifest as a string in the m->strManifest 2586 */ 2587 { 2588 char abBuf[_16K]; 2589 size_t cbRead; 2590 2591 vrc = RTVfsFileRead(m->hMemFileTheirManifest, &abBuf, sizeof(abBuf), &cbRead); 2592 if (RT_SUCCESS(vrc)) 2593 m->strManifest.assignEx((const char*)abBuf, cbRead); 2594 2595 /* Rewind to the beginning, because the manifest will be read later again */ 2596 RTVfsFileSeek(m->hMemFileTheirManifest, 0, RTFILE_SEEK_BEGIN, NULL); 2597 } 2580 2598 2581 2599 /*
Note:
See TracChangeset
for help on using the changeset viewer.