@@ -166,13 +166,17 @@ typedef struct ATCA_PACKED atcacert_cert_element_s
166166 atcacert_transform_t transforms [ATCA_MAX_TRANSFORMS ]; //!< List of transforms from device to cert for this element.
167167} atcacert_cert_element_t ;
168168
169+ #ifndef ATCA_NO_PRAGMA_PACK
170+ #pragma pack(pop)
171+ #endif
172+
169173/**
170174 * Defines a certificate and all the pieces to work with it.
171175 *
172176 * If any of the standard certificate elements (std_cert_elements) are not a part of the certificate
173177 * definition, set their count to 0 to indicate their absence.
174178 */
175- typedef struct ATCA_PACKED atcacert_def_s
179+ typedef struct atcacert_def_s
176180{
177181 atcacert_cert_type_t type ; //!< Certificate type.
178182 uint8_t template_id ; //!< ID for the this certificate definition (4-bit value).
@@ -198,7 +202,7 @@ typedef struct ATCA_PACKED atcacert_def_s
198202 * Tracks the state of a certificate as it's being rebuilt from device information.
199203 */
200204
201- typedef struct ATCA_PACKED atcacert_build_state_s
205+ typedef struct atcacert_build_state_s
202206{
203207 const atcacert_def_t * cert_def ; //!< Certificate definition for the certificate being rebuilt.
204208 uint8_t * cert ; //!< Buffer to contain the rebuilt certificate.
@@ -208,10 +212,6 @@ typedef struct ATCA_PACKED atcacert_build_state_s
208212 uint8_t device_sn [9 ]; //!< Storage for the device SN, when it's found.
209213} atcacert_build_state_t ;
210214
211- #ifndef ATCA_NO_PRAGMA_PACK
212- #pragma pack(pop)
213- #endif
214-
215215// Inform function naming when compiling in C++
216216#ifdef __cplusplus
217217extern "C" {
0 commit comments