Required for a few features, including TLS1.3 on newer mbedtls versions
Signed-off-by: Felix Fietkau <nbd@nbd.name>
#include "ustream-ssl.h"
#include "ustream-internal.h"
+#include <psa/crypto.h>
static int s_ustream_read(void *ctx, unsigned char *buf, size_t len)
{
mbedtls_ssl_config *conf;
int ep;
+#ifdef MBEDTLS_PSA_CRYPTO_C
+ static bool psa_init;
+
+ if (!psa_init && !psa_crypto_init())
+ psa_init = true;
+#endif
+
ctx = calloc(1, sizeof(*ctx));
if (!ctx)
return NULL;