@@ -43,7 +43,7 @@ typedef struct {
4343
4444/* Set UID Response */
4545typedef struct {
46- uint32_t rc ;
46+ int32_t rc ;
4747 uint8_t WH_PAD [4 ];
4848} whMessageShe_SetUidResponse ;
4949
@@ -64,8 +64,8 @@ typedef struct {
6464
6565/* Secure Boot Init Response */
6666typedef struct {
67- uint32_t rc ;
68- uint32_t status ;
67+ int32_t rc ;
68+ int32_t status ;
6969} whMessageShe_SecureBootInitResponse ;
7070
7171/* Secure Boot Init translation functions */
@@ -88,8 +88,8 @@ typedef struct {
8888
8989/* Secure Boot Update Response */
9090typedef struct {
91- uint32_t rc ;
92- uint32_t status ;
91+ int32_t rc ;
92+ int32_t status ;
9393} whMessageShe_SecureBootUpdateResponse ;
9494
9595/* Secure Boot Update translation functions */
@@ -103,8 +103,8 @@ int wh_MessageShe_TranslateSecureBootUpdateResponse(
103103
104104/* Secure Boot Finish Response */
105105typedef struct {
106- uint32_t rc ;
107- uint32_t status ;
106+ int32_t rc ;
107+ int32_t status ;
108108} whMessageShe_SecureBootFinishResponse ;
109109
110110/* Secure Boot Finish translation function */
@@ -114,7 +114,7 @@ int wh_MessageShe_TranslateSecureBootFinishResponse(
114114
115115/* Get Status Response */
116116typedef struct {
117- uint32_t rc ;
117+ int32_t rc ;
118118 uint8_t sreg ;
119119 uint8_t WH_PAD [7 ];
120120} whMessageShe_GetStatusResponse ;
@@ -133,7 +133,7 @@ typedef struct {
133133
134134/* Load Key Response */
135135typedef struct {
136- uint32_t rc ;
136+ int32_t rc ;
137137 uint8_t messageFour [WH_SHE_M4_SZ ];
138138 uint8_t messageFive [WH_SHE_M5_SZ ];
139139} whMessageShe_LoadKeyResponse ;
@@ -154,7 +154,7 @@ typedef struct {
154154
155155/* Load Plain Key Response */
156156typedef struct {
157- uint32_t rc ;
157+ int32_t rc ;
158158} whMessageShe_LoadPlainKeyResponse ;
159159
160160/* Load Plain Key translation function */
@@ -168,7 +168,7 @@ int wh_MessageShe_TranslateLoadPlainKeyResponse(
168168
169169/* Export RAM Key Response */
170170typedef struct {
171- uint32_t rc ;
171+ int32_t rc ;
172172 uint8_t messageOne [WH_SHE_M1_SZ ];
173173 uint8_t messageTwo [WH_SHE_M2_SZ ];
174174 uint8_t messageThree [WH_SHE_M3_SZ ];
@@ -183,8 +183,8 @@ int wh_MessageShe_TranslateExportRamKeyResponse(
183183
184184/* Init RNG Response */
185185typedef struct {
186- uint32_t rc ;
187- uint32_t status ;
186+ int32_t rc ;
187+ int32_t status ;
188188} whMessageShe_InitRngResponse ;
189189
190190/* Init RNG translation function */
@@ -194,7 +194,7 @@ int wh_MessageShe_TranslateInitRngResponse(
194194
195195/* RND Response */
196196typedef struct {
197- uint32_t rc ;
197+ int32_t rc ;
198198 uint8_t rnd [WH_SHE_KEY_SZ ];
199199} whMessageShe_RndResponse ;
200200
@@ -210,8 +210,8 @@ typedef struct {
210210
211211/* Extend Seed Response */
212212typedef struct {
213- uint32_t rc ;
214- uint32_t status ;
213+ int32_t rc ;
214+ int32_t status ;
215215} whMessageShe_ExtendSeedResponse ;
216216
217217/* Extend Seed translation functions */
@@ -235,7 +235,7 @@ typedef struct {
235235
236236/* Encrypt ECB Response */
237237typedef struct {
238- uint32_t rc ;
238+ int32_t rc ;
239239 uint32_t sz ;
240240 /* Data follows:
241241 * uint8_t out[sz]
@@ -264,7 +264,7 @@ typedef struct {
264264
265265/* Encrypt CBC Response */
266266typedef struct {
267- uint32_t rc ;
267+ int32_t rc ;
268268 uint32_t sz ;
269269 /* Data follows:
270270 * uint8_t out[sz]
@@ -292,7 +292,7 @@ typedef struct {
292292
293293/* Decrypt ECB Response */
294294typedef struct {
295- uint32_t rc ;
295+ int32_t rc ;
296296 uint32_t sz ;
297297 /* Data follows:
298298 * uint8_t out[sz]
@@ -321,7 +321,7 @@ typedef struct {
321321
322322/* Decrypt CBC Response */
323323typedef struct {
324- uint32_t rc ;
324+ int32_t rc ;
325325 uint32_t sz ;
326326 /* Data follows:
327327 * uint8_t out[sz]
@@ -348,7 +348,7 @@ typedef struct {
348348
349349/* Generate MAC Response */
350350typedef struct {
351- uint32_t rc ;
351+ int32_t rc ;
352352 uint8_t mac [WH_SHE_KEY_SZ ];
353353} whMessageShe_GenMacResponse ;
354354
@@ -375,8 +375,8 @@ typedef struct {
375375
376376/* Verify MAC Response */
377377typedef struct {
378- uint32_t rc ;
379- uint8_t status ;
378+ int32_t rc ;
379+ int8_t status ;
380380 uint8_t WH_PAD [7 ];
381381} whMessageShe_VerifyMacResponse ;
382382
@@ -391,4 +391,4 @@ int wh_MessageShe_TranslateVerifyMacResponse(
391391
392392#endif /* WOLFHSM_CFG_SHE_EXTENSION */
393393
394- #endif /* !WOLFHSM_WH_MESSAGE_SHE_H_ */
394+ #endif /* !WOLFHSM_WH_MESSAGE_SHE_H_ */
0 commit comments