VirtualBox

Changeset 55184 in vbox


Ignore:
Timestamp:
Apr 10, 2015 2:36:14 PM (9 years ago)
Author:
vboxsync
Message:

Missing files

Location:
trunk/src/VBox/Main/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/ApplianceImpl.h

    r50832 r55184  
    105105                  ComPtr<IProgress> &aProgress);
    106106    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);
    107110
    108111    /** weak VirtualBox parent */
  • trunk/src/VBox/Main/include/ApplianceImplPrivate.h

    r50215 r55184  
    2121
    2222#include "ovfreader.h"
     23#include "SecretKeyStore.h"
    2324#include <map>
     25#include <vector>
    2426#include <iprt/vfs.h>
    2527
     
    6163      , ulTotalDisksMB(0)
    6264      , cDisks(0)
     65      , m_cPwProvided(0)
    6366    {
    6467    }
     
    99102
    100103    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;
    101111};
    102112
  • trunk/src/VBox/Main/include/ConsoleImpl.h

    r54978 r55184  
    2222#include "VBox/com/array.h"
    2323#include "EventImpl.h"
     24#include "SecretKeyStore.h"
    2425#include "ConsoleWrap.h"
    2526
     
    582583    };
    583584
    584     /**
    585      * Class for managing cryptographic keys.
    586      * @todo: Replace with a keystore implementation once it is ready.
    587      */
    588     class SecretKey
    589     {
    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 
    623585    typedef std::map<Utf8Str, ComObjPtr<SharedFolder> > SharedFolderMap;
    624586    typedef std::map<Utf8Str, SharedFolderData> SharedFolderDataMap;
    625587    typedef std::map<Utf8Str, ComPtr<IMediumAttachment> > MediumAttachmentMap;
    626588    typedef std::list <USBStorageDevice> USBStorageDeviceList;
    627     typedef std::map<Utf8Str, SecretKey *> SecretKeyMap;
    628589
    629590private:
     
    997958    USBStorageDeviceList mUSBStorageDevices;
    998959
    999     /** Map of secret keys used for disk encryption. */
    1000     SecretKeyMap         m_mapSecretKeys;
     960    /** Store for secret keys. */
     961    SecretKeyStore * const m_pKeyStore;
    1001962    /** Number of disks configured for encryption. */
    1002     unsigned             m_cDisksEncrypted;
     963    unsigned               m_cDisksEncrypted;
    1003964    /** Number of disks which have the key in the map. */
    1004     unsigned             m_cDisksPwProvided;
     965    unsigned               m_cDisksPwProvided;
    1005966
    1006967    /** Pointer to the key consumer -> provider (that's us) callbacks. */
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