Use PSA hashing for LMS and LMOTS

Signed-off-by: Raef Coles <raef.coles@arm.com>
diff --git a/include/mbedtls/check_config.h b/include/mbedtls/check_config.h
index 99e863c..2921278 100644
--- a/include/mbedtls/check_config.h
+++ b/include/mbedtls/check_config.h
@@ -354,8 +354,8 @@
 #endif
 
 #if defined(MBEDTLS_LMS_C) &&                                          \
-    ( !defined(MBEDTLS_MD_C) )
-#error "MBEDTLS_LMS_C requires MBEDTLS_MD_C"
+    ( !defined(MBEDTLS_PSA_CRYPTO_C) )
+#error "MBEDTLS_LMS_C requires MBEDTLS_PSA_CRYPTO_C"
 #endif
 
 #if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) &&                          \
diff --git a/include/mbedtls/error.h b/include/mbedtls/error.h
index fe5d497..eb83913 100644
--- a/include/mbedtls/error.h
+++ b/include/mbedtls/error.h
@@ -82,7 +82,7 @@
  * POLY1305  3                  0x0057-0x005B
  * CHACHAPOLY 2 0x0054-0x0056
  * PLATFORM  2  0x0070-0x0072
- * LMS       2  0x0011-0x0017
+ * LMS       5  0x0011-0x0019
  *
  * High-level module nr (3 bits - 0x0...-0x7...)
  * Name      ID  Nr of Errors
diff --git a/include/mbedtls/lms.h b/include/mbedtls/lms.h
index 99fe678..8430309 100644
--- a/include/mbedtls/lms.h
+++ b/include/mbedtls/lms.h
@@ -38,6 +38,7 @@
 #define MBEDTLS_ERR_LMS_OUT_OF_PRIV_KEYS -0x0013 /**< Specified LMS key has utilised all of its private keys */
 #define MBEDTLS_ERR_LMS_VERIFY_FAILED    -0x0015 /**< LMS signature verification failed */
 #define MBEDTLS_ERR_LMS_ALLOC_FAILED     -0x0017 /**< LMS failed to allocate space for a private key */
+#define MBEDTLS_ERR_LMS_BUFFER_TOO_SMALL -0x0019 /**< Input/output buffer is too small to contain requited data */
 
 #define MBEDTLS_LMS_TYPE_LEN            (4)
 #define MBEDTLS_LMS_H_TREE_HEIGHT       (10)