External Authorization Data¶
EDHOC carries optional EAD items in fields EAD_1 … EAD_4 of
the four handshake messages. libedhoc exposes a thin callback interface that
lets the application produce outgoing EAD tokens and inspect incoming ones
without changing the protocol state machine.
include/edhoc_ead.h- group EDHOC interface EAD
Typedefs
-
typedef int (*edhoc_ead_compose_t)(void *user_context, enum edhoc_message message, struct edhoc_ead_token *ead_token, size_t ead_token_size, size_t *ead_token_len)¶
Compose external authorization data (EAD) tokens.
Called by the library during message composition to let the application attach EAD items to the outgoing EDHOC message.
- Param user_context:
[in] User context.
- Param message:
EDHOC message number (EAD_1, EAD_2, EAD_3, or EAD_4).
- Param ead_token:
[inout] Array where the generated EAD tokens are written.
- Param ead_token_size:
Maximum number of entries in the
ead_tokenarray.- Param ead_token_len:
[out] On success, the number of EAD tokens written.
- Retval EDHOC_SUCCESS:
Success.
- Return:
Negative error code on failure.
-
typedef int (*edhoc_ead_process_t)(void *user_context, enum edhoc_message message, const struct edhoc_ead_token *ead_token, size_t ead_token_size)¶
Process received external authorization data (EAD) tokens.
Called by the library during message processing to deliver received EAD items to the application for validation.
- Param user_context:
[in] User context.
- Param message:
EDHOC message number (EAD_1, EAD_2, EAD_3, or EAD_4).
- Param ead_token:
[in] Array containing the received EAD tokens.
- Param ead_token_size:
Number of entries in the
ead_tokenarray.- Retval EDHOC_SUCCESS:
Success.
- Return:
Negative error code on failure.
Enums
-
struct edhoc_ead_token¶
- #include <edhoc_ead.h>
RFC 9528: 3.8. External Authorization Data (EAD).
-
struct edhoc_ead¶
- #include <edhoc_ead.h>
Bind structure for EAD operations.
Public Members
-
edhoc_ead_compose_t compose¶
External authorization data compose callback.
-
edhoc_ead_process_t process¶
External authorization data process callback.
-
edhoc_ead_compose_t compose¶
-
typedef int (*edhoc_ead_compose_t)(void *user_context, enum edhoc_message message, struct edhoc_ead_token *ead_token, size_t ead_token_size, size_t *ead_token_len)¶