From b07a372b522d6d9659c6f8ae530a364e331d140e Mon Sep 17 00:00:00 2001 From: Hideki Miyazaki Date: Wed, 30 Oct 2024 06:42:07 +0900 Subject: [PATCH] Fix spaces and tabs --- wolfcrypt/src/port/Renesas/renesas_common.c | 4 ++-- wolfcrypt/src/port/Renesas/renesas_tsip_rsa.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/wolfcrypt/src/port/Renesas/renesas_common.c b/wolfcrypt/src/port/Renesas/renesas_common.c index 3f3f9d50c6..0d40f49816 100644 --- a/wolfcrypt/src/port/Renesas/renesas_common.c +++ b/wolfcrypt/src/port/Renesas/renesas_common.c @@ -259,7 +259,7 @@ static int Renesas_cmn_CryptoDevCb(int devIdArg, wc_CryptoInfo* info, void* ctx) } else #endif if (info->pk.type == WC_PK_TYPE_RSA && - (info->pk.rsa.type == RSA_PRIVATE_DECRYPT || + (info->pk.rsa.type == RSA_PRIVATE_DECRYPT || info->pk.rsa.type == RSA_PUBLIC_ENCRYPT)) { /* rsa public encrypt/private decrypt */ ret = wc_tsip_RsaFunction(info, cbInfo); @@ -275,7 +275,7 @@ static int Renesas_cmn_CryptoDevCb(int devIdArg, wc_CryptoInfo* info, void* ctx) #if defined(WOLFSSL_RENESAS_TSIP_CRYPTONLY) /* RSA Verify */ else if (info->pk.type == WC_PK_TYPE_RSA && - info->pk.rsa.type == RSA_PUBLIC_DECRYPT) { + info->pk.rsa.type == RSA_PUBLIC_DECRYPT) { ret = wc_tsip_RsaVerifyPkcs(info, cbInfo); } #endif diff --git a/wolfcrypt/src/port/Renesas/renesas_tsip_rsa.c b/wolfcrypt/src/port/Renesas/renesas_tsip_rsa.c index 3e1ada5d90..77fc4b0a1a 100644 --- a/wolfcrypt/src/port/Renesas/renesas_tsip_rsa.c +++ b/wolfcrypt/src/port/Renesas/renesas_tsip_rsa.c @@ -235,7 +235,7 @@ WOLFSSL_LOCAL int wc_tsip_RsaFunction(wc_CryptoInfo* info, TsipUserCtx* tuc) plain.data_length = info->pk.rsa.inLen; cipher.pdata = (uint8_t*)info->pk.rsa.out; cipher.data_length = info->pk.rsa.outLen; - + if (keySize == TSIP_KEY_TYPE_RSA1024) { ret = R_TSIP_RsaesPkcs1024Encrypt(&plain, &cipher, tuc->rsa1024pub_keyIdx); @@ -246,7 +246,7 @@ WOLFSSL_LOCAL int wc_tsip_RsaFunction(wc_CryptoInfo* info, TsipUserCtx* tuc) } else { WOLFSSL_MSG("keySize is invalid, neither 128 or 256 bytes, " - "1024 or 2048 bits."); + "1024 or 2048 bits."); return BAD_FUNC_ARG; } } @@ -255,7 +255,7 @@ WOLFSSL_LOCAL int wc_tsip_RsaFunction(wc_CryptoInfo* info, TsipUserCtx* tuc) plain.data_length = info->pk.rsa.outLen; cipher.pdata = (uint8_t*)info->pk.rsa.in; cipher.data_length = info->pk.rsa.inLen; - + if (keySize == TSIP_KEY_TYPE_RSA1024) { ret = R_TSIP_RsaesPkcs1024Decrypt(&cipher, &plain, tuc->rsa1024pri_keyIdx); @@ -266,7 +266,7 @@ WOLFSSL_LOCAL int wc_tsip_RsaFunction(wc_CryptoInfo* info, TsipUserCtx* tuc) } else { WOLFSSL_MSG("keySize is invalid, neither 128 or 256 bytes, " - "1024 or 2048 bits."); + "1024 or 2048 bits."); return BAD_FUNC_ARG; } }