Avoid collision of ssl_xxx_key_exchange_yyy() func names in cli/srv
This makes grepping the functions more difficult, and also leads to compilation failures
when trying to build the library from a single source file (which might be useful for
code-size reasons).
diff --git a/library/ssl_srv.c b/library/ssl_srv.c
index 3915315..7aaea95 100644
--- a/library/ssl_srv.c
+++ b/library/ssl_srv.c
@@ -4051,19 +4051,19 @@
*/
/* Main entry point; orchestrates the other functions. */
-static int ssl_process_client_key_exchange( mbedtls_ssl_context *ssl );
+static int ssl_process_in_client_key_exchange( mbedtls_ssl_context *ssl );
-static int ssl_client_key_exchange_parse( mbedtls_ssl_context *ssl,
- unsigned char *buf,
- size_t buflen );
+static int ssl_in_client_key_exchange_parse( mbedtls_ssl_context *ssl,
+ unsigned char *buf,
+ size_t buflen );
/* Update the handshake state */
-static int ssl_client_key_exchange_postprocess( mbedtls_ssl_context *ssl );
+static int ssl_in_client_key_exchange_postprocess( mbedtls_ssl_context *ssl );
/*
* Implementation
*/
-static int ssl_process_client_key_exchange( mbedtls_ssl_context *ssl )
+static int ssl_process_in_client_key_exchange( mbedtls_ssl_context *ssl )
{
int ret;
MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> process client key exchange" ) );
@@ -4088,11 +4088,11 @@
goto cleanup;
}
- MBEDTLS_SSL_CHK( ssl_client_key_exchange_parse( ssl, ssl->in_msg,
- ssl->in_hslen ) );
+ MBEDTLS_SSL_CHK( ssl_in_client_key_exchange_parse( ssl, ssl->in_msg,
+ ssl->in_hslen ) );
/* Update state */
- MBEDTLS_SSL_CHK( ssl_client_key_exchange_postprocess( ssl ) );
+ MBEDTLS_SSL_CHK( ssl_in_client_key_exchange_postprocess( ssl ) );
cleanup:
@@ -4105,7 +4105,7 @@
return( ret );
}
-static int ssl_client_key_exchange_parse( mbedtls_ssl_context *ssl,
+static int ssl_in_client_key_exchange_parse( mbedtls_ssl_context *ssl,
unsigned char *buf,
size_t buflen )
{
@@ -4292,7 +4292,7 @@
}
/* Update the handshake state */
-static int ssl_client_key_exchange_postprocess( mbedtls_ssl_context *ssl )
+static int ssl_in_client_key_exchange_postprocess( mbedtls_ssl_context *ssl )
{
int ret;
@@ -4684,7 +4684,7 @@
break;
case MBEDTLS_SSL_CLIENT_KEY_EXCHANGE:
- ret = ssl_process_client_key_exchange( ssl );
+ ret = ssl_process_in_client_key_exchange( ssl );
break;
case MBEDTLS_SSL_CERTIFICATE_VERIFY: