mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-10-26 00:37:41 +03:00
Revert "tls13: add ecdh_read_public"
This reverts commit 6a9d2ee4df88028e352e50d4f48687ce5b0f26ac. Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
@@ -79,7 +79,6 @@
|
||||
|
||||
#include "bn_mul.h"
|
||||
#include "ecp_invasive.h"
|
||||
#include "ssl_misc.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -1052,39 +1051,6 @@ cleanup:
|
||||
return( ret );
|
||||
}
|
||||
|
||||
#if defined(MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL)
|
||||
|
||||
int mbedtls_ecp_tls13_read_point( const mbedtls_ecp_group *grp,
|
||||
mbedtls_ecp_point *pt,
|
||||
const unsigned char **buf, size_t buf_len )
|
||||
{
|
||||
unsigned char data_len;
|
||||
const unsigned char *buf_start;
|
||||
ECP_VALIDATE_RET( grp != NULL );
|
||||
ECP_VALIDATE_RET( pt != NULL );
|
||||
ECP_VALIDATE_RET( buf != NULL );
|
||||
ECP_VALIDATE_RET( *buf != NULL );
|
||||
|
||||
if( buf_len < 3 )
|
||||
return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
|
||||
|
||||
data_len = ( *( *buf ) << 8 ) | *( *buf+1 );
|
||||
*buf += 2;
|
||||
|
||||
if( data_len < 1 || data_len > buf_len - 2 )
|
||||
return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
|
||||
|
||||
/*
|
||||
* Save buffer start for read_binary and update buf
|
||||
*/
|
||||
buf_start = *buf;
|
||||
*buf += data_len;
|
||||
|
||||
return( mbedtls_ecp_point_read_binary( grp, pt, buf_start, data_len ) );
|
||||
}
|
||||
|
||||
#endif /* MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL */
|
||||
|
||||
/*
|
||||
* Fast mod-p functions expect their argument to be in the 0..p^2 range.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user