1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-01 10:06:53 +03:00

PK: fix support for ECKEY_DH

This commit is contained in:
Manuel Pégourié-Gonnard
2013-08-12 18:51:26 +02:00
parent f18c3e0378
commit 835eb59c6a
3 changed files with 38 additions and 1 deletions

View File

@ -119,11 +119,16 @@ int pk_set_type( pk_context *ctx, pk_type_t type )
else
#endif
#if defined(POLARSSL_ECP_C)
if( type == POLARSSL_PK_ECKEY || type == POLARSSL_PK_ECKEY_DH )
if( type == POLARSSL_PK_ECKEY )
{
size = sizeof( ecp_keypair );
info = &eckey_info;
}
else if( type == POLARSSL_PK_ECKEY_DH )
{
size = sizeof( ecp_keypair );
info = &eckeydh_info;
}
else
#endif
#if defined(POLARSSL_ECDSA_C)