21#define ERR(name, desc) \
29static const err_t errors[] = {
46 "Message encryption / verification failed"),
58 "The command execution has not terminated"),
66 static const char *
unknown =
"Unknown yubihsm error";
69 if (-err < 0 || -err >= (
int) (
sizeof(errors) /
sizeof(errors[0]))) {
const char * yh_strerror(yh_rc err)
@ YHR_INIT_ERROR
Returned value when failing to initialize libyubihsm.
@ YHR_DEVICE_INSUFFICIENT_PERMISSIONS
Return value when the permissions to perform the operation are wrong.
@ YHR_DEVICE_INVALID_SESSION
Returned value when the device session is invalid.
@ YHR_GENERIC_ERROR
Return value when encountering an unknown error.
@ YHR_SUCCESS
Returned value when function was successful.
@ YHR_DEVICE_COMMAND_UNEXECUTED
Return value when the command execution has not terminated.
@ YHR_INVALID_PARAMETERS
Returned value when an argument to a function is invalid.
@ YHR_MEMORY_ERROR
Returned value when unable to allocate memory.
@ YHR_DEVICE_INVALID_COMMAND
Returned value when the device receives and invalid command.
@ YHR_DEVICE_SESSIONS_FULL
Return value when no more sessions can be opened on the device.
@ YHR_DEVICE_SESSION_FAILED
Return value when failing to create a device session.
@ YHR_DEVICE_OBJECT_NOT_FOUND
Return value when the object not found on the device.
@ YHR_DEVICE_AUTHENTICATION_FAILED
Return value when the device fails to encrypt or verify the message.
@ YHR_DEVICE_LOG_FULL
Return value when the log buffer is full and forced audit is set.
@ YHR_DEVICE_INVALID_OTP
Return value when an invalid OTP is submitted.
@ YHR_DEVICE_DEMO_MODE
Return value when the device is in demo mode and has to be power cycled.
@ YHR_DEVICE_INVALID_DATA
Returned value when the device receives a malformed command invalid data.
@ YHR_CONNECTOR_NOT_FOUND
Returned value when failing to find a suitable connector.
@ YHR_DEVICE_STORAGE_FAILED
Return value when encountering a storage failure on the device.
@ YHR_DEVICE_OBJECT_EXISTS
Return value when trying to add an object with an ID that already exists.
@ YHR_BUFFER_TOO_SMALL
Returned value when there is not enough space to store data.
@ YHR_CONNECTOR_ERROR
Return value when connector operation failed.
@ YHR_MAC_MISMATCH
Returned value when failing to verify MAC.
@ YHR_DEVICE_WRONG_LENGTH
@ YHR_CONNECTION_ERROR
Returned value when a connection error was encountered.
@ YHR_DEVICE_SSH_CA_CONSTRAINT_VIOLATION
Return value when encountering SSH CA constraint violation.
@ YHR_DEVICE_OK
Returned value when the device returned no error.
@ YHR_DEVICE_INVALID_ID
Return value when an invalid Object ID is used.
@ YHR_SESSION_AUTHENTICATION_FAILED
Returned value when failing to authenticate the session.
@ YHR_CRYPTOGRAM_MISMATCH
Returned value when failing to verify cryptogram.