OPTIGA™ Trust M
Host Library Documentation
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/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_START_FINAL (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
73
#define OPTIGA_CRYPT_SYM_START (0x00)
74
75
#define OPTIGA_CRYPT_SYM_START_FINAL (0x01)
76
77
#define OPTIGA_CRYPT_SYM_CONTINUE (0x02)
78
79
#define OPTIGA_CRYPT_SYM_FINAL (0x03)
80
83
#define OPTIGA_UTIL_COUNT_DATA_OBJECT (0x02)
84
85
#ifdef OPTIGA_COMMS_SHIELDED_CONNECTION
86
#define OPTIGA_SET_PROTECTION_LEVEL (0x00)
88
#define OPTIGA_SET_PROTECTION_VERSION (0x01)
90
#define OPTIGA_SET_MANAGE_CONTEXT (0x02)
92
93
#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) ;}
94
95
#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);}
96
97
#define OPTIGA_PROTECTION_MANAGE_CONTEXT(p_mycmd, operation) {optiga_cmd_set_shielded_connection_option(p_mycmd ,operation,OPTIGA_SET_MANAGE_CONTEXT);}
98
#else
99
#define OPTIGA_PROTECTION_ENABLE(p_instance, p_protection_mode) { }
100
#define OPTIGA_PROTECTION_SET_VERSION(p_instance, p_version) {}
101
#define OPTIGA_PROTECTION_MANAGE_CONTEXT(p_instance, p_operation) {}
102
#endif
103
105
#ifdef __cplusplus
106
}
107
#endif
108
109
#endif
/*_OPTIGA_LIB_COMMON_INTERNAL_H_ */
110
optiga_lib_config.h
This file is defines the compilation switches to build code with required features.
Copyright © 2021 Infineon Technologies AG