20#ifndef ANJ_DM_SECURITY_OBJECT_H
21# define ANJ_DM_SECURITY_OBJECT_H
30# ifdef ANJ_WITH_PERSISTENCE
34# ifdef ANJ_WITH_SECURITY
63# ifdef ANJ_WITH_DEFAULT_SECURITY_OBJ
66# ifdef ANJ_WITH_BOOTSTRAP
67# define ANJ_DM_SECURITY_OBJ_INSTANCES 2
69# define ANJ_DM_SECURITY_OBJ_INSTANCES 1
82# ifdef ANJ_WITH_SECURITY
83 uint8_t public_key_or_identity_buff
107# ifdef ANJ_WITH_SECURITY
151 security_instances[ANJ_DM_SECURITY_OBJ_INSTANCES];
153 cache_security_instances[ANJ_DM_SECURITY_OBJ_INSTANCES];
200# ifdef ANJ_WITH_SECURITY
220 bool bootstrap_credentials,
225# ifdef ANJ_WITH_PERSISTENCE
#define ANJ_SEC_OBJ_MAX_SERVER_PUBLIC_KEY_SIZE
Definition anj_config.h:123
#define ANJ_SEC_OBJ_MAX_SECRET_KEY_SIZE
Definition anj_config.h:132
#define ANJ_SEC_OBJ_MAX_PUBLIC_KEY_OR_IDENTITY_SIZE
Definition anj_config.h:114
Cryptographic data descriptors used by Security Object and networking.
Core type and constant definitions for Anjay Lite.
struct anj_struct anj_t
Definition defs.h:136
#define ANJ_SERVER_URI_MAX_SIZE
Definition defs.h:147
uint16_t anj_iid_t
Definition defs.h:128
Core data model API: object management, read/write helpers, bootstrap.
Global configuration validation header for Anjay Lite.
Persistence API for storing and restoring Anjay Lite state.
void anj_dm_security_obj_init(anj_dm_security_obj_t *security_obj_ctx)
int anj_dm_security_obj_get_psk(const anj_t *anj, bool bootstrap_credentials, anj_crypto_security_info_t *out_psk_identity, anj_crypto_security_info_t *out_psk_key)
anj_dm_security_mode_t
Definition security_object.h:46
@ ANJ_DM_SECURITY_CERTIFICATE
Definition security_object.h:54
@ ANJ_DM_SECURITY_NOSEC
Definition security_object.h:57
@ ANJ_DM_SECURITY_EST
Definition security_object.h:60
@ ANJ_DM_SECURITY_PSK
Definition security_object.h:48
@ ANJ_DM_SECURITY_RPK
Definition security_object.h:51
int anj_dm_security_obj_store(anj_t *anj, anj_dm_security_obj_t *security_obj_ctx, const anj_persistence_context_t *ctx)
int anj_dm_security_obj_install(anj_t *anj, anj_dm_security_obj_t *security_obj_ctx)
int anj_dm_security_obj_restore(anj_t *anj, anj_dm_security_obj_t *security_obj_ctx, const anj_persistence_context_t *ctx)
int anj_dm_security_obj_add_instance(anj_dm_security_obj_t *security_obj_ctx, const anj_dm_security_instance_init_t *instance)
Definition security_object.h:97
uint16_t ssid
Definition security_object.h:122
const anj_iid_t * iid
Definition security_object.h:134
uint32_t client_hold_off_time
Definition security_object.h:128
anj_crypto_security_info_t public_key_or_identity
Definition security_object.h:109
bool bootstrap_server
Definition security_object.h:102
anj_crypto_security_info_t secret_key
Definition security_object.h:115
const char * server_uri
Definition security_object.h:99
anj_crypto_security_info_t server_public_key
Definition security_object.h:112
anj_dm_security_mode_t security_mode
Definition security_object.h:105
Definition security_object.h:74
uint16_t ssid
Definition security_object.h:79
anj_iid_t iid
Definition security_object.h:80
uint32_t client_hold_off_time
Definition security_object.h:78
anj_crypto_security_info_t public_key_or_identity
Definition security_object.h:87
bool bootstrap_server
Definition security_object.h:76
anj_crypto_security_info_t secret_key
Definition security_object.h:89
anj_crypto_security_info_t server_public_key
Definition security_object.h:88
anj_dm_security_mode_t security_mode
Definition security_object.h:77
Definition security_object.h:146
anj_dm_obj_t obj
Definition security_object.h:147
anj_iid_t new_instance_iid
Definition security_object.h:155
bool installed
Definition security_object.h:154
Definition persistence.h:91