mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-31 10:20:45 +00:00
Fix ots sig length check in LMS validate function
Signed-off-by: Raef Coles <raef.coles@arm.com>
This commit is contained in:
parent
f36874a535
commit
02cf8234b4
@ -733,7 +733,7 @@ int mbedtls_lms_sign( mbedtls_lms_private_t *ctx,
|
|||||||
ret = mbedtls_lmots_sign( &ctx->ots_private_keys[q_leaf_identifier],
|
ret = mbedtls_lmots_sign( &ctx->ots_private_keys[q_leaf_identifier],
|
||||||
f_rng, p_rng, msg, msg_size,
|
f_rng, p_rng, msg, msg_size,
|
||||||
sig + SIG_OTS_SIG_OFFSET,
|
sig + SIG_OTS_SIG_OFFSET,
|
||||||
MBEDTLS_LMS_SIG_LEN(ctx->params.type, ctx->params.otstype),
|
MBEDTLS_LMS_SIG_LEN(ctx->params.type, ctx->params.otstype) - SIG_OTS_SIG_OFFSET,
|
||||||
NULL );
|
NULL );
|
||||||
if( ret != 0 )
|
if( ret != 0 )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user