class VolumeManager

Defined at line 131 of file ../../src/security/lib/zxcrypt/client.h

|zxcrypt::VolumeManager| manages access to a zxcrypt volume device. In

particular, it ensures that the driver is bound before returning a handle to

the EncryptedVolumeClient.

Due to the limitations of actions that involve multiple device drivers,

VolumeManager requires access to both the block device we wish to run zxcrypt

atop and the root of the device tree that contains said block device, so that

we can discover child driver nodes in that tree via topological paths, which

are currently the only way to obtain a handle to a newly-bound child.

Public Methods

void VolumeManager (fidl::ClientEnd<fuchsia_device::Controller> block_controller, fbl::unique_fd devfs_root_fd)

Defined at line 290 of file ../../src/security/lib/zxcrypt/client.cc

zx_status_t Unbind ()

Unbinds the zxcrypt driver. Invalidates channels previously returned from `OpenClient` and FDs

returned from `OpenInnerBlockDevice`.

Defined at line 294 of file ../../src/security/lib/zxcrypt/client.cc

zx_status_t OpenClient (const zx::duration & timeout, zx::channel & out)

Attempts to open the zxcrypt driver device associated with the underlying

block device, binding the driver if necessary, and returning a channel to the zxcrypt device

node.

Defined at line 319 of file ../../src/security/lib/zxcrypt/client.cc

zx::result<fidl::ClientEnd<fuchsia_device::Controller>> OpenInnerBlockDevice (const zx::duration & timeout)

Attempts to open the block device representing the inner, unsealed block

device, at a device path of |/zxcrypt/unsealed/block| below the block device. This will only

work once you have called |OpenClient| and used that handle to call

|EncryptedVolumeClient::Unseal| or |EncryptedVolumeClient::UnsealWithImplicitKey|.

This returns the controller to the block device.

Defined at line 298 of file ../../src/security/lib/zxcrypt/client.cc