1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Merge pull request #8863 from minosgalanakis/feature/add_ecdh_context_5016

[MBEDTLS_PRIVATE] Add a getter for the ECDH context->grp.id member.
This commit is contained in:
Dave Rodgman
2024-03-05 16:58:13 +00:00
committed by GitHub
5 changed files with 58 additions and 0 deletions

View File

@ -144,6 +144,15 @@ static void ecdh_init_internal(mbedtls_ecdh_context_mbed *ctx)
#endif
}
mbedtls_ecp_group_id mbedtls_ecdh_get_grp_id(mbedtls_ecdh_context *ctx)
{
#if defined(MBEDTLS_ECDH_LEGACY_CONTEXT)
return ctx->MBEDTLS_PRIVATE(grp).id;
#else
return ctx->MBEDTLS_PRIVATE(grp_id);
#endif
}
/*
* Initialize context
*/