fs_crypto_domain_key_check()

QNX SDP8.0C Library ReferenceAPIDeveloper

Determine if a given domain key is valid

Synopsis:

#include <fs_crypto_api.h>
#include <sys/fs_crypto.h>

int fs_crypto_domain_key_check( const char *path,
                                int domain,
                                int length,
                                const uint8_t bytes[],
                                int *preply );

Arguments:

path
The path to the filesystem's mountpoint.
domain
The number of the domain whose key you want to check.
length
The number of bytes available in the key array.
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_key_check() function determines if a given domain key is valid.

Note:
In order to use filesystem encryption, download the Encrypted Filesystem package from the QNX Software Center.

This function sets the variable pointed to by preply to one of the following values:

FS_CRYPTO_REPLY_BAD_KEY
The key is invalid.
FS_CRYPTO_REPLY_COMPLETE
The key is valid.
FS_CRYPTO_REPLY_ERRNO
See the error code for more information.
FS_CRYPTO_REPLY_INVALID
The command wasn't completed successfully.
FS_CRYPTO_REPLY_UNKNOWN_DOMAIN
There's no domain with the given number.
FS_CRYPTO_REPLY_UNKNOWN_TYPE
The type of encryption used for the domain is invalid.

Returns:

EOK
Success.
EBADFSYS
An inconsistency was found in the domain key in the filesystem.
EINVAL
Invalid arguments.
ENOMEM
Insufficent free memory.

This function can also return any of the errors indicated by devctl() or open().

Classification:

QNX OS

Safety:
Cancellation pointYes
Signal handlerNo
ThreadYes
Page updated: