pk: function to calculate the signature size
Expose a function mbedtls_pk_signature_size to calculate the maximum
size of a signature made with a given key. Document that this is the
buffer size that mbedtls_pk_sign requires.
Add a corresponding field signature_size_func to the mbedtls_pk_info
structure.
diff --git a/include/mbedtls/pk_internal.h b/include/mbedtls/pk_internal.h
index 592eb4b..4823294 100644
--- a/include/mbedtls/pk_internal.h
+++ b/include/mbedtls/pk_internal.h
@@ -82,7 +82,10 @@
/** Interface with the debug module */
void (*debug_func)( const void *ctx, mbedtls_pk_debug_item *items );
+ /** Signature size */
+ size_t (*signature_size_func)( const void *ctx );
};
+
#if defined(MBEDTLS_PK_RSA_ALT_SUPPORT)
/* Container for RSA-alt */
typedef struct