MySQL 8.4.2
Source Code Documentation
keyring_operations_helper Namespace Reference

Functions

int read_secret (const mysql_service_keyring_reader_with_status_t *keyring_reader, const char *secret_id, const char *auth_id, unsigned char **secret, size_t *secret_length, char **secret_type, PSI_memory_key psi_memory_key)
 Read secret from keyring. More...
 

Function Documentation

◆ read_secret()

int keyring_operations_helper::read_secret ( const mysql_service_keyring_reader_with_status_t keyring_reader,
const char *  secret_id,
const char *  auth_id,
unsigned char **  secret,
size_t *  secret_length,
char **  secret_type,
PSI_memory_key  psi_memory_key 
)

Read secret from keyring.

Note: Memory for secert and secret_type must be freed by the caller

Parameters
[in]keyring_readerHandle to keyring_reader_with_status service
[in]secret_idIdentifier for secret data
[in]auth_idOwner of secret data - nullptr for internal keys
[out]secretOutput buffer for secret fetched from keyring
[out]secret_lengthLength of secret data
[out]secret_typeType of data
[out]psi_memory_keyMemory key to be used to allocate memory for secret and secret_type
Returns
status of reading secret
Return values
-1Keyring error
0Key absent
1Key present. Check output buffers.