pk: move mbedtls_pk_load_file to pk_internal

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
diff --git a/include/mbedtls/pk.h b/include/mbedtls/pk.h
index 27768bd..2fdcaef 100644
--- a/include/mbedtls/pk.h
+++ b/include/mbedtls/pk.h
@@ -1042,14 +1042,6 @@
                             const mbedtls_pk_context *key);
 #endif /* MBEDTLS_PK_WRITE_C */
 
-/*
- * Internal module functions. You probably do not want to use these unless you
- * know you do.
- */
-#if defined(MBEDTLS_FS_IO)
-int mbedtls_pk_load_file(const char *path, unsigned char **buf, size_t *n);
-#endif
-
 #if defined(MBEDTLS_USE_PSA_CRYPTO)
 /**
  * \brief           Turn an EC or RSA key into an opaque one.
diff --git a/library/pk_internal.h b/library/pk_internal.h
index 025ee8b..9cab6a5 100644
--- a/library/pk_internal.h
+++ b/library/pk_internal.h
@@ -144,4 +144,8 @@
     int (*f_rng)(void *, unsigned char *, size_t), void *p_rng);
 #endif
 
+#if defined(MBEDTLS_FS_IO)
+int mbedtls_pk_load_file(const char *path, unsigned char **buf, size_t *n);
+#endif
+
 #endif /* MBEDTLS_PK_INTERNAL_H */
diff --git a/library/x509_internal.h b/library/x509_internal.h
index e1be393..15e097a 100644
--- a/library/x509_internal.h
+++ b/library/x509_internal.h
@@ -15,7 +15,7 @@
 
 #include "mbedtls/x509.h"
 #include "mbedtls/asn1.h"
-#include "mbedtls/pk.h"
+#include "pk_internal.h"
 
 #if defined(MBEDTLS_RSA_C)
 #include "mbedtls/rsa.h"
diff --git a/tests/suites/test_suite_pkwrite.function b/tests/suites/test_suite_pkwrite.function
index 733909e..c760090 100644
--- a/tests/suites/test_suite_pkwrite.function
+++ b/tests/suites/test_suite_pkwrite.function
@@ -1,5 +1,5 @@
 /* BEGIN_HEADER */
-#include "mbedtls/pk.h"
+#include "pk_internal.h"
 #include "mbedtls/pem.h"
 #include "mbedtls/oid.h"
 #include "psa/crypto_sizes.h"