Fix ecdh_get_params with mismatching group
Fix ecdh_get_params with mismatching group

If mbedtls_ecdh_get_params is called with keys belonging to
different groups, make it return an error the second time, rather than
silently interpret the first key as being on the second curve.

This makes the non-regression test added by the previous commit pass.

Mbed-TLS/mbedtls,Mbed-TLS/mbedtls,NXPmicro/mbedtls,ARMmbed/mbedtls,NXPmicro/mbedtls,ARMmbed/mbedtls,Mbed-TLS/mbedtls,ARMmbed/mbedtls,Mbed-TLS/mbedtls,NXPmicro/mbedtls,ARMmbed/mbedtls,NXPmicro/mbedtls