diff options
| author | J08nY | 2024-08-15 13:35:17 +0200 |
|---|---|---|
| committer | J08nY | 2024-08-15 13:35:55 +0200 |
| commit | 3fa7861737413bcd426b9c2510b69579f9cc6fbf (patch) | |
| tree | 5907665c334276349f0af415c02ca07133cca223 /nix | |
| parent | 9a00cf0cfb3e4d17a060f335a01b06aa715f871f (diff) | |
| download | ECTester-3fa7861737413bcd426b9c2510b69579f9cc6fbf.tar.gz ECTester-3fa7861737413bcd426b9c2510b69579f9cc6fbf.tar.zst ECTester-3fa7861737413bcd426b9c2510b69579f9cc6fbf.zip | |
Diffstat (limited to 'nix')
| -rw-r--r-- | nix/mbedtls-printf.patch | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/nix/mbedtls-printf.patch b/nix/mbedtls-printf.patch new file mode 100644 index 0000000..f19acf5 --- /dev/null +++ b/nix/mbedtls-printf.patch @@ -0,0 +1,95 @@ +diff --git a/programs/ssl/ssl_pthread_server.c b/programs/ssl/ssl_pthread_server.c +--- a/programs/ssl/ssl_pthread_server.c ++++ b/programs/ssl/ssl_pthread_server.c +@@ -142,7 +142,7 @@ static void *handle_ssl_connection( void *data ) + if( ( ret = mbedtls_ssl_setup( &ssl, thread_info->config ) ) != 0 ) + { + mbedtls_printf( " [ #%ld ] failed: mbedtls_ssl_setup returned -0x%04x\n", +- thread_id, -ret ); ++ thread_id, ( unsigned int ) -ret ); + goto thread_exit; + } + +@@ -158,7 +158,7 @@ static void *handle_ssl_connection( void *data ) + if( ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE ) + { + mbedtls_printf( " [ #%ld ] failed: mbedtls_ssl_handshake returned -0x%04x\n", +- thread_id, -ret ); ++ thread_id, ( unsigned int ) -ret ); + goto thread_exit; + } + } +@@ -195,7 +195,7 @@ static void *handle_ssl_connection( void *data ) + + default: + mbedtls_printf( " [ #%ld ] mbedtls_ssl_read returned -0x%04x\n", +- thread_id, -ret ); ++ thread_id, ( unsigned int ) -ret ); + goto thread_exit; + } + } +@@ -229,7 +229,7 @@ static void *handle_ssl_connection( void *data ) + if( ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE ) + { + mbedtls_printf( " [ #%ld ] failed: mbedtls_ssl_write returned -0x%04x\n", +- thread_id, ret ); ++ thread_id, ( unsigned int ) ret ); + goto thread_exit; + } + } +@@ -246,7 +246,7 @@ static void *handle_ssl_connection( void *data ) + ret != MBEDTLS_ERR_SSL_WANT_WRITE ) + { + mbedtls_printf( " [ #%ld ] failed: mbedtls_ssl_close_notify returned -0x%04x\n", +- thread_id, ret ); ++ thread_id, ( unsigned int ) ret ); + goto thread_exit; + } + } +@@ -263,7 +263,7 @@ static void *handle_ssl_connection( void *data ) + char error_buf[100]; + mbedtls_strerror( ret, error_buf, 100 ); + mbedtls_printf(" [ #%ld ] Last error was: -0x%04x - %s\n\n", +- thread_id, -ret, error_buf ); ++ thread_id, ( unsigned int ) -ret, error_buf ); + } + #endif + +@@ -408,7 +408,7 @@ int main( void ) + strlen( pers ) ) ) != 0 ) + { + mbedtls_printf( " failed: mbedtls_ctr_drbg_seed returned -0x%04x\n", +- -ret ); ++ ( unsigned int ) -ret ); + goto exit; + } + +@@ -425,7 +425,7 @@ int main( void ) + MBEDTLS_SSL_PRESET_DEFAULT ) ) != 0 ) + { + mbedtls_printf( " failed: mbedtls_ssl_config_defaults returned -0x%04x\n", +- -ret ); ++ ( unsigned int ) -ret ); + goto exit; + } + +@@ -470,7 +470,8 @@ int main( void ) + { + char error_buf[100]; + mbedtls_strerror( ret, error_buf, 100 ); +- mbedtls_printf( " [ main ] Last error was: -0x%04x - %s\n", -ret, error_buf ); ++ mbedtls_printf( " [ main ] Last error was: -0x%04x - %s\n", ( unsigned int ) -ret, ++ error_buf ); + } + #endif + +@@ -482,7 +483,8 @@ int main( void ) + if( ( ret = mbedtls_net_accept( &listen_fd, &client_fd, + NULL, 0, NULL ) ) != 0 ) + { +- mbedtls_printf( " [ main ] failed: mbedtls_net_accept returned -0x%04x\n", ret ); ++ mbedtls_printf( " [ main ] failed: mbedtls_net_accept returned -0x%04x\n", ++ ( unsigned int ) ret ); + goto exit; + } + |
