Add output size parameter to signature functions
The functions mbedtls_pk_sign(), mbedtls_pk_sign_restartable(), mbedtls_ecdsa_write_signature() and mbedtls_ecdsa_write_signature_restartable() now take an extra parameter indicating the size of the output buffer for the signature. No change to RSA because for RSA, the output size is trivial to calculate. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
1fed4b8324
commit
f00f152444
19 changed files with 131 additions and 81 deletions
9
docs/3.0-migration-guide.d/out_size.md
Normal file
9
docs/3.0-migration-guide.d/out_size.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
Extra parameter for the output buffer size
|
||||
------------------------------------------
|
||||
|
||||
The following functions now take an extra parameter indicating the size of the output buffer:
|
||||
|
||||
* `mbedtls_ecdsa_write_signature()`, `mbedtls_ecdsa_write_signature_restartable()`
|
||||
* `mbedtls_pk_sign()`, `mbedtls_pk_sign_restartable()`
|
||||
|
||||
The requirements for the output buffer have not changed, but passing a buffer that is too small now reliably causes the functions to return an error, rather than overflowing the buffer.
|
Loading…
Add table
Add a link
Reference in a new issue