mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-04-18 04:41:52 +00:00
TinyCrypt ECDHE-PSK: Implement CliKeyExchange parsing
This commit is contained in:
parent
982da7ee0a
commit
358b3006ee
|
@ -4345,6 +4345,10 @@ static int ssl_in_client_key_exchange_parse( mbedtls_ssl_context *ssl,
|
||||||
return( ret );
|
return( ret );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_USE_TINYCRYPT)
|
||||||
|
if( mbedtls_ssl_ecdh_read_peerkey( ssl, &p, end ) != 0 )
|
||||||
|
return( MBEDTLS_ERR_SSL_HW_ACCEL_FAILED );
|
||||||
|
#else /* MBEDTLS_USE_TINYCRYPT */
|
||||||
if( ( ret = mbedtls_ecdh_read_public( &ssl->handshake->ecdh_ctx,
|
if( ( ret = mbedtls_ecdh_read_public( &ssl->handshake->ecdh_ctx,
|
||||||
p, end - p ) ) != 0 )
|
p, end - p ) ) != 0 )
|
||||||
{
|
{
|
||||||
|
@ -4353,6 +4357,7 @@ static int ssl_in_client_key_exchange_parse( mbedtls_ssl_context *ssl,
|
||||||
}
|
}
|
||||||
|
|
||||||
MBEDTLS_SSL_DEBUG_ECP( 3, "ECDH: Qp ", &ssl->handshake->ecdh_ctx.Qp );
|
MBEDTLS_SSL_DEBUG_ECP( 3, "ECDH: Qp ", &ssl->handshake->ecdh_ctx.Qp );
|
||||||
|
#endif /* MBEDTLS_USE_TINYCRYPT */
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */
|
#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */
|
||||||
|
|
Loading…
Reference in a new issue