Skip to content

Commit 6370a35

Browse files
committed
Correct typos and code alignment
1 parent 9d5d60b commit 6370a35

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

features/mbedtls/targets/TARGET_NUVOTON/TARGET_M480/sha/sha512_alt.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,8 @@ MBEDTLS_DEPRECATED void mbedtls_sha512_finish( mbedtls_sha512_context *ctx,
153153
* \param ctx The SHA-512 context.
154154
* \param data The buffer holding one block of data.
155155
*/
156-
MBEDTLS_DEPRECATED void mbedtls_sha512_process(
157-
mbedtls_sha512_context *ctx,
158-
const unsigned char data[128] );
156+
MBEDTLS_DEPRECATED void mbedtls_sha512_process( mbedtls_sha512_context *ctx,
157+
const unsigned char data[128] );
159158

160159
#undef MBEDTLS_DEPRECATED
161160
#endif /* !MBEDTLS_DEPRECATED_REMOVED */

features/mbedtls/targets/TARGET_STM/md5_alt.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ int mbedtls_md5_starts_ret( mbedtls_md5_context *ctx )
105105
return MBEDTLS_ERR_MD5_HW_ACCEL_FAILED;
106106
}
107107
if (st_md5_save_hw_context(ctx) != 1) {
108-
// Return HASH_BUSY timout error here
108+
// Return HASH_BUSY timeout error here
109109
return MBEDTLS_ERR_MD5_HW_ACCEL_FAILED;
110110
}
111111

@@ -115,14 +115,14 @@ int mbedtls_md5_starts_ret( mbedtls_md5_context *ctx )
115115
int mbedtls_internal_md5_process( mbedtls_md5_context *ctx, const unsigned char data[ST_MD5_BLOCK_SIZE] )
116116
{
117117
if (st_md5_restore_hw_context(ctx) != 1) {
118-
// Return HASH_BUSY timout error here
118+
// Return HASH_BUSY timeout error here
119119
return MBEDTLS_ERR_MD5_HW_ACCEL_FAILED;
120120
}
121121
if (HAL_HASH_MD5_Accumulate(&ctx->hhash_md5, (uint8_t *)data, ST_MD5_BLOCK_SIZE) != 0) {
122122
return MBEDTLS_ERR_MD5_HW_ACCEL_FAILED;
123123
}
124124
if (st_md5_save_hw_context(ctx) != 1) {
125-
// Return HASH_BUSY timout error here
125+
// Return HASH_BUSY timeout error here
126126
return MBEDTLS_ERR_MD5_HW_ACCEL_FAILED;
127127
}
128128
return 0;
@@ -135,7 +135,7 @@ int mbedtls_md5_update_ret( mbedtls_md5_context *ctx, const unsigned char *input
135135
/* If ilen = 0 : do nothing */
136136
if (currentlen != 0) {
137137
if (st_md5_restore_hw_context(ctx) != 1) {
138-
// Return HASH_BUSY timout error here
138+
// Return HASH_BUSY timeout error here
139139
return MBEDTLS_ERR_MD5_HW_ACCEL_FAILED;
140140
}
141141

@@ -167,7 +167,7 @@ int mbedtls_md5_update_ret( mbedtls_md5_context *ctx, const unsigned char *input
167167
}
168168

169169
if (st_md5_save_hw_context(ctx) != 1) {
170-
// Return HASH_BUSY timout error here
170+
// Return HASH_BUSY timeout error here
171171
return MBEDTLS_ERR_MD5_HW_ACCEL_FAILED;
172172
}
173173
}
@@ -177,7 +177,7 @@ int mbedtls_md5_update_ret( mbedtls_md5_context *ctx, const unsigned char *input
177177
int mbedtls_md5_finish_ret( mbedtls_md5_context *ctx, unsigned char output[16] )
178178
{
179179
if (st_md5_restore_hw_context(ctx) != 1) {
180-
// Return HASH_BUSY timout error here
180+
// Return HASH_BUSY timeout error here
181181
return MBEDTLS_ERR_MD5_HW_ACCEL_FAILED;
182182
}
183183
/* Last accumulation for extra bytes in sbuf_len */
@@ -194,7 +194,7 @@ int mbedtls_md5_finish_ret( mbedtls_md5_context *ctx, unsigned char output[16] )
194194
return MBEDTLS_ERR_MD5_HW_ACCEL_FAILED;
195195
}
196196
if (st_md5_save_hw_context(ctx) != 1) {
197-
// Return HASH_BUSY timout error here
197+
// Return HASH_BUSY timeout error here
198198
return MBEDTLS_ERR_MD5_HW_ACCEL_FAILED;
199199
}
200200
return 0;

features/mbedtls/targets/TARGET_STM/sha256_alt.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ int mbedtls_sha256_starts_ret( mbedtls_sha256_context *ctx, int is224 )
114114
int mbedtls_internal_sha256_process( mbedtls_sha256_context *ctx, const unsigned char data[ST_SHA256_BLOCK_SIZE] )
115115
{
116116
if (st_sha256_restore_hw_context(ctx) != 1) {
117-
// Return HASH_BUSY timout error here
117+
// Return HASH_BUSY timeout error here
118118
return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED;
119119
}
120120
if (ctx->is224 == 0) {
@@ -128,7 +128,7 @@ int mbedtls_internal_sha256_process( mbedtls_sha256_context *ctx, const unsigned
128128
}
129129

130130
if (st_sha256_save_hw_context(ctx) != 1) {
131-
// Return HASH_BUSY timout error here
131+
// Return HASH_BUSY timeout error here
132132
return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED;
133133
}
134134
return 0;
@@ -139,7 +139,7 @@ int mbedtls_sha256_update_ret( mbedtls_sha256_context *ctx, const unsigned char
139139
int err;
140140
size_t currentlen = ilen;
141141
if (st_sha256_restore_hw_context(ctx) != 1) {
142-
// Return HASH_BUSY timout error here
142+
// Return HASH_BUSY timeout error here
143143
return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED;
144144
}
145145

@@ -187,7 +187,7 @@ int mbedtls_sha256_update_ret( mbedtls_sha256_context *ctx, const unsigned char
187187
}
188188
}
189189
if (st_sha256_save_hw_context(ctx) != 1) {
190-
// Return HASH_BUSY timout error here
190+
// Return HASH_BUSY timeout error here
191191
return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED;
192192
}
193193
return 0;
@@ -196,7 +196,7 @@ int mbedtls_sha256_update_ret( mbedtls_sha256_context *ctx, const unsigned char
196196
int mbedtls_sha256_finish_ret( mbedtls_sha256_context *ctx, unsigned char output[32] )
197197
{
198198
if (st_sha256_restore_hw_context(ctx) != 1) {
199-
// Return HASH_BUSY timout error here
199+
// Return HASH_BUSY timeout error here
200200
return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED;
201201
}
202202
/* Last accumulation for extra bytes in sbuf_len */
@@ -225,7 +225,7 @@ int mbedtls_sha256_finish_ret( mbedtls_sha256_context *ctx, unsigned char output
225225
}
226226
}
227227
if (st_sha256_save_hw_context(ctx) != 1) {
228-
// Return HASH_BUSY timout error here
228+
// Return HASH_BUSY timeout error here
229229
return MBEDTLS_ERR_SHA256_HW_ACCEL_FAILED;
230230
}
231231
return 0;

0 commit comments

Comments
 (0)