Changeset 55184 in vbox
- Timestamp:
- Apr 10, 2015 2:36:14 PM (9 years ago)
- Location:
- trunk/src/VBox/Main/include
- Files:
-
- 3 edited
-
ApplianceImpl.h (modified) (1 diff)
-
ApplianceImplPrivate.h (modified) (3 diffs)
-
ConsoleImpl.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/ApplianceImpl.h
r50832 r55184 105 105 ComPtr<IProgress> &aProgress); 106 106 HRESULT getWarnings(std::vector<com::Utf8Str> &aWarnings); 107 HRESULT getPasswordIds(std::vector<com::Utf8Str> &aIdentifiers); 108 HRESULT addPasswords(const std::vector<com::Utf8Str> &aIdentifiers, 109 const std::vector<com::Utf8Str> &aPasswords); 107 110 108 111 /** weak VirtualBox parent */ -
trunk/src/VBox/Main/include/ApplianceImplPrivate.h
r50215 r55184 21 21 22 22 #include "ovfreader.h" 23 #include "SecretKeyStore.h" 23 24 #include <map> 25 #include <vector> 24 26 #include <iprt/vfs.h> 25 27 … … 61 63 , ulTotalDisksMB(0) 62 64 , cDisks(0) 65 , m_cPwProvided(0) 63 66 { 64 67 } … … 99 102 100 103 std::list<Guid> llGuidsMachinesCreated; 104 105 /** Sequence of password identifiers to encrypt disk images during export. */ 106 std::vector<com::Utf8Str> m_vecPasswordIdentifiers; 107 /** Secret key store used to hold the passwords during export. */ 108 SecretKeyStore *m_pSecretKeyStore; 109 /** Number of passwords provided. */ 110 uint32_t m_cPwProvided; 101 111 }; 102 112 -
trunk/src/VBox/Main/include/ConsoleImpl.h
r54978 r55184 22 22 #include "VBox/com/array.h" 23 23 #include "EventImpl.h" 24 #include "SecretKeyStore.h" 24 25 #include "ConsoleWrap.h" 25 26 … … 582 583 }; 583 584 584 /**585 * Class for managing cryptographic keys.586 * @todo: Replace with a keystore implementation once it is ready.587 */588 class SecretKey589 {590 public:591 SecretKey() { }592 593 SecretKey(uint8_t *pbKey, size_t cbKey, bool fRemoveOnSuspend)594 : m_cRefs(0),595 m_pbKey(pbKey),596 m_cbKey(cbKey),597 m_fRemoveOnSuspend(fRemoveOnSuspend),598 m_cDisks(0)599 { }600 601 ~SecretKey()602 {603 RTMemSaferFree(m_pbKey, m_cbKey);604 m_cRefs = 0;605 m_pbKey = NULL;606 m_cbKey = 0;607 m_fRemoveOnSuspend = false;608 m_cDisks = 0;609 }610 611 /** Reference counter of the key. */612 volatile uint32_t m_cRefs;613 /** Key material. */614 uint8_t *m_pbKey;615 /** Size of the key in bytes. */616 size_t m_cbKey;617 /** Flag whether to remove the key on suspend. */618 bool m_fRemoveOnSuspend;619 /** Number of disks using this key. */620 uint32_t m_cDisks;621 };622 623 585 typedef std::map<Utf8Str, ComObjPtr<SharedFolder> > SharedFolderMap; 624 586 typedef std::map<Utf8Str, SharedFolderData> SharedFolderDataMap; 625 587 typedef std::map<Utf8Str, ComPtr<IMediumAttachment> > MediumAttachmentMap; 626 588 typedef std::list <USBStorageDevice> USBStorageDeviceList; 627 typedef std::map<Utf8Str, SecretKey *> SecretKeyMap;628 589 629 590 private: … … 997 958 USBStorageDeviceList mUSBStorageDevices; 998 959 999 /** Map of secret keys used for disk encryption. */1000 SecretKey Map m_mapSecretKeys;960 /** Store for secret keys. */ 961 SecretKeyStore * const m_pKeyStore; 1001 962 /** Number of disks configured for encryption. */ 1002 unsigned m_cDisksEncrypted;963 unsigned m_cDisksEncrypted; 1003 964 /** Number of disks which have the key in the map. */ 1004 unsigned m_cDisksPwProvided;965 unsigned m_cDisksPwProvided; 1005 966 1006 967 /** Pointer to the key consumer -> provider (that's us) callbacks. */
Note:
See TracChangeset
for help on using the changeset viewer.

