VirtualBox

Changeset 54591 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Mar 2, 2015 7:55:29 PM (10 years ago)
Author:
vboxsync
Message:

Add support to supply passwords for disk encryption while the VM is running

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

Legend:

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

    r54106 r54591  
    55
    66/*
    7  * Copyright (C) 2005-2014 Oracle Corporation
     7 * Copyright (C) 2005-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    351351                     ULONG aMaxDowntime,
    352352                     ComPtr<IProgress> &aProgress);
     353    HRESULT addDiskEncryptionPassword(const com::Utf8Str &aId, const com::Utf8Str &aPassword,
     354                                      BOOL aClearOnSuspend);
     355    HRESULT removeDiskEncryptionPassword(const com::Utf8Str &aId);
     356    HRESULT clearAllDiskEncryptionPasswords();
    353357
    354358    void notifyNatDnsChange(PUVM pUVM, const char *pszDevice, ULONG ulInstanceMax);
     
    585589            SecretKey() { }
    586590
    587             SecretKey(uint8_t *pbKey, size_t cbKey)
     591            SecretKey(uint8_t *pbKey, size_t cbKey, bool fRemoveOnSuspend)
    588592               : m_cRefs(0),
    589593                 m_pbKey(pbKey),
    590                  m_cbKey(cbKey)
     594                 m_cbKey(cbKey),
     595                 m_fRemoveOnSuspend(fRemoveOnSuspend)
    591596            { }
    592597
     
    597602                m_pbKey = NULL;
    598603                m_cbKey = 0;
     604                m_fRemoveOnSuspend = false;
    599605            }
    600606
     
    605611            /** Size of the key in bytes. */
    606612            size_t   m_cbKey;
     613            /** Flag whether to remove the key on suspend. */
     614            bool     m_fRemoveOnSuspend;
    607615    };
    608616
     
    810818                                                        size_t *pcbKey);
    811819    static DECLCALLBACK(int)    i_pdmIfSecKey_KeyRelease(PPDMISECKEY pInterface, const char *pszId);
     820    static DECLCALLBACK(int)    i_pdmIfSecKey_PasswordRetain(PPDMISECKEY pInterface, const char *pszId, const char **ppszPassword);
     821    static DECLCALLBACK(int)    i_pdmIfSecKey_PasswordRelease(PPDMISECKEY pInterface, const char *pszId);
    812822
    813823    static DECLCALLBACK(int)    i_pdmIfSecKeyHlp_KeyMissingNotify(PPDMISECKEYHLP pInterface);
     
    852862     * @{ */
    853863    HRESULT i_consoleParseDiskEncryption(const char *psz, const char **ppszEnd);
    854     HRESULT i_configureEncryptionForDisk(const char *pszUuid);
     864    HRESULT i_configureEncryptionForDisk(const Utf8Str &aId);
    855865    HRESULT i_clearDiskEncryptionKeysOnAllAttachments(void);
    856866    int i_consoleParseKeyValue(const char *psz, const char **ppszEnd,
  • trunk/src/VBox/Main/include/MediumImpl.h

    r54486 r54591  
    77
    88/*
    9  * Copyright (C) 2008-2014 Oracle Corporation
     9 * Copyright (C) 2008-2015 Oracle Corporation
    1010 *
    1111 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    276276    HRESULT reset(ComPtr<IProgress> &aProgress);
    277277    HRESULT changeEncryption(const com::Utf8Str &aNewPassword, const com::Utf8Str &aOldPassword,
    278                              const com::Utf8Str &aCipher, ComPtr<IProgress> &aProgress);
     278                             const com::Utf8Str &aCipher, const com::Utf8Str &aNewPasswordId, ComPtr<IProgress> &aProgress);
    279279
    280280    // Private internal nmethods
     
    324324                                                 const uint8_t **ppbKey, size_t *pcbKey);
    325325    static DECLCALLBACK(int) i_vdCryptoKeyRelease(void *pvUser, const char *pszId);
    326     static DECLCALLBACK(int) i_vdCryptoKeyStoreGetPassword(void *pvUser, const char **ppszPassword);
     326    static DECLCALLBACK(int) i_vdCryptoKeyStorePasswordRetain(void *pvUser, const char *pszId, const char **ppszPassword);
     327    static DECLCALLBACK(int) i_vdCryptoKeyStorePasswordRelease(void *pvUser, const char *pszId);
    327328    static DECLCALLBACK(int) i_vdCryptoKeyStoreSave(void *pvUser, const void *pvKeyStore, size_t cbKeyStore);
    328329    static DECLCALLBACK(int) i_vdCryptoKeyStoreReturnParameters(void *pvUser, const char *pszCipher,
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