-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
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.
Line 1167 in 97d1805
| 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels