mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-08 17:42:09 +03:00
Merge branch 'development' into dtls
* development: (100 commits) Update Changelog for the mem-measure branch Fix issues introduced when rebasing Fix compile error in memory_buffer_alloc_selftest Code cosmetics Add curve25519 to ecc-heap.sh Add curve25519 to the benchmark program Fix compile issue when buffer_alloc not available New script ecc-heap.sh Fix unused variable issue in some configs Rm usunused member in private struct Add heap usage for PK in benchmark Use memory_buffer_alloc() in benchmark if available Only define mode_func if mode is enabled (CBC etc) PKCS8 encrypted key depend on PKCS5 or PKCS12 Disable SRV_C for client measurement Output stack+heap usage with massif Enable NIST_OPTIM by default for config-suite-b Refactor memory.sh Adapt memory.sh to config-suite-b Adapt mini-client for config-suite-b.h ... Conflicts: ChangeLog include/polarssl/net.h library/Makefile library/error.c library/ssl_tls.c programs/Makefile programs/ssl/ssl_client2.c programs/ssl/ssl_server2.c tests/Makefile
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
|
||||
#include "polarssl/net.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#if (defined(_WIN32) || defined(_WIN32_WCE)) && !defined(EFIX64) && \
|
||||
!defined(EFI32)
|
||||
|
||||
@@ -127,6 +129,12 @@ typedef UINT32 uint32_t;
|
||||
(((unsigned long )(n) & 0xFF000000) >> 24))
|
||||
#endif
|
||||
|
||||
#if defined(POLARSSL_PLATFORM_C)
|
||||
#include "polarssl/platform.h"
|
||||
#else
|
||||
#define polarssl_snprintf snprintf
|
||||
#endif
|
||||
|
||||
unsigned short net_htons( unsigned short n );
|
||||
unsigned long net_htonl( unsigned long n );
|
||||
#define net_htons(n) POLARSSL_HTONS(n)
|
||||
@@ -171,7 +179,7 @@ int net_connect( int *fd, const char *host, int port, int proto )
|
||||
|
||||
/* getaddrinfo expects port as a string */
|
||||
memset( port_str, 0, sizeof( port_str ) );
|
||||
snprintf( port_str, sizeof( port_str ), "%d", port );
|
||||
polarssl_snprintf( port_str, sizeof( port_str ), "%d", port );
|
||||
|
||||
/* Do name resolution with both IPv6 and IPv4 */
|
||||
memset( &hints, 0, sizeof( hints ) );
|
||||
@@ -259,7 +267,7 @@ int net_bind( int *fd, const char *bind_ip, int port, int proto )
|
||||
|
||||
/* getaddrinfo expects port as a string */
|
||||
memset( port_str, 0, sizeof( port_str ) );
|
||||
snprintf( port_str, sizeof( port_str ), "%d", port );
|
||||
polarssl_snprintf( port_str, sizeof( port_str ), "%d", port );
|
||||
|
||||
/* Bind to IPv6 and/or IPv4, but only in TCP */
|
||||
memset( &hints, 0, sizeof( hints ) );
|
||||
|
Reference in New Issue
Block a user