tls: psa_pake: move move key exchange read/write functions to ssl_tls.c

Inlined functions might cause the compiled code to have different sizes
depending on the usage and this not acceptable in some cases.
Therefore read/write functions used in the initial key exchange are
moved to a standard C file.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
diff --git a/library/ssl_tls12_server.c b/library/ssl_tls12_server.c
index 38899f9..f5c50ea 100644
--- a/library/ssl_tls12_server.c
+++ b/library/ssl_tls12_server.c
@@ -305,7 +305,7 @@
     }
 
 #if defined(MBEDTLS_USE_PSA_CRYPTO)
-    if ( ( ret = psa_tls12_parse_ecjpake_round_one(
+    if ( ( ret = mbedtls_psa_ecjpake_read_round_one(
                         &ssl->handshake->psa_pake_ctx, buf, len ) ) != 0 )
     {
         psa_destroy_key( ssl->handshake->psa_pake_password );
@@ -2896,7 +2896,7 @@
         MBEDTLS_PUT_UINT16_BE( curve_info->tls_id, out_p, 1 );
         output_offset += sizeof( uint8_t ) + sizeof( uint16_t );
 
-        ret = psa_tls12_write_ecjpake_round_two( &ssl->handshake->psa_pake_ctx,
+        ret = mbedtls_psa_ecjpake_write_round_two( &ssl->handshake->psa_pake_ctx,
                                     out_p + output_offset,
                                     end_p - out_p - output_offset, &output_len );
         if( ret != 0 )
@@ -4143,7 +4143,7 @@
     if( ciphersuite_info->key_exchange == MBEDTLS_KEY_EXCHANGE_ECJPAKE )
     {
 #if defined(MBEDTLS_USE_PSA_CRYPTO)
-        if( ( ret = psa_tls12_parse_ecjpake_round_two(
+        if( ( ret = mbedtls_psa_ecjpake_read_round_two(
                         &ssl->handshake->psa_pake_ctx, p, end - p,
                         ssl->conf->endpoint ) ) != 0 )
         {