fs_crypto_domain_add_dynamic()
Create a dynamic encryption domain and unlock it if requested
Synopsis:
#include <fs_crypto_api.h>
#include <sys/fs_crypto.h>
int fs_crypto_domain_add_dynamic(
const char *path,
int type,
int state,
int length,
const uint8_t bytes[],
int *preply)
Arguments:
- path
- The path to the directory to create the domain on.
- domain
- The domain number to add (the domain must be unused).
- type
- The type of encryption to employ; one of the following (defined in
<sys/fs_crypto.h>):
- FS_CRYPTO_TYPE_NONE
- FS_CRYPTO_TYPE_XTS — AES-256, in XTS mode
- FS_CRYPTO_TYPE_CBC — AES-256, in CBC mode
- state
- The lock state for the new domain (1 is locked, 0 is unlocked).
- length
- The number of bytes available in the key array, bytes.
- bytes
- The binary representation of the key.
- preply
- A pointer to a location where the function can store additional success or error information.
Library:
libfscrypto
Use the -l fscrypto option to
qcc
to link against this library.
Description:
The fs_crypto_domain_add_dynamic() function creats a dynamic encryption
domain, and unlocks it if requested.
Note:
- In order to use filesystem encryption, download the Encrypted Filesystem package from the QNX Software Center.
- You must be in the group that owns the filesystem's mountpoint in order to create a domain.
This function sets the variable pointed to by preply to one of the following values:
- FS_CRYPTO_REPLY_COMPLETE
- The domain was successfully created.
- FS_CRYPTO_REPLY_ERRNO
- See the error code.
- FS_CRYPTO_REPLY_DOMAIN_EXISTS
- The domain already exists.
- FS_CRYPTO_REPLY_INVALID
- The command wasn't completed successfully.
- FS_CRYPTO_REPLY_READONLY
- The filesystem is mounted read-only.
- FS_CRYPTO_REPLY_UNKNOWN_TYPE
- The type argument isn't a valid type of encryption.
Classification:
QNX Neutrino
Safety: |
|
Cancellation point |
Yes |
Interrupt handler |
No |
Signal handler |
No |
Thread |
Yes |