OPTIGA Trust M  1.1.0
C++ library for Optiga Trust M Chip Security Controller
optiga_lib_return_codes.h File Reference

This file defines the error codes for the all the layers and modules.
OPTIGA host library return value Decoding
The definition of the Error code layering for a 2 byte error code explained below.
Each error code is represented as [AB][CD], where each byte is represented as [ ] and individual alphabets represent a nibble.
A : Error indication Bit 15. Set to 1 indicates error from OPTIGA security chip
B : Layer information Bits [14 - 8]. This indicates the layer from which the error originated. E.g. OPTIGA, PAL, Comms, Util, Crypt etc.
CD : Return code Bits [7 - 0]. This indicates the actual nature of error. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define OPTIGA_LIB_SUCCESS   (0x0000)
 OPTIGA host library API execution is successful. More...
 
#define OPTIGA_LIB_BUSY   (0x0001)
 OPTIGA host library in busy state. More...
 
#define OPTIGA_DEVICE_ERROR   (0x8000)
 OPTIGA Device Error to return OPTIGA security chip specific error codes (Refer Solution reference manual for details) More...
 
#define OPTIGA_COMMS_SUCCESS   (0x0000)
 OPTIGA comms API execution is successful. More...
 
#define OPTIGA_COMMS_BUSY   (0x0001)
 OPTIGA comms in busy state. More...
 
#define OPTIGA_COMMS_ERROR   (0x0102)
 OPTIGA comms API failed. More...
 
#define OPTIGA_COMMS_ERROR_INVALID_INPUT   (0x0103)
 OPTIGA comms API called with invalid inputs. More...
 
#define OPTIGA_COMMS_ERROR_MEMORY_INSUFFICIENT   (0x0104)
 OPTIGA comms API called with insufficient memory buffer. More...
 
#define OPTIGA_COMMS_ERROR_STACK_MEMORY   (0x0105)
 Protocol stack memory insufficient. More...
 
#define OPTIGA_COMMS_ERROR_FATAL   (0x0106)
 Protocol fatal error. More...
 
#define OPTIGA_COMMS_ERROR_HANDSHAKE   (0x0107)
 Presentation layer handshake error. More...
 
#define OPTIGA_COMMS_ERROR_SESSION   (0x0108)
 Presentation layer session error. More...
 
#define OPTIGA_CMD_SUCCESS   (0x0000)
 OPTIGA command API execution is successful. More...
 
#define OPTIGA_CMD_BUSY   (0x0001)
 OPTIGA command module in busy state. More...
 
#define OPTIGA_CMD_ERROR   (0x0202)
 OPTIGA command API failed. More...
 
#define OPTIGA_CMD_ERROR_INVALID_INPUT   (0x0203)
 OPTIGA command API called with invalid inputs. More...
 
#define OPTIGA_CMD_ERROR_MEMORY_INSUFFICIENT   (0x0204)
 OPTIGA command API called with insufficient memory buffer. More...
 
#define OPTIGA_UTIL_SUCCESS   (0x0000)
 OPTIGA util API execution is successful. More...
 
#define OPTIGA_UTIL_BUSY   (0x0001)
 OPTIGA util module in busy state. More...
 
#define OPTIGA_UTIL_ERROR   (0x0302)
 OPTIGA util API failed. More...
 
#define OPTIGA_UTIL_ERROR_INVALID_INPUT   (0x0303)
 OPTIGA util API called with invalid inputs. More...
 
#define OPTIGA_UTIL_ERROR_MEMORY_INSUFFICIENT   (0x0304)
 OPTIGA util API called with insufficient memory buffer. More...
 
#define OPTIGA_UTIL_ERROR_INSTANCE_IN_USE   (0x0305)
 OPTIGA util API called when, a request of same instance is already in service. More...
 
#define OPTIGA_CRYPT_SUCCESS   (0x0000)
 OPTIGA crypt API execution is successful. More...
 
#define OPTIGA_CRYPT_BUSY   (0x0001)
 OPTIGA crypt module in busy state. More...
 
#define OPTIGA_CRYPT_ERROR   (0x0402)
 OPTIGA crypt API failed. More...
 
#define OPTIGA_CRYPT_ERROR_INVALID_INPUT   (0x0403)
 OPTIGA crypt API called with invalid inputs. More...
 
#define OPTIGA_CRYPT_ERROR_MEMORY_INSUFFICIENT   (0x0404)
 OPTIGA crypt API called with insufficient memory buffer. More...
 
#define OPTIGA_CRYPT_ERROR_INSTANCE_IN_USE   (0x0405)
 OPTIGA crypt API called when, a request of same instance is already in service. More...
 

Detailed Description

This file defines the error codes for the all the layers and modules.
OPTIGA host library return value Decoding
The definition of the Error code layering for a 2 byte error code explained below.
Each error code is represented as [AB][CD], where each byte is represented as [ ] and individual alphabets represent a nibble.
A : Error indication Bit 15. Set to 1 indicates error from OPTIGA security chip
B : Layer information Bits [14 - 8]. This indicates the layer from which the error originated. E.g. OPTIGA, PAL, Comms, Util, Crypt etc.
CD : Return code Bits [7 - 0]. This indicates the actual nature of error.

Copyright (c) 2019 Infineon Technologies AG

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

\endcopyright

Author
Infineon Technologies AG

Macro Definition Documentation

◆ OPTIGA_CMD_BUSY

#define OPTIGA_CMD_BUSY   (0x0001)

