OPTIGA Trust M
1.1.0
C++ library for Optiga Trust M Chip Security Controller
optiga_lib_common_internal.h
Go to the documentation of this file.
1
38
#ifndef _OPTIGA_LIB_COMMON_INTERNAL_H_
39
#define _OPTIGA_LIB_COMMON_INTERNAL_H_
40
41
#ifdef __cplusplus
42
extern
"C"
{
43
#endif
44
45
#include "
optiga_lib_config.h
"
46
48
#define MIN(a,b) (((a)<(b))?(a):(b))
49
51
#define OPTIGA_CRYPT_HASH_START (0x00)
52
53
#define OPTIGA_CRYPT_HASH_DIGEST_OUT (0x01)
54
55
#define OPTIGA_CRYPT_HASH_CONTINUE (0x02)
56
57
#define OPTIGA_CRYPT_HASH_FINAL (0x03)
58
59
#define OPTIGA_CRYPT_INTERMEDIATE (0x06)
60
61
#define OPTIGA_CRYPT_HASH_CONTX_OUT (0x07)
62
63
#define OPTIGA_CRYPT_HASH_FOR_OID (0x10)
64
66
#define OPTIGA_COMMS_SESSION_CONTEXT_RESTORE (0x11)
67
68
#define OPTIGA_COMMS_SESSION_CONTEXT_SAVE (0x22)
69
70
#define OPTIGA_COMMS_SESSION_CONTEXT_NONE (0x33)
71
74
#define OPTIGA_UTIL_COUNT_DATA_OBJECT (0x02)
75
#ifdef OPTIGA_COMMS_SHIELDED_CONNECTION
76
#define OPTIGA_SET_PROTECTION_LEVEL (0x00)
78
#define OPTIGA_SET_PROTECTION_VERSION (0x01)
80
#define OPTIGA_SET_MANAGE_CONTEXT (0x02)
82
83
#define OPTIGA_PROTECTION_ENABLE(p_mycmd, p_protection_mode) { optiga_cmd_set_shielded_connection_option(p_mycmd, p_protection_mode->protection_level,OPTIGA_SET_PROTECTION_LEVEL) ;}
84
85
#define OPTIGA_PROTECTION_SET_VERSION(p_mycmd, p_version) {optiga_cmd_set_shielded_connection_option(p_mycmd , p_version->protocol_version,OPTIGA_SET_PROTECTION_VERSION);}
86
87
#define OPTIGA_PROTECTION_MANAGE_CONTEXT(p_mycmd, operation) {optiga_cmd_set_shielded_connection_option(p_mycmd ,operation,OPTIGA_SET_MANAGE_CONTEXT);}
88
#else
89
#define OPTIGA_PROTECTION_ENABLE(p_instance, p_protection_mode) { }
90
#define OPTIGA_PROTECTION_SET_VERSION(p_instance, p_version) {}
91
#define OPTIGA_PROTECTION_MANAGE_CONTEXT(p_instance, p_operation) {}
92
#endif
93
95
#ifdef __cplusplus
96
}
97
#endif
98
99
#endif
/*_OPTIGA_LIB_COMMON_INTERNAL_H_ */
100
optiga_lib_config.h
This file is defines the compilation switches to build code with required features.
src
optiga_trustm
optiga_lib_common_internal.h
Generated by
1.8.15