pkwrite: fix wrong guard position for pk_get_opaque_ec_family()

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
diff --git a/library/pkwrite.c b/library/pkwrite.c
index e6f1aef..5f801e2 100644
--- a/library/pkwrite.c
+++ b/library/pkwrite.c
@@ -76,7 +76,6 @@
 #endif
     return 0;
 }
-#endif /* MBEDTLS_PK_HAVE_RFC8410_CURVES */
 
 #if defined(MBEDTLS_USE_PSA_CRYPTO)
 /* It is assumed that the input key is opaque */
@@ -93,7 +92,11 @@
 
     return ec_family;
 }
+#endif /* MBETLS_USE_PSA_CRYPTO */
+#endif /* MBEDTLS_PK_HAVE_RFC8410_CURVES */
+#endif /* MBEDTLS_PK_HAVE_ECC_KEYS */
 
+#if defined(MBEDTLS_USE_PSA_CRYPTO)
 /* It is assumed that the input key is opaque */
 static psa_key_type_t pk_get_opaque_key_type(const mbedtls_pk_context *pk)
 {
@@ -109,7 +112,6 @@
     return opaque_key_type;
 }
 #endif /* MBETLS_USE_PSA_CRYPTO */
-#endif /* MBEDTLS_PK_HAVE_ECC_KEYS */
 
 #if defined(MBEDTLS_RSA_C)
 /*