Skip to content

Commit 4fd629d

Browse files
committed
fix white spaces and overlong lines
1 parent 35f6099 commit 4fd629d

5 files changed

Lines changed: 27 additions & 17 deletions

File tree

wolfcrypt/src/port/Renesas/renesas_common.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@
2121

2222
#include <wolfssl/wolfcrypt/settings.h>
2323

24-
#if defined(WOLFSSL_RENESAS_SCEPROTECT) || defined(WOLFSSL_RENESAS_SCEPROTECT_CRYPTONLY) \
24+
#if defined(WOLFSSL_RENESAS_SCEPROTECT)
25+
|| defined(WOLFSSL_RENESAS_SCEPROTECT_CRYPTONLY) \
2526
|| defined(WOLFSSL_RENESAS_TSIP_TLS)
2627

27-
#if defined(WOLFSSL_RENESAS_SCEPROTECT) || defined(WOLFSSL_RENESAS_SCEPROTECT_CRYPTONLY)
28+
#if defined(WOLFSSL_RENESAS_SCEPROTECT) || \
29+
defined(WOLFSSL_RENESAS_SCEPROTECT_CRYPTONLY)
2830
#include <wolfssl/wolfcrypt/port/Renesas/renesas-sce-crypt.h>
2931
#define cmn_hw_lock wc_sce_hw_lock
3032
#define cmn_hw_unlock wc_sce_hw_unlock
@@ -349,8 +351,8 @@ static int Renesas_cmn_CryptoDevCb(int devIdArg, wc_CryptoInfo* info, void* ctx)
349351
sizeof(sce_aes_wrapped_key_t));
350352
info->cipher.aescbc.aes->ctx.keySize = 32;
351353

352-
} else if (cbInfo->flags2.bits.aes128_installedkey_set == 1 &&
353-
info->cipher.aescbc.aes->keylen == 16) {
354+
} else if (cbInfo->flags2.bits.aes128_installedkey_set
355+
== 1 && info->cipher.aescbc.aes->keylen == 16) {
354356
XMEMCPY(&info->cipher.aescbc.aes->ctx.sce_wrapped_key,
355357
&cbInfo->sce_wrapped_key_aes128,
356358
sizeof(sce_aes_wrapped_key_t));
@@ -454,7 +456,8 @@ int wc_CryptoCb_CryptInitRenesasCmn(WOLFSSL* ssl, void* ctx)
454456

455457
#if defined(WOLFSSL_RENESAS_TSIP_TLS)
456458
TsipUserCtx* cbInfo = (TsipUserCtx*)ctx;
457-
#elif defined(WOLFSSL_RENESAS_SCEPROTECT) || defined(WOLFSSL_RENESAS_SCEPROTECT_CRYPTONLY)
459+
#elif defined(WOLFSSL_RENESAS_SCEPROTECT) || \
460+
defined(WOLFSSL_RENESAS_SCEPROTECT_CRYPTONLY)
458461
User_SCEPKCbInfo* cbInfo = (User_SCEPKCbInfo*)ctx;
459462
#endif
460463

wolfcrypt/src/port/Renesas/renesas_sce_util.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
*/
2121
#include <wolfssl/wolfcrypt/settings.h>
2222

23-
#if defined(WOLFSSL_RENESAS_SCEPROTECT) || defined(WOLFSSL_RENESAS_SCEPROTECT_CRYPTONLY)
23+
#if defined(WOLFSSL_RENESAS_SCEPROTECT) || \
24+
defined(WOLFSSL_RENESAS_SCEPROTECT_CRYPTONLY)
2425

2526
#include <wolfssl/wolfcrypt/wc_port.h>
2627
#include <wolfssl/wolfcrypt/error-crypt.h>

wolfcrypt/src/rsa.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3374,20 +3374,21 @@ static int RsaPublicEncryptEx(const byte* in, word32 inLen, byte* out,
33743374
labelSz, sz);
33753375
}
33763376
#elif defined(WOLFSSL_RENESAS_SCEPROTECT_CRYPTONLY)
3377-
/* SCE needs warpped key which is passed via
3377+
/* SCE needs warpped key which is passed via
33783378
* user ctx object of crypt-call back.
33793379
*/
33803380
#ifdef WOLF_CRYPTO_CB
33813381
if (key->devId != INVALID_DEVID) {
33823382
/* SCE supports 1024 and 2048 bits */
3383-
ret = wc_CryptoCb_Rsa(in, inLen, out, outLen, rsa_type, key, rng);
3383+
ret = wc_CryptoCb_Rsa(in, inLen, out,
3384+
outLen, rsa_type, key, rng);
33843385
if (ret != CRYPTOCB_UNAVAILABLE)
33853386
return ret;
33863387
/* fall-through when unavailable */
33873388
ret = 0; /* reset error code and try using software */
33883389
}
33893390
#endif
3390-
3391+
33913392
#endif /* WOLFSSL_SE050 */
33923393

