mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 20:24:39 +02:00
wc_EccPublicKeyDecode changes from review
This commit is contained in:
@@ -9190,6 +9190,7 @@ int wc_EccPrivateKeyDecode(const byte* input, word32* inOutIdx, ecc_key* key,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WOLFSSL_CERT_EXT
|
||||||
int wc_EccPublicKeyDecode(const byte* input, word32* inOutIdx,
|
int wc_EccPublicKeyDecode(const byte* input, word32* inOutIdx,
|
||||||
ecc_key* key, word32 inSz)
|
ecc_key* key, word32 inSz)
|
||||||
{
|
{
|
||||||
@@ -9243,6 +9244,7 @@ int wc_EccPublicKeyDecode(const byte* input, word32* inOutIdx,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef WOLFSSL_KEY_GEN
|
#ifdef WOLFSSL_KEY_GEN
|
||||||
|
@@ -10385,6 +10385,7 @@ done:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WOLFSSL_CERT_EXT
|
||||||
static int ecc_decode_test(void)
|
static int ecc_decode_test(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@@ -10520,15 +10521,18 @@ done:
|
|||||||
wc_ecc_free(&key);
|
wc_ecc_free(&key);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#endif /* WOLFSSL_CERT_EXT */
|
||||||
|
|
||||||
int ecc_test(void)
|
int ecc_test(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
WC_RNG rng;
|
WC_RNG rng;
|
||||||
|
|
||||||
|
#ifdef WOLFSSL_CERT_EXT
|
||||||
ret = ecc_decode_test();
|
ret = ecc_decode_test();
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
#endif
|
||||||
|
|
||||||
ret = wc_InitRng(&rng);
|
ret = wc_InitRng(&rng);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
|
Reference in New Issue
Block a user