Skip to content

Commit

Permalink
revert TSIP_KEY_TYPE as TSIP TLS definition
Browse files Browse the repository at this point in the history
  • Loading branch information
miyazakh committed Jan 31, 2025
1 parent 3f47963 commit 6555da9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
2 changes: 2 additions & 0 deletions wolfcrypt/src/port/Renesas/renesas_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,12 @@ static int Renesas_cmn_CryptoDevCb(int devIdArg, wc_CryptoInfo* info, void* ctx)
*info->pk.rsa_get_size.keySize = 256;
ret = 0;
}
#ifdef WOLFSSL_RENESAS_TSIP_CRYPTONLY
else if (cbInfo->wrappedKeyType == TSIP_KEY_TYPE_RSA1024) {
*info->pk.rsa_get_size.keySize = 128;
ret = 0;
}
#endif
}
#endif /* !NO_RSA */
#if defined(HAVE_ECC)
Expand Down
12 changes: 6 additions & 6 deletions wolfssl/wolfcrypt/port/Renesas/renesas-tsip-crypt.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ enum {

typedef enum {
#ifdef WOLFSSL_RENESAS_TSIP_CRYPTONLY
TSIP_KEY_TYPE_RSA1024 = 1, /* TSIP_RSA1024 */
TSIP_KEY_TYPE_RSA1024 = 1, /* RSA 1024 */
#endif
TSIP_KEY_TYPE_RSA2048 = 2, /* TSIP_RSA2048 */
TSIP_KEY_TYPE_RSA3072 = 3, /* TSIP_RSA3072 */
TSIP_KEY_TYPE_RSA4096 = 4, /* TSIP_RSA4096 */
TSIP_KEY_TYPE_ECDSAP256 = 5, /* TSIP_ECCP256 */
TSIP_KEY_TYPE_ECDSAP384 = 6, /* TSIP_ECCP384 */
TSIP_KEY_TYPE_RSA2048 = 2, /* RSA 2048 */
TSIP_KEY_TYPE_RSA3072 = 3, /* RSA 3072 */
TSIP_KEY_TYPE_RSA4096 = 4, /* RSA 4096 */
TSIP_KEY_TYPE_ECDSAP256 = 5, /* ECC P256 */
TSIP_KEY_TYPE_ECDSAP384 = 6, /* ECC P384 */
} wolfssl_TSIP_KEY_TYPE;


Expand Down
14 changes: 7 additions & 7 deletions wolfssl/wolfcrypt/port/Renesas/renesas_tsip_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ typedef wolfssl_TSIP_Hash wc_Sha256;

#endif /* !NO_SHA || !NO_SHA256 */

#if defined(WOLFSSL_RENESAS_TSIP_TLS)
#include "r_tsip_rx_if.h"

/* TSIP TLS KEY Definition */
typedef enum {
TSIP_RSA1024 = 1,
TSIP_RSA2048 = 2,
TSIP_RSA3072 = 3,
TSIP_RSA4096 = 4,
TSIP_ECCP256 = 5,
TSIP_ECCP384 = 6,
TSIP_RSA2048 = R_TSIP_TLS_PUBLIC_KEY_TYPE_RSA2048,
TSIP_RSA4096 = R_TSIP_TLS_PUBLIC_KEY_TYPE_RSA4096,
TSIP_ECCP256 = R_TSIP_TLS_PUBLIC_KEY_TYPE_ECDSA_P256,
} TSIP_KEY_TYPE;

#endif

#if defined(WOLFSSL_RENESAS_TSIP_TLS_AES_CRYPT) || \
defined(WOLFSSL_RENESAS_TSIP_CRYPTONLY)
Expand Down

0 comments on commit 6555da9

Please sign in to comment.