Init PSA in ssl and x509 programs

Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
diff --git a/programs/x509/cert_write.c b/programs/x509/cert_write.c
index a822684..bdcae9e 100644
--- a/programs/x509/cert_write.c
+++ b/programs/x509/cert_write.c
@@ -315,6 +315,15 @@
     mbedtls_ctr_drbg_context ctr_drbg;
     const char *pers = "crt example app";
 
+#if defined(MBEDTLS_USE_PSA_CRYPTO)
+    psa_status_t status = psa_crypto_init();
+    if (status != PSA_SUCCESS) {
+        mbedtls_fprintf(stderr, "Failed to initialize PSA Crypto implementation: %d\n",
+                        (int) status);
+        goto exit;
+    }
+#endif /* MBEDTLS_USE_PSA_CRYPTO */
+
     /*
      * Set to sane values
      */