OPTIGA command module in busy state.

◆ OPTIGA_CMD_ERROR

#define OPTIGA_CMD_ERROR   (0x0202)

OPTIGA command API failed.

◆ OPTIGA_CMD_ERROR_INVALID_INPUT

#define OPTIGA_CMD_ERROR_INVALID_INPUT   (0x0203)

OPTIGA command API called with invalid inputs.

◆ OPTIGA_CMD_ERROR_MEMORY_INSUFFICIENT

#define OPTIGA_CMD_ERROR_MEMORY_INSUFFICIENT   (0x0204)

OPTIGA command API called with insufficient memory buffer.

◆ OPTIGA_CMD_SUCCESS

#define OPTIGA_CMD_SUCCESS   (0x0000)

OPTIGA command API execution is successful.

OPTIGA command module return values

◆ OPTIGA_COMMS_BUSY

#define OPTIGA_COMMS_BUSY   (0x0001)

OPTIGA comms in busy state.

◆ OPTIGA_COMMS_ERROR

#define OPTIGA_COMMS_ERROR   (0x0102)

OPTIGA comms API failed.

◆ OPTIGA_COMMS_ERROR_FATAL

#define OPTIGA_COMMS_ERROR_FATAL   (0x0106)

Protocol fatal error.

◆ OPTIGA_COMMS_ERROR_HANDSHAKE

#define OPTIGA_COMMS_ERROR_HANDSHAKE   (0x0107)

Presentation layer handshake error.

◆ OPTIGA_COMMS_ERROR_INVALID_INPUT

#define OPTIGA_COMMS_ERROR_INVALID_INPUT   (0x0103)

OPTIGA comms API called with invalid inputs.

◆ OPTIGA_COMMS_ERROR_MEMORY_INSUFFICIENT

#define OPTIGA_COMMS_ERROR_MEMORY_INSUFFICIENT   (0x0104)

OPTIGA comms API called with insufficient memory buffer.

◆ OPTIGA_COMMS_ERROR_SESSION

#define OPTIGA_COMMS_ERROR_SESSION   (0x0108)

Presentation layer session error.

◆ OPTIGA_COMMS_ERROR_STACK_MEMORY

#define OPTIGA_COMMS_ERROR_STACK_MEMORY   (0x0105)

Protocol stack memory insufficient.

◆ OPTIGA_COMMS_SUCCESS

#define OPTIGA_COMMS_SUCCESS   (0x0000)

OPTIGA comms API execution is successful.

OPTIGA comms module return values

◆ OPTIGA_CRYPT_BUSY

#define OPTIGA_CRYPT_BUSY   (0x0001)

OPTIGA crypt module in busy state.

◆ OPTIGA_CRYPT_ERROR

#define OPTIGA_CRYPT_ERROR   (0x0402)

OPTIGA crypt API failed.

◆ OPTIGA_CRYPT_ERROR_INSTANCE_IN_USE

#define OPTIGA_CRYPT_ERROR_INSTANCE_IN_USE   (0x0405)

OPTIGA crypt API called when, a request of same instance is already in service.

◆ OPTIGA_CRYPT_ERROR_INVALID_INPUT

#define OPTIGA_CRYPT_ERROR_INVALID_INPUT   (0x0403)

OPTIGA crypt API called with invalid inputs.

◆ OPTIGA_CRYPT_ERROR_MEMORY_INSUFFICIENT

#define OPTIGA_CRYPT_ERROR_MEMORY_INSUFFICIENT   (0x0404)

OPTIGA crypt API called with insufficient memory buffer.

◆ OPTIGA_CRYPT_SUCCESS

#define OPTIGA_CRYPT_SUCCESS   (0x0000)

OPTIGA crypt API execution is successful.

OPTIGA crypt module return values

◆ OPTIGA_DEVICE_ERROR

#define OPTIGA_DEVICE_ERROR   (0x8000)

OPTIGA Device Error to return OPTIGA security chip specific error codes (Refer Solution reference manual for details)

OPTIGA device errors

◆ OPTIGA_LIB_BUSY

#define OPTIGA_LIB_BUSY   (0x0001)

OPTIGA host library in busy state.

◆ OPTIGA_LIB_SUCCESS

#define OPTIGA_LIB_SUCCESS   (0x0000)

OPTIGA host library API execution is successful.

◆ OPTIGA_UTIL_BUSY

#define OPTIGA_UTIL_BUSY   (0x0001)

OPTIGA util module in busy state.

◆ OPTIGA_UTIL_ERROR

#define OPTIGA_UTIL_ERROR   (0x0302)

OPTIGA util API failed.

◆ OPTIGA_UTIL_ERROR_INSTANCE_IN_USE

#define OPTIGA_UTIL_ERROR_INSTANCE_IN_USE   (0x0305)

OPTIGA util API called when, a request of same instance is already in service.

◆ OPTIGA_UTIL_ERROR_INVALID_INPUT

#define OPTIGA_UTIL_ERROR_INVALID_INPUT   (0x0303)

OPTIGA util API called with invalid inputs.

◆ OPTIGA_UTIL_ERROR_MEMORY_INSUFFICIENT

#define OPTIGA_UTIL_ERROR_MEMORY_INSUFFICIENT   (0x0304)

OPTIGA util API called with insufficient memory buffer.

◆ OPTIGA_UTIL_SUCCESS

#define OPTIGA_UTIL_SUCCESS   (0x0000)

OPTIGA util API execution is successful.

OPTIGA util module return values