rsa.c: provide interface to get hash_id of RSA context
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
diff --git a/library/rsa.c b/library/rsa.c
index ba54d25..fc7f3bc 100644
--- a/library/rsa.c
+++ b/library/rsa.c
@@ -508,6 +508,14 @@
}
/*
+ * Get hash identifier of mbedtls_md_type_t type
+ */
+int mbedtls_rsa_get_hash_id(const mbedtls_rsa_context *ctx)
+{
+ return ctx->MBEDTLS_PRIVATE(hash_id);
+}
+
+/*
* Get length in bytes of RSA modulus
*/
size_t mbedtls_rsa_get_len(const mbedtls_rsa_context *ctx)