Skip to content

Commit b0b804d

Browse files
author
Mika Leppänen
committed
Corrected security protocol data alignment
1 parent 439e051 commit b0b804d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

source/Security/protocols/sec_prot.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ typedef sec_prot_t *sec_prot_by_type_get(sec_prot_t *prot, uint8_t type);
217217
*/
218218
typedef void sec_prot_receive_disable(sec_prot_t *prot);
219219

220+
typedef struct sec_prot_int_data_s sec_prot_int_data_t;
221+
220222
// Security protocol data
221223
struct sec_prot_s {
222224
sec_prot_create_request *create_req; /**< Create request */
@@ -246,7 +248,7 @@ struct sec_prot_s {
246248

247249
sec_prot_keys_t *sec_keys; /**< Security keys storage pointer */
248250
uint8_t header_size; /**< Header size */
249-
uint8_t data; /**< Protocol internal data */
251+
sec_prot_int_data_t *data; /**< Protocol internal data */
250252
};
251253

252254
#endif /* SEC_PROT_H_ */

source/Security/protocols/tls_sec_prot/tls_sec_prot.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ typedef enum {
5454
TLS_STATE_FINISHED = SEC_STATE_FINISHED
5555
} eap_tls_sec_prot_state_e;
5656

57+
typedef struct tls_sec_prot_lib_int_s tls_sec_prot_lib_int_t;
58+
5759
typedef struct {
5860
sec_prot_common_t common; /**< Common data */
5961
uint8_t new_pmk[PMK_LEN]; /**< New Pair Wise Master Key */
@@ -64,7 +66,7 @@ typedef struct {
6466
bool timer_running; /**< TLS timer running */
6567
bool finished; /**< TLS finished */
6668
bool calculating; /**< TLS is calculating */
67-
uint8_t tls_sec_inst; /**< TLS security library storage, SHALL BE THE LAST FIELD */
69+
tls_sec_prot_lib_int_t *tls_sec_inst; /**< TLS security library storage, SHALL BE THE LAST FIELD */
6870
} tls_sec_prot_int_t;
6971

7072
static uint16_t tls_sec_prot_size(void);

0 commit comments

Comments
 (0)