mirror of https://github.com/wolfSSL/wolfssl.git
Add build guards on the crypto callback ECC items.
parent
c7f6673e53
commit
111feedadc
|
@ -577,6 +577,7 @@ int wc_CryptoCb_RsaGetSize(const RsaKey* key, int* keySize)
|
|||
#endif /* !NO_RSA */
|
||||
|
||||
#ifdef HAVE_ECC
|
||||
#ifdef HAVE_ECC_DHE
|
||||
int wc_CryptoCb_MakeEccKey(WC_RNG* rng, int keySize, ecc_key* key, int curveId)
|
||||
{
|
||||
int ret = WC_NO_ERR_TRACE(CRYPTOCB_UNAVAILABLE);
|
||||
|
@ -629,7 +630,9 @@ int wc_CryptoCb_Ecdh(ecc_key* private_key, ecc_key* public_key,
|
|||
|
||||
return wc_CryptoCb_TranslateErrorCode(ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ECC_SIGN
|
||||
int wc_CryptoCb_EccSign(const byte* in, word32 inlen, byte* out,
|
||||
word32 *outlen, WC_RNG* rng, ecc_key* key)
|
||||
{
|
||||
|
@ -658,7 +661,9 @@ int wc_CryptoCb_EccSign(const byte* in, word32 inlen, byte* out,
|
|||
|
||||
return wc_CryptoCb_TranslateErrorCode(ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ECC_VERIFY
|
||||
int wc_CryptoCb_EccVerify(const byte* sig, word32 siglen,
|
||||
const byte* hash, word32 hashlen, int* res, ecc_key* key)
|
||||
{
|
||||
|
@ -687,7 +692,9 @@ int wc_CryptoCb_EccVerify(const byte* sig, word32 siglen,
|
|||
|
||||
return wc_CryptoCb_TranslateErrorCode(ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ECC_CHECK_KEY
|
||||
int wc_CryptoCb_EccCheckPrivKey(ecc_key* key, const byte* pubKey,
|
||||
word32 pubKeySz)
|
||||
{
|
||||
|
@ -713,6 +720,7 @@ int wc_CryptoCb_EccCheckPrivKey(ecc_key* key, const byte* pubKey,
|
|||
|
||||
return wc_CryptoCb_TranslateErrorCode(ret);
|
||||
}
|
||||
#endif
|
||||
#endif /* HAVE_ECC */
|
||||
|
||||
#ifdef HAVE_CURVE25519
|
||||
|
|
|
@ -176,6 +176,7 @@ typedef struct wc_CryptoInfo {
|
|||
} rsa_get_size;
|
||||
#endif
|
||||
#ifdef HAVE_ECC
|
||||
#ifdef HAVE_ECC_DHE
|
||||
struct {
|
||||
WC_RNG* rng;
|
||||
int size;
|
||||
|
@ -188,6 +189,8 @@ typedef struct wc_CryptoInfo {
|
|||
byte* out;
|
||||
word32* outlen;
|
||||
} ecdh;
|
||||
#endif
|
||||
#ifdef HAVE_ECC_SIGN
|
||||
struct {
|
||||
const byte* in;
|
||||
word32 inlen;
|
||||
|
@ -196,6 +199,8 @@ typedef struct wc_CryptoInfo {
|
|||
WC_RNG* rng;
|
||||
ecc_key* key;
|
||||
} eccsign;
|
||||
#endif
|
||||
#ifdef HAVE_ECC_VERIFY
|
||||
struct {
|
||||
const byte* sig;
|
||||
word32 siglen;
|
||||
|
@ -204,12 +209,15 @@ typedef struct wc_CryptoInfo {
|
|||
int* res;
|
||||
ecc_key* key;
|
||||
} eccverify;
|
||||
#endif
|
||||
#ifdef HAVE_ECC_CHECK_KEY
|
||||
struct {
|
||||
ecc_key* key;
|
||||
const byte* pubKey;
|
||||
word32 pubKeySz;
|
||||
} ecc_check;
|
||||
#endif
|
||||
#endif
|
||||
#endif /* HAVE_ECC */
|
||||
#ifdef HAVE_CURVE25519
|
||||
struct {
|
||||
WC_RNG* rng;
|
||||
|
|
Loading…
Reference in New Issue