Avoid spurious write to *olen in PSA version of rsa_encrypt_wrap()
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
This commit is contained in:
parent
da1d80db19
commit
62e6ea2c22
1 changed files with 1 additions and 3 deletions
|
@ -249,9 +249,7 @@ static int rsa_encrypt_wrap( void *ctx,
|
|||
return( MBEDTLS_ERR_RSA_INVALID_PADDING );
|
||||
#endif
|
||||
|
||||
*olen = mbedtls_rsa_get_len( rsa );
|
||||
|
||||
if( *olen > osize )
|
||||
if( mbedtls_rsa_get_len( rsa ) > osize )
|
||||
return( MBEDTLS_ERR_RSA_OUTPUT_TOO_LARGE );
|
||||
|
||||
/* mbedtls_pk_write_pubkey_der() expects a full PK context;
|
||||
|
|
Loading…
Reference in a new issue