mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 20:54:41 +02:00
wolfcrypt/src/ecc.c: in wc_ecc_get_curve_id_from_oid(), deconditionalize guard against zero-length len added in 03a6eed037
, to fix test_wc_ecc_get_curve_id_from_oid() failing in cross-mingw-all-crypto.
This commit is contained in:
@@ -4554,13 +4554,11 @@ int wc_ecc_get_curve_id_from_oid(const byte* oid, word32 len)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(HAVE_OID_ENCODING) && !defined(HAVE_OID_DECODING)
|
|
||||||
if (len == 0) {
|
if (len == 0) {
|
||||||
/* SAKKE has zero oidSz and will otherwise match with len==0. */
|
/* SAKKE has zero oidSz and will otherwise match with len==0. */
|
||||||
WOLFSSL_MSG("zero oidSz");
|
WOLFSSL_MSG("zero oidSz");
|
||||||
return ECC_CURVE_INVALID;
|
return ECC_CURVE_INVALID;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
for (curve_idx = 0; ecc_sets[curve_idx].size != 0; curve_idx++) {
|
for (curve_idx = 0; ecc_sets[curve_idx].size != 0; curve_idx++) {
|
||||||
#if defined(HAVE_OID_ENCODING) && !defined(HAVE_OID_DECODING)
|
#if defined(HAVE_OID_ENCODING) && !defined(HAVE_OID_DECODING)
|
||||||
|
Reference in New Issue
Block a user