33933394
key->state = RSA_STATE_ENCRYPT_PAD;
@@ -3535,14 +3536,15 @@ static int RsaPrivateDecryptEx(const byte* in, word32 inLen, byte* out,
35353536
#elif defined(WOLFSSL_RENESAS_SCEPROTECT_CRYPTONLY)
35363537
#ifdef WOLF_CRYPTO_CB
35373538
if (key->devId != INVALID_DEVID) {
3538-
ret = wc_CryptoCb_Rsa(in, inLen, out, outLen, rsa_type, key, rng);
3539+
ret = wc_CryptoCb_Rsa(in, inLen, out,
3540+
outLen, rsa_type, key, rng);
35393541
if (ret != CRYPTOCB_UNAVAILABLE)
35403542
return ret;
35413543
/* fall-through when unavailable */
35423544
ret = 0; /* reset error code and try using software */
35433545
}
35443546
#endif
3545-
3547+
35463548
#endif /* WOLFSSL_CRYPTOCELL */
35473549

35483550

wolfcrypt/src/sha256.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ on the specific device platform.
214214
(!defined(WOLFSSL_RENESAS_TSIP_CRYPT) || defined(NO_WOLFSSL_RENESAS_TSIP_CRYPT_HASH)) && \
215215
!defined(WOLFSSL_PSOC6_CRYPTO) && !defined(WOLFSSL_IMXRT_DCP) && !defined(WOLFSSL_SILABS_SE_ACCEL) && \
216216
!defined(WOLFSSL_KCAPI_HASH) && !defined(WOLFSSL_SE050_HASH) && \
217-
((!defined(WOLFSSL_RENESAS_SCEPROTECT) && !defined(WOLFSSL_RENESAS_SCEPROTECT_CRYPTONLY)) \
217+
((!defined(WOLFSSL_RENESAS_SCEPROTECT) && \
218+
!defined(WOLFSSL_RENESAS_SCEPROTECT_CRYPTONLY)) \
218219
|| defined(NO_WOLFSSL_RENESAS_SCEPROTECT_HASH)) && \
219220
(!defined(WOLFSSL_HAVE_PSA) || defined(WOLFSSL_PSA_NO_HASH)) && \
220221
!defined(WOLFSSL_RENESAS_RX64_HASH)
@@ -797,7 +798,8 @@ static int InitSha256(wc_Sha256* sha256)
797798

798799
/* implemented in wolfcrypt/src/port/Renesas/renesas_tsip_sha.c */
799800

800-
#elif (defined(WOLFSSL_RENESAS_SCEPROTECT) || defined(WOLFSSL_RENESAS_SCEPROTECT_CRYPTONLY)) && \
801+
#elif (defined(WOLFSSL_RENESAS_SCEPROTECT) || \
802+
defined(WOLFSSL_RENESAS_SCEPROTECT_CRYPTONLY)) && \
801803
!defined(NO_WOLFSSL_RENESAS_SCEPROTECT_HASH)
802804

803805
/* implemented in wolfcrypt/src/port/Renesas/renesas_sce_sha.c */
@@ -1753,7 +1755,8 @@ void wc_Sha256Free(wc_Sha256* sha256)
17531755
(defined(WOLFSSL_DEVCRYPTO_HASH) && defined(WOLFSSL_DEVCRYPTO_HASH_KEEP)) || \
17541756
(defined(WOLFSSL_RENESAS_TSIP_CRYPT) && \
17551757
!defined(NO_WOLFSSL_RENESAS_TSIP_CRYPT_HASH)) || \
1756-
((defined(WOLFSSL_RENESAS_SCEPROTECT) || defined(WOLFSSL_RENESAS_SCEPROTECT_CRYPTONLY)) && \
1758+
((defined(WOLFSSL_RENESAS_SCEPROTECT) || \
1759+
defined(WOLFSSL_RENESAS_SCEPROTECT_CRYPTONLY)) && \
17571760
!defined(NO_WOLFSSL_RENESAS_SCEPROTECT_HASH)) || \
17581761
defined(WOLFSSL_RENESAS_RX64_HASH) || \
17591762
defined(WOLFSSL_HASH_KEEP)
@@ -1933,7 +1936,8 @@ int wc_Sha224_Grow(wc_Sha224* sha224, const byte* in, int inSz)
19331936

19341937
/* implemented in wolfcrypt/src/port/Renesas/renesas_tsip_sha.c */
19351938

1936-
#elif (defined(WOLFSSL_RENESAS_SCEPROTECT) || defined(WOLFSSL_RENESAS_SCEPROTECT_CRYPTONLY)) && \
1939+
#elif (defined(WOLFSSL_RENESAS_SCEPROTECT) || \
1940+
defined(WOLFSSL_RENESAS_SCEPROTECT_CRYPTONLY)) && \
19371941
!defined(NO_WOLFSSL_RENESAS_SCEPROTECT_HASH)
19381942

19391943
/* implemented in wolfcrypt/src/port/Renesas/renesas_sce_sha.c */

wolfcrypt/test/test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2960,13 +2960,13 @@ WOLFSSL_TEST_SUBROUTINE int sha256_test(void)
29602960
ret = wc_Sha256Update(&sha, (byte*)large_input,
29612961
(word32)sizeof(large_input));
29622962
if (ret != 0)
2963-
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), exit);
2963+
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), exit);
29642964
}
29652965
ret = wc_Sha256Final(&sha, hash);
29662966
if (ret != 0)
29672967
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), exit);
29682968
if (XMEMCMP(hash, large_digest, WC_SHA256_DIGEST_SIZE) != 0)
2969-
ERROR_OUT(WC_TEST_RET_ENC_NC, exit);
2969+
ERROR_OUT(WC_TEST_RET_ENC_NC, exit);
29702970
} /* END LARGE HASH TEST */
29712971
#endif /* NO_LARGE_HASH_TEST */
29722972

0 commit comments

Comments
 (0)