From cac96d799035a958fff569231c5b922c8ec46119 Mon Sep 17 00:00:00 2001 From: Patrick Rathje Date: Thu, 16 Feb 2023 17:31:15 +0100 Subject: [PATCH] add mbedtls platform init call --- src/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main.c b/src/main.c index 29d0103..ebc5b6d 100644 --- a/src/main.c +++ b/src/main.c @@ -18,6 +18,8 @@ #include "tracing.h" #include "bloom.h" +#include "mbedtls/platform.h" + /** * Fill the bloom filter with all stored records. @@ -43,6 +45,13 @@ void main(void) { int err = 0; printk("Starting Contact-Tracing Wristband...\n"); + int ret = 0; + + if((ret = mbedtls_platform_setup(NULL)) != 0) { + mbedtls_printf("Platform initialization failed with error %d\r\n", ret); + return 1; + } + // Use custom randomization as the mbdet_tls context initialization messes with the Zeyhr BLE stack. err = en_init(sys_csrand_get); if (err) {