mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Add mbedtls_ecjpake_check(), tells if set up
This will be used in SSL to avoid the computation-heavy processing of EC J-PAKE hello extensions in case we don't have an EC J-PAKE password
This commit is contained in:
@ -119,6 +119,21 @@ cleanup:
|
||||
return( ret );
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if context is ready for use
|
||||
*/
|
||||
int mbedtls_ecjpake_check( const mbedtls_ecjpake_context *ctx )
|
||||
{
|
||||
if( ctx->md_info == NULL ||
|
||||
ctx->grp.id == MBEDTLS_ECP_DP_NONE ||
|
||||
ctx->s.p == NULL )
|
||||
{
|
||||
return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA );
|
||||
}
|
||||
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
* Write a point plus its length to a buffer
|
||||
*/
|
||||
|
Reference in New Issue
Block a user