Skip to content

Commit 08fd157

Browse files
committed
Removed TABs from the ALT source files
1 parent cdbf30d commit 08fd157

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/aes_alt.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ static int aes_set_keys( mbedtls_aes_context *ctx, const unsigned char *key,
104104
unsigned int keybits )
105105
{
106106
int ret = 0;
107-
cy_en_crypto_aes_key_length_t key_length;
108-
cy_en_crypto_status_t status;
107+
cy_en_crypto_aes_key_length_t key_length;
108+
cy_en_crypto_status_t status;
109109

110110
AES_VALIDATE( ctx != NULL );
111111

@@ -121,8 +121,8 @@ static int aes_set_keys( mbedtls_aes_context *ctx, const unsigned char *key,
121121

122122
if (CY_CRYPTO_SUCCESS != status)
123123
{
124-
ret = MBEDTLS_ERR_AES_HW_ACCEL_FAILED;
125-
goto exit;
124+
ret = MBEDTLS_ERR_AES_HW_ACCEL_FAILED;
125+
goto exit;
126126
}
127127

128128
exit:
@@ -247,7 +247,7 @@ int mbedtls_internal_aes_encrypt( mbedtls_aes_context *ctx,
247247

248248
if (CY_CRYPTO_SUCCESS != status)
249249
{
250-
ret = MBEDTLS_ERR_AES_HW_ACCEL_FAILED;
250+
ret = MBEDTLS_ERR_AES_HW_ACCEL_FAILED;
251251
}
252252

253253
return( ret );
@@ -279,7 +279,7 @@ int mbedtls_internal_aes_decrypt( mbedtls_aes_context *ctx,
279279

280280
if (CY_CRYPTO_SUCCESS != status)
281281
{
282-
ret = MBEDTLS_ERR_AES_HW_ACCEL_FAILED;
282+
ret = MBEDTLS_ERR_AES_HW_ACCEL_FAILED;
283283
}
284284

285285
return( ret );

features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/crypto_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ int cy_hw_sha_process(cy_hw_crypto_t *obj, cy_stc_crypto_sha_state_t *hashState,
152152
{
153153
cy_en_crypto_status_t status;
154154

155-
status = Cy_Crypto_Core_Sha_Update(obj->base, hashState, in, hashState->blockSize);
155+
status = Cy_Crypto_Core_Sha_Update(obj->base, hashState, in, hashState->blockSize);
156156
if (CY_CRYPTO_SUCCESS != status)
157157
return (-1);
158158

features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/crypto_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ int cy_hw_sha_start (cy_hw_crypto_t *obj, cy_stc_crypto_sha_state_t *hashState,
5959
cy_en_crypto_sha_mode_t shaMode, void *shaBuffers);
6060

6161
int cy_hw_sha_update(cy_hw_crypto_t *obj, cy_stc_crypto_sha_state_t *hashState,
62-
const uint8_t *in, uint32_t inlen);
62+
const uint8_t *in, uint32_t inlen);
6363

6464
int cy_hw_sha_finish(cy_hw_crypto_t *obj, cy_stc_crypto_sha_state_t *hashState,
6565
uint8_t *output);

features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/ecdsa_alt.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ int mbedtls_ecdsa_sign( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s,
8484
int (*f_rng)(void *, unsigned char *, size_t), void *p_rng )
8585
{
8686
int ret;
87-
size_t bytesize;
87+
size_t bytesize;
8888
uint8_t *sig = NULL;
8989
uint8_t *tmp_k = NULL;
9090
cy_hw_crypto_t crypto_obj;
@@ -113,11 +113,11 @@ int mbedtls_ecdsa_sign( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s,
113113
/* Reserve the crypto hardware for the operation */
114114
cy_hw_crypto_reserve(&crypto_obj, CYHAL_CRYPTO_VU);
115115

116-
dp = Cy_Crypto_Core_ECC_GetCurveParams(key.curveID);
116+
dp = Cy_Crypto_Core_ECC_GetCurveParams(key.curveID);
117117

118-
bytesize = CY_CRYPTO_BYTE_SIZE_OF_BITS(dp->size);
118+
bytesize = CY_CRYPTO_BYTE_SIZE_OF_BITS(dp->size);
119119

120-
key.k = malloc(bytesize);
120+
key.k = malloc(bytesize);
121121
MBEDTLS_MPI_CHK((key.k == NULL) ? MBEDTLS_ERR_ECP_ALLOC_FAILED : 0);
122122

123123
MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( d, key.k, bytesize ) );
@@ -149,12 +149,12 @@ int mbedtls_ecdsa_sign( mbedtls_ecp_group *grp, mbedtls_mpi *r, mbedtls_mpi *s,
149149
if (key.k != NULL)
150150
{
151151
mbedtls_platform_zeroize(key.k, bytesize);
152-
free(key.k);
152+
free(key.k);
153153
}
154154
if (sig != NULL)
155155
{
156156
mbedtls_platform_zeroize(sig, 2 * bytesize);
157-
free(sig);
157+
free(sig);
158158
}
159159
if (tmp_k != NULL)
160160
{
@@ -176,9 +176,9 @@ int mbedtls_ecdsa_verify( mbedtls_ecp_group *grp,
176176
const mbedtls_ecp_point *Q, const mbedtls_mpi *r, const mbedtls_mpi *s)
177177
{
178178
int ret;
179-
uint8_t stat;
179+
uint8_t stat;
180180
size_t bytesize;
181-
size_t olen;
181+
size_t olen;
182182
uint8_t *sig = NULL;
183183
uint8_t *point_arr = NULL;
184184
cy_hw_crypto_t crypto_obj;
@@ -202,9 +202,9 @@ int mbedtls_ecdsa_verify( mbedtls_ecp_group *grp,
202202
/* Reserve the crypto hardware for the operation */
203203
cy_hw_crypto_reserve(&crypto_obj, CYHAL_CRYPTO_VU);
204204

205-
dp = Cy_Crypto_Core_ECC_GetCurveParams(key.curveID);
205+
dp = Cy_Crypto_Core_ECC_GetCurveParams(key.curveID);
206206

207-
bytesize = CY_CRYPTO_BYTE_SIZE_OF_BITS(dp->size);
207+
bytesize = CY_CRYPTO_BYTE_SIZE_OF_BITS(dp->size);
208208

209209
point_arr = malloc(2 * bytesize + 1u);
210210
MBEDTLS_MPI_CHK((point_arr == NULL) ? MBEDTLS_ERR_ECP_ALLOC_FAILED : 0);
@@ -237,12 +237,12 @@ int mbedtls_ecdsa_verify( mbedtls_ecp_group *grp,
237237
if (point_arr != NULL)
238238
{
239239
mbedtls_platform_zeroize(point_arr, 2 * bytesize + 1u);
240-
free(point_arr);
240+
free(point_arr);
241241
}
242242
if (sig != NULL)
243243
{
244244
mbedtls_platform_zeroize(sig, 2 * bytesize);
245-
free(sig);
245+
free(sig);
246246
}
247247

248248
return( ret );

features/mbedtls/targets/TARGET_Cypress/TARGET_PSOC6/ecp_alt.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1835,10 +1835,10 @@ static int ecp_mul_comb( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
18351835
MBEDTLS_MPI_CHK( mbedtls_mpi_grow(&R->Y, data_size) );
18361836

18371837
Cy_Crypto_Core_EC_NistP_PointMultiplication (crypto_obj.base,
1838-
curveId,
1839-
(uint8_t *)Pi.X.p, (uint8_t *)Pi.Y.p,
1840-
(uint8_t *)di.p,
1841-
(uint8_t *)R->X.p, (uint8_t *)R->Y.p);
1838+
curveId,
1839+
(uint8_t *)Pi.X.p, (uint8_t *)Pi.Y.p,
1840+
(uint8_t *)di.p,
1841+
(uint8_t *)R->X.p, (uint8_t *)R->Y.p);
18421842

18431843
/* R.Z coordinate should be 1 */
18441844
MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &R->Z, 1 ) );

0 commit comments

Comments
 (0)