ssl_misc: add internal MBEDTLS_SSL_HAVE_[AES/ARIA/CAMELLIA]_CBC symbols

These are used in tests to determine whether there is support for
one of those keys for CBC mode.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
diff --git a/library/ssl_misc.h b/library/ssl_misc.h
index 2d78fd4..ac8a297 100644
--- a/library/ssl_misc.h
+++ b/library/ssl_misc.h
@@ -261,6 +261,33 @@
  * counter (8) + header (5) + IV(16) + MAC (16-48) + padding (0-256).
  */
 
+/* Some internal helpers to determine which keys are availble for CBC mode. */
+#if defined(MBEDTLS_USE_PSA_CRYPTO)
+#if defined(PSA_WANT_ALG_CBC_NO_PADDING) || defined(PSA_WANT_ALG_CBC_PKCS7)
+#if defined(PSA_WANT_KEY_TYPE_AES)
+#define MBEDTLS_SSL_HAVE_AES_CBC
+#endif
+#if defined(PSA_WANT_KEY_TYPE_ARIA)
+#define MBEDTLS_SSL_HAVE_ARIA_CBC
+#endif
+#if defined(PSA_WANT_KEY_TYPE_CAMELLIA)
+#define MBEDTLS_SSL_HAVE_CAMELLIA_CBC
+#endif
+#endif /* PSA_WANT_ALG_CBC_NO_PADDING || PSA_WANT_ALG_CBC_PKCS7 */
+#else /* MBEDTLS_USE_PSA_CRYPTO */
+#if defined(MBEDTLS_CIPHER_MODE_CBC)
+#if defined(MEDTLS_AES_C)
+#define MBEDTLS_SSL_HAVE_AES_CBC
+#endif
+#if defined(MEDTLS_ARIA_C)
+#define MBEDTLS_SSL_HAVE_ARIA_CBC
+#endif
+#if defined(MEDTLS_CAMELLIA_C)
+#define MBEDTLS_SSL_HAVE_CAMELLIA_CBC
+#endif
+#endif /* MBEDTLS_CIPHER_MODE_CBC */
+#endif /* MBEDTLS_USE_PSA_CRYPTO*/
+
 #if defined(MBEDTLS_SSL_PROTO_TLS1_2)
 
 /* This macro determines whether CBC is supported. */