mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Add mbedtls_ecdh_can_do
All curves can currently do ECDH, but to make the API symmetric and future-proof, add mbedtls_ecdh_can_do() to go with mbedtls_ecdsa_can_do().
This commit is contained in:
committed by
Janos Follath
parent
1fdf2c2d1c
commit
20b3ef3cad
@ -63,6 +63,13 @@ static mbedtls_ecp_group_id mbedtls_ecdh_grp_id(
|
||||
#endif
|
||||
}
|
||||
|
||||
int mbedtls_ecdh_can_do( mbedtls_ecp_group_id gid )
|
||||
{
|
||||
/* At this time, all groups support ECDH. */
|
||||
(void) gid;
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if !defined(MBEDTLS_ECDH_GEN_PUBLIC_ALT)
|
||||
/*
|
||||
* Generate public key (restartable version)
|
||||
|
Reference in New Issue
Block a user