mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-08-21 17:53:25 +02:00
PR feedback: add missing strings and precompiler checks
This commit is contained in:
@@ -160,6 +160,8 @@ static const char* GetPkTypeStr(int pk)
|
||||
case WC_PK_TYPE_EC_CHECK_PUB_KEY: return "ECC CheckPubKey";
|
||||
case WC_PK_TYPE_ED25519_MAKE_PUB: return "ED25519 MakePub";
|
||||
case WC_PK_TYPE_ED25519_CHECK_KEY: return "ED25519 CheckKey";
|
||||
case WC_PK_TYPE_CURVE25519_MAKE_PUB: return "CURVE25519 MakePub";
|
||||
case WC_PK_TYPE_CURVE25519_GENERIC: return "CURVE25519 Generic";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ int wc_curve25519_make_pub(int public_size, byte* pub, int private_size,
|
||||
const byte* priv)
|
||||
{
|
||||
int ret;
|
||||
#ifdef FREESCALE_LTC_ECC
|
||||
#if defined(FREESCALE_LTC_ECC) && !defined(WOLF_CRYPTO_CB_ONLY_CURVE25519)
|
||||
const ECPoint* basepoint = nxp_ltc_curve25519_GetBasePoint();
|
||||
ECPoint wc_pub;
|
||||
#endif
|
||||
@@ -332,7 +332,7 @@ int wc_curve25519_make_pub_blind(int public_size, byte* pub, int private_size,
|
||||
const byte* priv, WC_RNG* rng)
|
||||
{
|
||||
int ret;
|
||||
#ifdef FREESCALE_LTC_ECC
|
||||
#if defined(FREESCALE_LTC_ECC) && !defined(WOLF_CRYPTO_CB_ONLY_CURVE25519)
|
||||
const ECPoint* basepoint = nxp_ltc_curve25519_GetBasePoint();
|
||||
ECPoint wc_pub;
|
||||
#endif
|
||||
@@ -363,6 +363,8 @@ int wc_curve25519_make_pub_blind(int public_size, byte* pub, int private_size,
|
||||
#endif
|
||||
|
||||
#ifdef WOLF_CRYPTO_CB_ONLY_CURVE25519
|
||||
/* the LTC path checks the rng, the callback path has no use for it */
|
||||
(void)rng;
|
||||
return NO_VALID_DEVID;
|
||||
#else
|
||||
#ifdef FREESCALE_LTC_ECC
|
||||
|
||||
@@ -23,9 +23,10 @@
|
||||
|
||||
/* Based from Daniel Beer's public domain work. */
|
||||
|
||||
/* under WOLF_CRYPTO_CB_ONLY_ED25519 the callback device does all Ed25519
|
||||
* field math, so Ed25519 alone no longer pulls this file in */
|
||||
#if defined(HAVE_CURVE25519) || \
|
||||
/* under WOLF_CRYPTO_CB_ONLY_ED25519 / WOLF_CRYPTO_CB_ONLY_CURVE25519 the
|
||||
* callback device does all the field math, so neither algorithm pulls this
|
||||
* file in on its own */
|
||||
#if (defined(HAVE_CURVE25519) && !defined(WOLF_CRYPTO_CB_ONLY_CURVE25519)) || \
|
||||
(defined(HAVE_ED25519) && !defined(WOLF_CRYPTO_CB_ONLY_ED25519))
|
||||
#if defined(CURVE25519_SMALL) || defined(ED25519_SMALL) /* use slower code that takes less memory */
|
||||
|
||||
|
||||
@@ -30,7 +30,8 @@
|
||||
* group math, so this file (and its large precomputed tables) compiles out
|
||||
* unless curve25519 also needs it */
|
||||
#if (defined(HAVE_ED25519) && !defined(WOLF_CRYPTO_CB_ONLY_ED25519)) || \
|
||||
defined(WOLFSSL_CURVE25519_USE_ED25519)
|
||||
(defined(WOLFSSL_CURVE25519_USE_ED25519) && \
|
||||
!defined(WOLF_CRYPTO_CB_ONLY_CURVE25519))
|
||||
#ifndef ED25519_SMALL /* run when not defined to use small memory math */
|
||||
|
||||
#include <wolfssl/wolfcrypt/ed25519.h>
|
||||
|
||||
Reference in New Issue
Block a user