tls-crypto: Generalizing DH group to TLS group mapping
This simplifies writing the key share extension as the TLS group does not have to be cached.
This commit is contained in:
committed by
Tobias Brunner
parent
ab70f68cf9
commit
066ac8809c
@@ -2319,3 +2319,20 @@ int tls_crypto_get_supported_suites(bool null, tls_version_t version,
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* See header.
|
||||
*/
|
||||
tls_named_group_t tls_ec_group_to_curve(diffie_hellman_group_t group)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < countof(curves); i++)
|
||||
{
|
||||
if (curves[i].group == group)
|
||||
{
|
||||
return curves[i].curve;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user