sim: Add RSA signature verification to simulator
Using the published debug keypair, generate a signature with it, to add
to the TLV. This verifies that signature verification works as
expected.
Signed-off-by: David Brown <david.brown@linaro.org>
diff --git a/sim/csupport/run.c b/sim/csupport/run.c
index d52defd..5a817cc 100644
--- a/sim/csupport/run.c
+++ b/sim/csupport/run.c
@@ -42,11 +42,17 @@
static struct area_desc *flash_areas;
+void *(*mbedtls_calloc)(size_t n, size_t size);
+void (*mbedtls_free)(void *ptr);
+
int invoke_boot_go(struct area_desc *adesc)
{
int res;
struct boot_rsp rsp;
+ mbedtls_calloc = calloc;
+ mbedtls_free = free;
+
flash_areas = adesc;
if (setjmp(boot_jmpbuf) == 0) {
res = boot_go(&rsp);