[vbox-dev] Check for disk encryption

Alexander Eichner Alexander.Eichner at oracle.com
Tue May 3 11:27:20 GMT 2016


Medium.getProperty() returns VBOX_E_OBJECT_NOT_FOUND if the given key is not found. This indicates that the medium is not encrypted
but returns an error which is not what Ian wanted.

Regards,
Alexander

> On 03.05.2016 13:19, Klaus Espenlaub <klaus.espenlaub at oracle.com> wrote:
> 
> Alexander,
> 
> should IMedium.getProperty("CRYPT/KeyStore", val.asOutParam()) (using C++ish pseudocode) work, i.e. leave val as empty when the medium is not encrypted and return some non-empty string if it is encrypted?
> 
> Sounds like it's a lot cheaper than getting all properties and fishing out what one wants...
> 
> Klaus
> 
> On 30.04.2016 05:47, Ian Chapman wrote:
>> Hi Alexander,
>> 
>> Perfect, exactly what I need, thanks.
>> 
>> 
>>> you can check whether the „CRYPT/KeyStore“ medium property exists by
>>> querying
>>> all properties with IMedium::getProperties.
>>> 
>>> Regards,
>>> Alexander
>>> 
>>>> On 28.04.2016 12:52, Ian Chapman <packages at amiga-hardware.com> wrote:
>>>> 
>>>> Hi,
>>>> 
>>>> Is it possible with the current API to check wether an IMedium is
>>>> encrypted or not _without_ VirtualBox returning an error if it isn't?
>>>> 
>>>> --
>>>> Ian Chapman.
> _______________________________________________
> vbox-dev mailing list
> vbox-dev at virtualbox.org
> https://www.virtualbox.org/mailman/listinfo/vbox-dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20160503/a2d4e575/attachment.sig>


More information about the vbox-dev mailing list