Read secret from keyring.
Note: Memory for secert and secret_type must be freed by the caller
- Parameters
-
[in] | keyring_reader | Handle to keyring_reader_with_status service |
[in] | secret_id | Identifier for secret data |
[in] | auth_id | Owner of secret data - nullptr for internal keys |
[out] | secret | Output buffer for secret fetched from keyring |
[out] | secret_length | Length of secret data |
[out] | secret_type | Type of data |
[out] | psi_memory_key | Memory key to be used to allocate memory for secret and secret_type |
- Returns
- status of reading secret
- Return values
-
-1 | Keyring error |
0 | Key absent |
1 | Key present. Check output buffers. |