|
tpm2-tss 4.2.1
TPM Software stack 2.0 TCG spec compliant implementation
|
Functions | |
| TSS2_RC | ifapi_io_check_file_writeable (const char *file) |
| TSS2_RC | ifapi_io_dirfiles (const char *dirname, char ***files, size_t *numfiles) |
| TSS2_RC | ifapi_io_dirfiles_all (const char *searchPath, char ***pathlist, size_t *numPaths) |
| bool | ifapi_io_path_exists (const char *path) |
| TSS2_RC | ifapi_io_poll (IFAPI_IO *io) |
| TSS2_RC | ifapi_io_poll_handles (IFAPI_IO *io, FAPI_POLL_HANDLE **handles, size_t *num_handles) |
| TSS2_RC | ifapi_io_read_async (struct IFAPI_IO *io, const char *filename) |
| TSS2_RC | ifapi_io_read_finish (struct IFAPI_IO *io, uint8_t **buffer, size_t *length) |
| TSS2_RC | ifapi_io_remove_file (const char *file) |
| TSS2_RC | ifapi_io_write_async (struct IFAPI_IO *io, const char *filename, const uint8_t *buffer, size_t length) |
| TSS2_RC | ifapi_io_write_finish (struct IFAPI_IO *io) |
Provides internal basic IO functions for policy and key store module.
| TSS2_RC ifapi_io_check_file_writeable | ( | const char * | file | ) |
Check whether a file is writeable.
| [in] | file | The name of the fileto be checked. |
| TSS2_RC_SUCCESS | if the directories existed or were successfully created |
| TSS2_FAPI_RC_IO_ERROR | if an I/O error occurred |
| TSS2_RC ifapi_io_dirfiles | ( | const char * | dirname, |
| char *** | files, | ||
| size_t * | numfiles ) |
Enumerate the list of files in a directory.
Enumerage the regular files (no directories, symlinks etc) from a given directory.
| [in] | dirname | The directory to list files from. |
| [out] | files | The list of file names. |
| [out] | numfiles | The size of files. |
| TSS2_RC_SUCCESS | if the directories were successfully removed |
| TSS2_FAPI_RC_IO_ERROR | if an I/O error occurred |
| TSS2_FAPI_RC_MEMORY | if memory could not be allocated to hold the read data. |
| TSS2_FAPI_RC_BAD_REFERENCE | a invalid null pointer is passed. |
| TSS2_RC ifapi_io_dirfiles_all | ( | const char * | searchPath, |
| char *** | pathlist, | ||
| size_t * | numPaths ) |
Recursive enumerate the list of files in a directory.
Enumerage the regular files (no directories, symlinks etc) from a given directory.
| [in] | searchPath | The directory to list files from. |
| [out] | pathlist | The list of file names. |
| [out] | numPaths | The size of files. |
| TSS2_RC_SUCCESS | if the directories were successfully removed |
| TSS2_FAPI_RC_IO_ERROR | if an I/O error occurred |
| TSS2_FAPI_RC_MEMORY | if memory could not be allocated to hold the read data. |
| bool ifapi_io_path_exists | ( | const char * | path | ) |
Determine whether a path exists.
| [in] | path | The absolute path of the file. |
| true | The file exists. |
| false | The file does not exist. |
| TSS2_RC ifapi_io_poll | ( | IFAPI_IO * | io | ) |
Wait for file I/O to be ready.
If FAPI state automata are in a file I/O state it will be waited for an event on a file descriptor.
| [in] | io | The input/output context being used for file I/O. |
| TSS2_RC_SUCCESS | After the end of the wait. |
| TSS2_FAPI_RC_IO_ERROR | if the poll function returns an error. |
| TSS2_FAPI_RC_BAD_REFERENCE | a invalid null pointer is passed. |
| TSS2_RC ifapi_io_poll_handles | ( | IFAPI_IO * | io, |
| FAPI_POLL_HANDLE ** | handles, | ||
| size_t * | num_handles ) |
Get a list of poll handles.
| [in] | io | The input/output context being used for file I/O. |
| [out] | handles | The array with the poll handles. |
| [out] | num_handles | The number of poll handles. |
| TSS2_RC_SUCCESS | on success. |
| TSS2_FAPI_RC_NO_HANDLE | In no poll events are stored in IO context. |
| TSS2_FAPI_RC_MEMORY | If the output data cannot be allocated. |
| TSS2_FAPI_RC_BAD_REFERENCE | a invalid null pointer is passed. |
| TSS2_RC ifapi_io_read_async | ( | struct IFAPI_IO * | io, |
| const char * | filename ) |
Start reading a file's complete content into memory in an asynchronous way.
| [in,out] | io | The input/output context being used for file I/O. |
| [in] | filename | The name of the file to be read into memory. |
| TSS2_RC_SUCCESS | if the function call was a success. |
| TSS2_FAPI_RC_IO_ERROR | if an I/O error was encountered; such as the file was not found. |
| TSS2_FAPI_RC_MEMORY | if memory could not be allocated to hold the read data. |
| TSS2_RC ifapi_io_read_finish | ( | struct IFAPI_IO * | io, |
| uint8_t ** | buffer, | ||
| size_t * | length ) |
Finish reading a file's complete content into memory in an asynchronous way.
This function needs to be called repeatedly until it does not return TSS2_FAPI_RC_TRY_AGAIN.
| [in,out] | io | The input/output context being used for file I/O. |
| [out] | buffer | The data that was read from file. (callee-allocated; use free()) |
| [out] | length | The length of the data that was read from file. |
| TSS2_RC_SUCCESS | if the function call was a success. |
| TSS2_FAPI_RC_IO_ERROR | if an I/O error was encountered; such as the file was not found. |
| TSS2_FAPI_RC_TRY_AGAIN | if the asynchronous operation is not yet complete. Call this function again later. |
| TSS2_RC ifapi_io_remove_file | ( | const char * | file | ) |
Remove a file.
| [in] | file | The absolute path of the file to be removed. |
| TSS2_RC_SUCCESS | If the file was successfully removed |
| TSS2_FAPI_RC_IO_ERROR | If the file could not be removed. |
| TSS2_RC ifapi_io_write_async | ( | struct IFAPI_IO * | io, |
| const char * | filename, | ||
| const uint8_t * | buffer, | ||
| size_t | length ) |
Start writing a buffer into a file in an asynchronous way.
| [in,out] | io | The input/output context being used for file I/O. |
| [in] | filename | The name of the file to be read into memory. |
| [in] | buffer | The buffer to be written. |
| [in] | length | The number of bytes to be written. |
| TSS2_RC_SUCCESS | if the function call was a success. |
| TSS2_FAPI_RC_IO_ERROR | if an I/O error was encountered; such as the file was not found. |
| TSS2_FAPI_RC_MEMORY | if memory could not be allocated to hold the read data. |
| TSS2_RC ifapi_io_write_finish | ( | struct IFAPI_IO * | io | ) |
Finish writing a buffer into a file in an asynchronous way.
This function needs to be called repeatedly until it does not return TSS2_FAPI_RC_TRY_AGAIN.
| [in,out] | io | The input/output context being used for file I/O. |
| TSS2_RC_SUCCESS | if the function call was a success. |
| TSS2_FAPI_RC_IO_ERROR | if an I/O error was encountered; such as the file was not found. |
| TSS2_FAPI_RC_TRY_AGAIN | if the asynchronous operation is not yet complete. Call this function again later. |