Implement x509_profile_check_key() for TinyCrypt-based PK context
diff --git a/library/x509_crt.c b/library/x509_crt.c
index 1c4237b..352ed6c 100644
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
@@ -597,6 +597,16 @@
     }
 #endif
 
+#if defined(MBEDTLS_USE_TINYCRYPT)
+    if( pk_alg == MBEDTLS_PK_ECKEY )
+    {
+        if( ( profile->allowed_curves & MBEDTLS_UECC_DP_SECP256R1 ) != 0 )
+            return( 0 );
+
+        return( -1 );
+    }
+#endif /* MBEDTLS_USE_TINYCRYPT */
+
 #if defined(MBEDTLS_ECP_C)
     if( pk_alg == MBEDTLS_PK_ECDSA ||
         pk_alg == MBEDTLS_PK_ECKEY ||