You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Within ECDH_ComputeSecret() the use of ECKey_From() happens after the first switch block, which means that switch logic referenced below assumes that the provided key is from a CBOR decoding and not a native mbedtls key. If the key is infact a native mbedtls key the cn_cbor_mapget_int() will fail and the function will exit early even though the key is present.
p = cn_cbor_mapget_int(pKeyPublic->m_cborKey, COSE_Key_EC_Curve);
Instead of switching on the CBOR content, the ECKey_From() should happen first (as is the case in other processing functions) and the switch can use the mbedtls key member useKey->grp.id.
The text was updated successfully, but these errors were encountered:
Within
ECDH_ComputeSecret()
the use ofECKey_From()
happens after the first switch block, which means that switch logic referenced below assumes that the provided key is from a CBOR decoding and not a native mbedtls key. If the key is infact a native mbedtls key thecn_cbor_mapget_int()
will fail and the function will exit early even though the key is present.COSE-C/src/mbedtls.cpp
Line 1167 in 97d1805
Instead of switching on the CBOR content, the
ECKey_From()
should happen first (as is the case in other processing functions) and the switch can use the mbedtls key memberuseKey->grp.id
.The text was updated successfully, but these errors were encountered: