forked from wolfSSL/wolfssl
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;
|
||||
}
|
||||
|
||||
#ifdef WOLFSSL_CERT_EXT
|
||||
int wc_EccPublicKeyDecode(const byte* input, word32* inOutIdx,
|
||||
ecc_key* key, word32 inSz)
|
||||
{
|
||||
@@ -9243,6 +9244,7 @@ int wc_EccPublicKeyDecode(const byte* input, word32* inOutIdx,
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef WOLFSSL_KEY_GEN
|
||||
|
@@ -10385,6 +10385,7 @@ done:
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef WOLFSSL_CERT_EXT
|
||||
static int ecc_decode_test(void)
|
||||
{
|
||||
int ret;
|
||||
@@ -10520,15 +10521,18 @@ done:
|
||||
wc_ecc_free(&key);
|
||||
return ret;
|
||||
}
|
||||
#endif /* WOLFSSL_CERT_EXT */
|
||||
|
||||
int ecc_test(void)
|
||||
{
|
||||
int ret;
|
||||
WC_RNG rng;
|
||||
|
||||
#ifdef WOLFSSL_CERT_EXT
|
||||
ret = ecc_decode_test();
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
#endif
|
||||
|
||||
ret = wc_InitRng(&rng);
|
||||
if (ret != 0)
|
||||
|
Reference in New Issue
Block a user