Skip to content

Commit be37b07

Browse files
Update the documentation of mbedtls_pk_sign_restartable()
Clarify the documentation regarding the signature size. Also fix minor niggles about references to mbedtls_pk_sign().
1 parent c580824 commit be37b07

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

include/mbedtls/pk.h

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -530,16 +530,21 @@ int mbedtls_pk_sign( mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg,
530530
*
531531
* \param ctx The PK context to use. It must have been set up
532532
* with a private key.
533-
* \param md_alg Hash algorithm used (see notes)
533+
* \param md_alg Hash algorithm used (see notes for mbedtls_pk_sign())
534534
* \param hash Hash of the message to sign
535-
* \param hash_len Hash length or 0 (see notes)
536-
* \param sig Place to write the signature
537-
* \param sig_len Number of bytes written
535+
* \param hash_len Hash length or 0 (see notes for mbedtls_pk_sign())
536+
* \param sig Place to write the signature.
537+
* It must have enough room for the signature.
538+
* #MBEDTLS_PK_SIGNATURE_MAX_SIZE is always enough.
539+
* You may use a smaller buffer if it is large enough
540+
* given the key type.
541+
* \param sig_len On successful return,
542+
* the number of bytes written to \p sig.
538543
* \param f_rng RNG function
539544
* \param p_rng RNG parameter
540545
* \param rs_ctx Restart context (NULL to disable restart)
541546
*
542-
* \return See \c mbedtls_pk_sign(), or
547+
* \return See \c mbedtls_pk_sign().
543548
* \return #MBEDTLS_ERR_ECP_IN_PROGRESS if maximum number of
544549
* operations was reached: see \c mbedtls_ecp_set_max_ops().
545550
*/

0 commit comments

Comments
 (0)